BYTETOOLS

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.

0.27428
P(X = 2)
0.632953
P(X < 2)
0.907233
P(X ≤ 2)
0.092767
P(X > 2)
0.367047
P(X ≥ 2)

Distribution summary

1.25
Mean (nK/N)
0.863971
Variance
0.9295
Std deviation
0 – 5
Support of k

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)

0: 0.22153361341: 0.41141956782: 0.27427971193: 0.081542617054: 0.010729291725: 0.0004951980792012345

Probability table

kP(X = k)P(X ≤ k)
00.221533610.22153361
10.411419570.63295318
20.274279710.90723289
30.081542620.98877551
40.010729290.9995048
50.00049521

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. 1

    Enter the population size N.

  2. 2

    Enter K, the number of successes in that population.

  3. 3

    Enter n, the number of items you draw without replacement.

  4. 4

    Enter k, the number of successes you want the probability for.

  5. 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