The Excel HYPGEOMDIST Function

Hypergeometric Distribution

The hypergeometric distribution is a discrete probability distribution that gives the probability of a specified number of successes from a given number of draws from a finite population, without replacement.

The Hypergeometric Distribution is given by the formula :

Hypergeometric Distribution Equation


- x = number of successes in the sample
- n = number in the sample
- M = number of successes in the population
- N = population size


In Excel 2010, the Hypgeomdist function has been replaced by the Hypgeom.Dist function, which has improved accuracy.

Although it has been replaced, the Hypgeomdist function is still available in Excel 2010 (stored in the list of compatibility functions), to allow compatibility with earlier versions of Excel.

Basic Description

The Excel Hypgeomdist function returns the value of the hypergeometric distribution for a given number of successes from a sample of a population.

The syntax of the function is :

HYPGEOMDIST( sample_s, number_sample,

population_s, number_pop )

Where the function arguments are:

sample_s - The number of successes in the sample
number_sample - The size of the sample
population_s - The number of successes in the population
number_pop - The population size

The above arguments should all be integers. If these values are supplied as decimals, they are truncated to integers by Excel.

Examples of use of the Excel Hypgeomdist Function
Excel Hypgeomdist Function Results

Hypgeomdist Function Example

Imagine you have a bag, containing 4 red balls and 8 green balls. If you remove 4 balls from the bag, the probability that you have selected exactly n red balls can be calculated by the Excel Hypgeomdist function.

This is shown in cells A2-A5 of the spreadsheet on the right. The formulas are shown in the upper spreadsheet and the results are shown in the spreadsheet below.

Further examples of the Excel Hypgeomdist function can be found on the Microsoft Office website.

Hypgeomdist Function Errors

If you get an error from the Excel Hypgeomdist function this is likely to be one of the following :

Common Errors
#NUM! - Occurs if either:
- the supplied sample_s is < 0 or > number_sample
- the supplied number_sample ≤ 0 or > number_population
- the supplied population_s ≤ 0 or > number_population
- the supplied number_population ≤ 0
#VALUE! - Occurs if any of the supplied arguments are not recognised as numeric values
Return to the Excel Statistical Functions Page

Return to the List of All Built-In Excel Functions