Compatibility function

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

Older function. HYPGEOMDIST still works, but for new workbooks use HYPGEOM.DIST.

Syntax

HYPGEOMDIST(sample_s, number_sample, population_s, number_pop)
ArgumentWhat it means
sample_sRequiredThe number of successes in the sample.
number_sampleRequiredThe size of the sample.
population_sRequiredThe number of successes in the whole population.
number_popRequiredThe 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

E2fx=HYPGEOMDIST(A2, B2, C2, D2)
ABCDE
1Successes in sampleSample sizeSuccesses in populationPopulation
2148200.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

E2fx=HYPGEOMDIST(A2, B2, C2, D2)
ABCDE
1Faulty foundInvoices checkedFaulty in batchBatch size
20105500.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).

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 14 KB

Common errors and how to fix them

ErrorWhy it happensFix
#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.

LanguageFunction name
DanishHYPGEOFORDELING
DutchHYPERGEO.VERD
FinnishHYPERGEOM.JAKAUMA
FrenchLOI.HYPERGEOMETRIQUE
GermanHYPGEOMVERT
HungarianHIPERGEOM.ELOSZLÁS
ItalianDISTRIB.IPERGEOM
Norwegian (Bokmål)HYPGEOM.FORDELING
PolishROZKŁAD.HIPERGEOM
Portuguese (Brazil)DIST.HIPERGEOM
Portuguese (Portugal)DIST.HIPERGEOM
RussianГИПЕРГЕОМЕТ
SpanishDISTR.HIPERGEOM
SwedishHYPGEOMFÖRD
TurkishHİPERGEOMDAĞ