StatisticsCALCULATOR LAB

Hypergeometric Distribution Calculator

Calculate probabilities when drawing items from a finite population without replacement. Enter the population size, number of successes, and sample size to find exact, cumulative, or range probabilities, with a distribution chart and step-by-step explanation.

01 / YOUR INPUTSCalculated in your browser

Calculate Hypergeometric Probability

Try an example:
Total number of items before sampling.
Number of items with the characteristic you are counting.
Number of items drawn without replacement.
Number of successes in the sample.

Valid range: max(0, n − (N − K)) ≤ X ≤ min(n, K).

Whole-number parameters through 1 billion; at most 20,001 feasible outcomes. Impossible event counts return zero where appropriate.
02 / YOUR RESULT

Your Hypergeometric Probability

Enter your values, or choose an example. No result is calculated until you select the calculation button.

What Is a Hypergeometric Distribution?

The hypergeometric distribution models the number of successes in a sample drawn without replacement from a finite population. The population contains a fixed number of successes and failures, and each possible sample of the chosen size is equally likely. Because selected items are not returned, the composition of the remaining population changes after each draw.

How to Use This Hypergeometric Calculator

Enter the total population size, the number of successful items in that population, and the number of items drawn. Choose whether you want exactly, at most, at least, or a range of successes. The calculator shows the probability, highlights the relevant outcomes in the distribution chart, and explains the calculation.

Hypergeometric Distribution Formula

The probability of exactly k successes is the number of ways to choose k successful items and n−k unsuccessful items, divided by the number of ways to choose any n items from the population.

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

μ = nK/N; σ² = n(K/N)(1−K/N)(N−n)/(N−1) for N > 1. For N = 1 the distribution is degenerate and its variance is zero.

Valid support: max(0, n−(N−K)) ≤ X ≤ min(n,K). Impossible integer event counts have probability zero; they are not invalid population configurations.

Hypergeometric vs. Binomial Distribution

Both distributions count successes, but their sampling assumptions differ. A binomial model describes independent trials with a constant success probability. A hypergeometric model describes sampling without replacement from a finite population, so the available mix of successes and failures changes after each draw.

For independent trials with constant success probability, use the Binomial Distribution Calculator.

Assumptions and Limitations

The calculation assumes a finite population with a known number of successes, a random sample without replacement, and equally likely subsets of the selected size. It does not describe drawing with replacement or a process in which selection probabilities depend on additional factors.

Population sizes are supported through 1,000,000,000, with at most 20,001 feasible outcomes. No normal approximation is substituted. Probabilities are numerical evaluations of the exact distribution, not exact rational arithmetic. At most 121 outcomes are drawn and 201 table rows displayed; the selected result uses the complete supported distribution. Extremely small positive probabilities are identified using their logarithms rather than described as mathematical zero.

Worked Hypergeometric Examples

These examples use illustrative data, not your current inputs.

Example 1: Exactly Two Successful Items

A box contains 20 items, including 7 marked items. Five items are selected randomly without replacement. The probability of selecting exactly 2 marked items is C(7,2)C(13,3)/C(20,5) ≈ 0.387384, or 38.7384%.

Example 2: At Least Two Successful Items

Using the same population and sample, the probability of at least 2 marked items is the sum of the probabilities for X = 2 through X = 5. The result is approximately 0.594169, or 59.4169%.

Example 3: Drawing Aces

A standard deck contains 52 cards and 4 aces. If 5 cards are drawn without replacement, the probability of drawing exactly 2 aces is C(4,2)C(48,3)/C(52,5) ≈ 0.039930.

Frequently Asked Questions

What does a hypergeometric distribution calculate?

It gives the probability of obtaining a particular number of successes when items are drawn without replacement from a finite population containing a fixed number of successes.

How is the hypergeometric distribution different from binomial?

The hypergeometric distribution uses sampling without replacement. The binomial distribution models independent trials with a constant success probability. Removing items changes the remaining population, which is why the hypergeometric model is different.

How do I calculate at least k successes?

Add the hypergeometric probabilities for every possible success count from k through the maximum feasible count. The calculator performs that sum automatically.

What does K mean in the formula?

K is the number of successful items in the entire population before sampling. It is different from k, the number of successes in the selected sample.

Can the number of successes start above zero?

Yes. If the sample is larger than the number of failures in the population, some successes are unavoidable. The minimum possible number of successes is max(0, n−(N−K)).

Does the calculator support cumulative probabilities?

Yes. You can calculate probabilities for at most, fewer than, at least, more than, between, or outside specified success counts.

What does sampling without replacement mean?

Once an item is selected, it is not returned to the population before the next draw. Each selection therefore changes the remaining number of successes and failures.

Can hypergeometric probabilities be greater than one?

No. Every valid probability is between zero and one. The probabilities over all feasible success counts sum to one, apart from negligible numerical rounding.

Sources and Methodology

A mode-centered adjacent-PMF recurrence builds the complete supported distribution in logarithms. Log-sum-exp normalization and direct selected-event summation avoid huge factorials and small-tail subtraction. Mean, variance, support, and degenerate cases are independently tested against integer-combination probabilities.

Reviewed: October 2026. Calculations run in your browser. No signup, upload, or server-side data processing is required. Read our methodology.