Hypergeometric Distribution Calculator
Compute the probability of getting exactly k successes when you draw n items without replacement from a finite population of size N that contains K successes.
Chance of exactly that many successes
- 1
Ways to choose k successes
C(15, 3) = 455 - 2
Ways to choose n−k failures
C(35, 7) = 6,724,520 - 3
Ways to choose n from N
C(50, 10) = 10,272,278,170 - 4
P(X = k)
455 × 6,724,520 ÷ 10,272,278,170 = 0.29786Favourable combinations divided by all possible samples of size n.
How does this calculator work?
The hypergeometric distribution gives the probability of k successes in n draws without replacement from a population of N containing K successes: P(X=k)=C(K,k)·C(N−K,n−k)/C(N,n). Its mean is nK/N and variance is nK/N·(N−K)/N·(N−n)/(N−1), where the last factor corrects for finite populations.
Formula
How this is calculated
The hypergeometric distribution models sampling without replacement from a finite population. You provide four whole numbers: the population size N, the number of successes in that population K, the number of items drawn n, and the observed number of successes k. The probability mass function counts the favourable combinations C(K, k) · C(N−K, n−k) — ways to choose k successes and the remaining n−k failures — divided by C(N, n), the total ways to choose the sample.
The valid range for k runs from max(0, n−(N−K)) to min(n, K); values outside this support have probability zero. The mean is n·K/N and the variance is n·(K/N)·((N−K)/N)·((N−n)/(N−1)). The last factor, (N−n)/(N−1), is the finite-population correction that distinguishes the hypergeometric from the binomial distribution; as N grows large relative to n it approaches 1 and the two distributions converge.
Binomial coefficients are evaluated through the log-gamma function so that large populations do not overflow. Inputs must be non-negative integers with K ≤ N and n ≤ N. This model is widely used in quality control (acceptance sampling), card and lottery problems, and ecological mark-recapture estimates.
Frequently asked questions
The binomial assumes draws with replacement (constant success probability). The hypergeometric draws without replacement, so each draw changes the remaining composition. They agree closely when the population is much larger than the sample.
The observed k must lie within the support max(0, n−(N−K)) to min(n, K). For example, you cannot draw more successes than exist in the population or than the number of draws, so impossible values return zero.
It is the factor (N−n)/(N−1) in the variance. It reduces variance because sampling without replacement from a finite pool leaves less uncertainty than independent draws would.
Also known as
TG we-Calculate Editorial Team. (2026). Hypergeometric Distribution Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/hypergeometric-distribution-calculator
TG we-Calculate Editorial Team. "Hypergeometric Distribution Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/hypergeometric-distribution-calculator.
TG we-Calculate Editorial Team, "Hypergeometric Distribution Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/hypergeometric-distribution-calculator
@misc{wecalculate_hypergeometric_distribution_calculator, title = {Hypergeometric Distribution Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/hypergeometric-distribution-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
