Hypergeometric Probability Calculator

The hypergeometric distribution gives the probability of drawing a certain number of successes when you sample without replacement from a finite population, such as dealing cards or inspecting a batch for defects. Enter the population size, the number of successes in it, your sample size, and the target number of successes to get the exact, cumulative, and tail probabilities along with the mean and variance.

0.00
0.00
0.00
0.00
0.00

Hypergeometric formula

P(X = k) = C(K, k) * C(N - K, n - k) / C(N, n)
P(X ≤ k) = sum of P(X = i) for i from 0 to k
P(X ≥ k) = 1 - P(X ≤ k - 1)
Mean = n * K / N
Variance = n * (K / N) * ((N - K) / N) * ((N - n) / (N - 1))

C(a, b) is the binomial coefficient, the number of ways to choose b items from a. The variance includes the finite population correction (N - n) / (N - 1) that distinguishes the hypergeometric from the binomial.

Worked example

From a standard 52-card deck (N = 52) with 13 hearts (K = 13), draw a 5-card hand (n = 5). The probability of exactly 2 hearts is C(13, 2) times C(39, 3) divided by C(52, 5) = 78 times 9,139 divided by 2,598,960 = 0.2743, about 27.43%. The mean number of hearts is 5 times 13 divided by 52 = 1.25.

Hypergeometric probability: frequently asked questions

What is hypergeometric probability?

It is the probability of drawing a given number of successes in a fixed-size sample taken without replacement from a finite population that contains a known number of successes. Because items are not replaced, the success probability changes with each draw.

What is the formula?

The probability of exactly k successes is C(K,k) times C(N-K,n-k) divided by C(N,n), where N is the population, K the successes in the population, n the sample size, and k the successes drawn. C denotes the binomial coefficient, the number of combinations.

How does it differ from the binomial distribution?

The binomial models draws with replacement or from an effectively infinite population, so the success probability is constant. The hypergeometric models draws without replacement from a finite population, so the probability shifts as items are removed.

What are the valid input ranges?

All values are non-negative whole numbers with K no greater than N, n no greater than N, and k no greater than the smaller of n and K. The calculator returns not applicable if the inputs break these constraints.

Sources

Reviewed by the CalculatorHub team, edited by James Graham, 19 June 2026. See our methodology.