Introduction
A hypergeometric distribution tells you the chance of getting a certain number of successes when you draw items from a group without putting them back. For example, if you pull 7 cards from a deck of 52, what is the chance that exactly 4 of them are red? That is a hypergeometric probability problem.
This hypergeometric calculator solves problems like that for you. Enter four numbers: the total population size (N), how many items count as successes (K), how many items you draw (n), and the number of successes you want to find the probability for (k). The calculator does the rest. It gives you the exact probability as a decimal, a percentage, and a fraction. It also shows a step-by-step solution, a full probability distribution table, and charts of the probability mass function (PMF) and cumulative distribution function (CDF).
You can choose from four calculation modes. Exact finds P(X = k), the chance of getting exactly k successes. Cumulative finds P(X ≤ k), the chance of getting k or fewer. At Least finds P(X ≥ k), the chance of getting k or more. Range finds the chance that the number of successes falls between two values you pick. Use the preset buttons to load common examples and see how it works right away.
How to Use Our Hypergeometric Calculator
Enter a few numbers about your population and sample below. The calculator will give you the exact probability of getting a certain number of successes when you draw items without replacement. You will also get charts, a step-by-step solution, and a full distribution table.
Calculation Mode: Pick the type of probability you want to find. Choose Exact for the chance of getting exactly k successes, Cumulative for k or fewer, At Least for k or more, or Range to set a lower and upper bound.
Population Size (N): Enter the total number of items in the whole group you are drawing from. For example, a standard deck of cards has 52.
Success States (K): Enter how many items in the population count as a success. This must be a whole number from 0 up to N.
Draws / Sample Size (n): Enter how many items you draw from the population. You can also use the slider to adjust this value. It cannot be more than N. If you need help figuring out how many items to draw for a study, a sample size calculator can help you decide.
Observed Successes (k): Enter the number of successes you want to find the probability for. This value cannot be more than n. If you chose Range mode, enter a Minimum (x₁) and a Maximum (x₂) instead.
Press the Calculate button to see your results. Press Reset to clear everything and start over. You can also click any Example Preset to load a common scenario instantly.
What Is the Hypergeometric Distribution?
The hypergeometric distribution tells you the probability of getting a certain number of successes when you draw items from a group without putting them back. This is different from flipping a coin or rolling dice, where the odds stay the same each time. When you draw without replacement, each draw changes the odds of the next one.
A Simple Example
Imagine a bag with 52 marbles — 26 are red and 26 are blue. You reach in and pull out 7 marbles without looking. What are the chances that exactly 4 of them are red? That is the kind of question the hypergeometric distribution answers.
The Four Numbers You Need
Every hypergeometric problem uses four values:
- N (Population Size) — The total number of items in the whole group.
- K (Success States) — How many items in the group count as a "success."
- n (Draws) — How many items you pull out.
- k (Observed Successes) — The number of successes you want to find the probability for.
When Is This Used?
The hypergeometric distribution shows up any time you pick a sample from a fixed group and do not replace what you pick. Common uses include:
- Card games — Finding the odds of drawing a certain hand from a deck. Tools like a poker odds calculator or a blackjack calculator rely on this same sampling-without-replacement logic.
- Quality control — Checking a batch of products for defects by testing a small sample.
- Ecology — Estimating animal populations using capture-recapture methods.
- Lottery and raffles — Calculating your chances of picking winning tickets. You can also explore general dice probability problems for other games of chance.
How It Differs from the Binomial Distribution
The binomial distribution assumes each trial has the same probability of success. That works when you replace items or when the population is very large. The hypergeometric distribution does not make that assumption. It accounts for the fact that each draw shrinks the pool, so the probability shifts slightly every time. This makes it more accurate for small populations or sampling without replacement. For very large populations, the hypergeometric distribution approaches the binomial, and both can be approximated by the normal distribution.
The Formula
The probability of getting exactly k successes is calculated as:
P(X = k) = C(K, k) × C(N − K, n − k) / C(N, n)
Here, C(a, b) means "a choose b" — the number of ways to pick b items from a items, also known as a combination. Each combination is computed using factorials, where C(a, b) = a! / (b! × (a − b)!). The numerator counts every favorable outcome, and the denominator counts every possible outcome. Dividing one by the other gives you the exact probability. The result section of this calculator displays the answer as a decimal, a percentage, and a fraction so you can use whichever format you prefer.