Hypergeometric Distribution Calculator
Probability of drawing exactly k successes in n draws without replacement from a population of N items containing K successes.
How it works
P(X = k) = C(K,k) · C(N−K, n−k) ÷ C(N,n)
Sampling without replacement changes the odds after every draw, so the binomial formula does not apply. The hypergeometric distribution counts the ways to pick k successes and n−k failures, over all ways to pick n items. Log-factorials keep the arithmetic stable for large populations.
Worked example
Five cards from a 52-card deck, exactly 2 hearts: C(13,2)·C(39,3) ÷ C(52,5) = 78 × 9,139 ÷ 2,598,960 = 0.274.
Frequently asked questions
When can I use binomial instead?
When n is under about 5% of N, replacement barely matters and the binomial with p = K/N is a close approximation.
What are typical uses?
Card and lottery odds, quality-control sampling from a batch, capture–recapture ecology and Fisher’s exact test.
Related calculators
For education — check assumptions (sample size, distribution) before using statistics in real decisions.