Hypergeometric Distribution Calculator
Calculate probabilities for sampling without replacement: P(X = k), cumulative tails, mean and variance with the finite population correction, plus a chart.
Distribution summary
P(X = k) = C(13, 2) · C(39, 3) / C(52, 5) = 0.27427971
Sampling is without replacement, so the variance carries the finite population correction (N − n)/(N − 1) = 0.921569. With replacement you would use the binomial instead, whose variance is n·p·(1−p) = 0.9375.
Probability mass (k = 2 highlighted)
Probability table
| k | P(X = k) | P(X ≤ k) |
|---|---|---|
| 0 | 0.22153361 | 0.22153361 |
| 1 | 0.41141957 | 0.63295318 |
| 2 | 0.27427971 | 0.90723289 |
| 3 | 0.08154262 | 0.98877551 |
| 4 | 0.01072929 | 0.9995048 |
| 5 | 0.0004952 | 1 |
What is the Hypergeometric Distribution Calculator?
The ByteTools Hypergeometric Distribution Calculator handles sampling without replacement, where every item you draw changes the odds for the next one.
- Exact P(X = k) plus P(X < k), P(X ≤ k), P(X > k) and P(X ≥ k)
- Mean nK/N and variance with the finite population correction
- Shows the support of k, which is often narrower than 0 to n
- Log-factorial evaluation so large populations stay accurate
- Side-by-side comparison with the binomial variance
- Runs 100% in your browser — nothing is uploaded
How to use the Hypergeometric Distribution Calculator
- 1
Enter the population size N.
- 2
Enter K, the number of successes in that population.
- 3
Enter n, the number of items you draw without replacement.
- 4
Enter k, the number of successes you want the probability for.
- 5
Read P(X = k), the cumulative tails, the mean and variance, then use the chart and table for the whole distribution.
About the Hypergeometric Distribution Calculator
The ByteTools Hypergeometric Distribution Calculator handles sampling without replacement, where every item you draw changes the odds for the next one. Enter the population size, how many successes it contains, how many items you draw and how many successes you are asking about, and the exact probability appears along with all four cumulative tails.
This is the right distribution for card hands, lottery draws, quality-control sampling from a finished batch and capture-recapture estimates — any situation where the population is finite and items are not put back. Drawing exactly 2 hearts in a 5-card poker hand, for instance, has probability 0.2743.
Probabilities are computed with log-factorials so even large populations do not overflow, and the variance is shown together with the finite population correction that separates it from the binomial equivalent. Everything runs inside your browser, none of your numbers are uploaded anywhere, and the page carries on working offline.
Frequently asked questions
What is the difference between the hypergeometric and binomial distributions?
The binomial assumes sampling with replacement, so the success probability is the same on every draw. The hypergeometric assumes sampling without replacement, so each draw changes the pool. When the sample is small relative to the population the two give nearly identical answers.
How do you calculate hypergeometric probability?
Multiply the number of ways to pick k successes from the K available by the number of ways to pick the remaining n − k items from the N − K failures, then divide by the number of ways to pick any n items from N. This tool evaluates those combinations with log-factorials so nothing overflows.
What is the finite population correction?
It is the factor (N − n)/(N − 1) that shrinks the variance compared with the binomial. Sampling without replacement from a small population gives you more information per draw, so the results vary less. As N grows large the correction approaches 1 and the two distributions converge.
Why can't k always be zero?
If your sample is bigger than the number of failures in the population, you are forced to draw some successes. The lowest possible k is n − (N − K), and the tool shows this support range so you can see when a value you asked about is impossible rather than merely unlikely.
Can I use this for lottery or card game odds?
Yes, those are the classic applications. Set N to the deck or ticket pool size, K to how many of the item you care about exist, n to how many you draw, and k to how many you are hoping for. Two hearts in a five-card hand is N = 52, K = 13, n = 5, k = 2.
Related tools
Binomial Distribution Calculator
Compute binomial probabilities P(X=k), P(X≤k) and P(X≥k) for n trials with success chance p, plus the distribution's mean, variance and standard deviation.
Poisson Distribution Calculator
Calculate Poisson probabilities for a given rate: P(X = k), cumulative tails, range probabilities, mean and variance, with a bar chart and full probability table.
Geometric Distribution Calculator
Work out geometric probabilities using either convention: trials until the first success or failures before it. Includes CDF, mean, variance and a bar chart.
Permutation & Combination Calculator
Calculate permutations (nPr) and combinations (nCr) instantly from n and r, with the factorial formulas shown. Free online nPr and nCr calculator.
Probability Calculator
Work out probabilities for one or two events: complement, union, intersection, conditional probability and the chance of at least one success in n trials.