← Math & statistics

Hypergeometric calculator (without replacement)

Calculate exact hypergeometric probabilities for draws without replacement, including queries such as N=60, K=35, n=15, P(X=10), tail values, and ranges.

Everything runs locally in your browser (no sign-in). Use simulation (Monte Carlo) to build intuition and compare theory vs. empirical results.

How to use (3 steps)

  1. Enter N (population), K (successes), and n (draws)
  2. Select “Exactly / ≤ / ≥ / Range” and enter k (or a,b), for example k=10
  3. Check the result and distribution, then verify with simulation if needed
Other languages 日本語 | English | 简体中文 | 繁體中文 | 繁體中文(香港) | Español | Português (Brasil) | Bahasa Indonesia | 한국어 | Français | Italiano | हिन्दी | العربية

Inputs

Query
Presets:
Helpers:

Results

Probability
Support (valid k)
Mean
Variance
Method
PMF formula

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

Tip: “at least one” is P(X≥1)=1−P(X=0).

Distribution (PMF table & bar chart)
kP(X=k)CDF
Simulation (Monte Carlo)

Use trials and seed to reproduce runs. For large ranges, the tool bins the histogram to stay fast.

Estimated probability
Abs error vs theory
Rel error vs theory
Sample mean
Sample variance

Worked examples & interpretation

What the inputs mean

When to use this (vs. binomial)

Worked examples (try the presets)

N=60, K=35, n=15 — probability of exactly 10 successes

Set N=60, K=35, n=15, choose “Exactly: P(X = k)”, and enter k=10. This answers the common query P(X=10) for a finite population with 35 success items in 60 total items.

Cards: draw 5 from 52, how likely to get exactly 2 aces?

Set N=52, K=4, n=5, query “Exactly” with k=2.

Inspection: 10 defectives in 100, sample 8 — probability of at least 1 defective?

Set N=100, K=10, n=8, query “At least” with k=1.

“At least one” quickly (complement trick)

Compute P(X ≥ 1) = 1 − P(X = 0). You can also use the helper button “P(X≥1)”.

Common pitfalls

References

How to use this calculator effectively

Use this calculator when samples are drawn without replacement from a finite population. Define population size, success count, draw size, and the target success count before interpreting any tail probability.

How it works

The page evaluates the hypergeometric probability mass and cumulative tails from combinations. It keeps the finite-population assumption explicit, so compare scenarios by changing N, K, n, or k one at a time and watching how the exact probability and expected successes move.

When to use

Use it for quality-control sampling, card or lottery-style draws, classroom probability checks, and risk thresholds where items are not returned after each draw. If draws are independent or effectively with replacement, compare against a binomial model instead.

Common mistakes to avoid

Interpretation and worked example

For N=60, K=35, n=15, P(X=10), choose the exact query and set k=10. Then compare P(X≤10) and P(X≥10) only if the question asks for a cumulative threshold rather than exactly 10 successes.

See also

FAQ

How do I calculate P(X=10) for N=60, K=35, n=15?

Enter N=60 for the population size, K=35 for successes in the population, n=15 for draws, choose Exactly: P(X = k), and enter k=10. The calculator returns P(X=10) with the valid support, mean, variance, and PMF table.

How do I set inputs?

Set population size N, number of success items K, draw size n, and target success count k (or a range) before checking tails and cumulative values.

Why does this differ from binomial?

Binomial assumes independent draws with a fixed success probability, often because sampling is with replacement or the population is very large. Hypergeometric handles finite population depletion and is accurate for sampling without replacement.

How should I interpret the tail result?

Tail results summarize “at least / at most” scenarios and are useful for risk checks, thresholds, and decision boundaries.

Can I use results for decisions?

Use them as a quantitative signal for scenario comparison, then validate against context assumptions and operational limits before final decisions.

Related

How it’s calculated

  • PMF: C(K,k)·C(N−K,n−k)/C(N,n) computed in log-space for stability.
  • Support range: k_min=max(0,n−(N−K)), k_max=min(n,K).
  • Simulation uses a deterministic PRNG with optional seed and compares estimates to theory.