Hypergeometric Distribution Calculator (Without Replacement)

When you draw items without putting them back — cards from a deck, parts from a production lot — each draw changes the odds for the next one, and the binomial distribution no longer fits. This hypergeometric distribution calculator gives the probability of exactly k successes in n draws, the chance of at least one, and the expected number of successes.

calculated
calculated
calculated
calculated
Type in any field to change it. Press × on a value to calculate that field instead.

How to use the hypergeometric distribution calculator

Enter the population size N, the number of successes K in it, the number of draws n and the number of successes k you want in the draw. The calculator returns the probability of exactly k successes, the probability of at least one success, and the mean and standard deviation of the number of successes.

Hypergeometric formula

P(X = k) = C(K, k) × C(N − K, n − k) ÷ C(N, n)

μ = n K ÷ N  ·  σ² = n (K/N) (1 − K/N) (N − n) ÷ (N − 1)

Example

The chance of exactly one ace in a 5-card hand (N = 52 cards, K = 4 aces, n = 5, k = 1):

  • C(4, 1) × C(48, 4) = 4 × 194,580 = 778,320 favourable hands
  • C(52, 5) = 2,598,960 possible hands
  • P = 778,320 ÷ 2,598,960 = 29.95%
  • P(at least one ace) = 1 − C(48, 5) ÷ C(52, 5) = 34.12%
  • Expected aces = 5 × 4 ÷ 52 = 0.3846, standard deviation = 0.5720

Aces in a 5-card hand

Aces k Hands P(X = k) P(X ≤ k)
0 1,712,304 65.8842% 65.8842%
1 778,320 29.9474% 95.8316%
2 103,776 3.9930% 99.8245%
3 4,512 0.1736% 99.9982%
4 48 0.0018% 100.0000%

Notes

  • k cannot exceed K or n, and n − k cannot exceed N − K; such combinations have zero probability.
  • The counts use combinations — see the combinations calculator.

Frequently asked questions

What is the hypergeometric distribution formula?

P(X = k) = C(K, k) × C(N − K, n − k) ÷ C(N, n) — the ways to choose k of the K successes and n − k of the failures, divided by all ways to choose n items.

When should I use hypergeometric instead of binomial?

When sampling without replacement from a finite population. If the sample is less than about 5% of the population, the binomial distribution with p = K/N gives nearly the same answer.

What is the probability of being dealt exactly one ace in 5 cards?

C(4,1) × C(48,4) ÷ C(52,5) = 778,320 ÷ 2,598,960 ≈ 29.95%.

How is it used in quality control?

In acceptance sampling, a lot of N parts contains K defectives and you inspect n. P(X = 0) is the chance the sample shows no defects, so 1 − P(X = 0) is the chance of catching at least one.

Embed this calculator

Free to use on your website or blog. Copy this code: