HYPGEOMDIST function
Returns the probability of exactly k successes when sampling without replacement from a finite population. Replaced by HYPGEOM.DIST.
Available in All versions of Excel, including Microsoft 365 and Excel for the web (kept for compatibility)
In every Excel versionWorks in Google Sheets
Syntax
HYPGEOMDIST(sample_s, number_sample, population_s, number_pop)| Argument | What it means | |
|---|---|---|
sample_s | Required | The number of successes in the sample. |
number_sample | Required | The size of the sample. |
population_s | Required | The number of successes in the whole population. |
number_pop | Required | The size of the population. |
Returns: The probability of exactly sample_s successes.
How HYPGEOMDIST works
The hypergeometric distribution answers "if I draw n items without putting them back, what is the chance that exactly k are of the special kind?". Think of picking cards from a deck, auditing a sample of invoices from a batch that contains some errors, or inspecting parts from a small lot. Unlike the binomial distribution, the probability changes with every draw because items are not replaced.
HYPGEOMDIST gives only the probability of an exact count. For "at most k" you have to add the individual probabilities, or use the modern function, which has a cumulative argument. All arguments are truncated to whole numbers.
Compatibility note: HYPGEOMDIST is one of the older statistical functions that Excel 2010 moved to the Compatibility group. It still works in every version, but for new workbooks Microsoft recommends HYPGEOM.DIST. Add FALSE as a fifth argument to keep the same meaning: HYPGEOM.DIST(sample_s, number_sample, population_s, number_pop, FALSE); use TRUE for the cumulative probability.
Examples
1Exactly one success
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Successes in sample | Sample size | Successes in population | Population | |
| 2 | 1 | 4 | 8 | 20 | 0.363261 |
Result: 0.363261
Drawing 4 from 20 items of which 8 are 'successes', the probability of exactly one success is C(8,1)·C(12,3)/C(20,4) = 0.363261 (formatted to 6 decimals).
2Audit finds no faulty invoices
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Faulty found | Invoices checked | Faulty in batch | Batch size | |
| 2 | 0 | 10 | 5 | 50 | 0.3106 |
Result: 0.3106
If 5 of 50 invoices are faulty, a random check of 10 misses all of them with probability 0.3106 — about 31% of the time (formatted to 4 decimals).
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#NUM! | A count is negative, sample_s exceeds number_sample or population_s, or a size exceeds number_pop. | Check that the numbers are consistent. |
#VALUE! | Non-numeric argument. | Check the inputs. |
Tips
- For large populations relative to the sample, the binomial distribution (BINOMDIST) gives almost the same answer.
Questions
Should I still use HYPGEOMDIST?
Only if the workbook must open in Excel 2007 or earlier. Otherwise use HYPGEOM.DIST(..., FALSE), which gives the same result and makes the intent clearer to the next person who reads the formula.
Will HYPGEOMDIST stop working?
There is no announced removal date. Microsoft keeps compatibility functions so old workbooks keep calculating, but they get no new features.
Google Sheets
HYPGEOMDIST also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
HYPGEOMDIST in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Danish | HYPGEOFORDELING |
| Dutch | HYPERGEO.VERD |
| Finnish | HYPERGEOM.JAKAUMA |
| French | LOI.HYPERGEOMETRIQUE |
| German | HYPGEOMVERT |
| Hungarian | HIPERGEOM.ELOSZLÁS |
| Italian | DISTRIB.IPERGEOM |
| Norwegian (Bokmål) | HYPGEOM.FORDELING |
| Polish | ROZKŁAD.HIPERGEOM |
| Portuguese (Brazil) | DIST.HIPERGEOM |
| Portuguese (Portugal) | DIST.HIPERGEOM |
| Russian | ГИПЕРГЕОМЕТ |
| Spanish | DISTR.HIPERGEOM |
| Swedish | HYPGEOMFÖRD |
| Turkish | HİPERGEOMDAĞ |