Hypergeometric Distribution Calculator
Enter N, K, n and k for the hypergeometric distribution.
Result
How it is calculated
Draws are made without replacement from a population of N items, of which K are successes. The probability of getting exactly k successes in n draws is P(X = k) = C(K, k) × C(N − K, n − k) ÷ C(N, n), where C(a, b) is the number of ways to choose b items from a. The numerator counts the samples with k successes and n − k failures, the denominator counts all possible samples. The second result is the mean, n × K ÷ N. Only the probability of exactly k is given, not 'k or more' or 'k or fewer'; add up the exact probabilities yourself for those. All four inputs must be whole numbers, with K ≤ N, n ≤ N, k ≤ n and k ≤ K, and the population must hold at least n − k failures, otherwise no result is shown. Population sizes in the thousands or millions work (up to 1 billion); the probability is shown to four decimals.
Worked example
A 52-card deck has 13 hearts. Draw 5 cards: what is the chance of exactly 2 hearts? N = 52, K = 13, n = 5, k = 2. Ways to choose 2 hearts: C(13, 2) = 78. Ways to choose the other 3 cards from the 39 non-hearts: C(39, 3) = 9,139. Total 5-card hands: C(52, 5) = 2,598,960. So P = 78 × 9,139 ÷ 2,598,960 = 712,842 ÷ 2,598,960 = 0.2743. The mean number of hearts is 5 × 13 ÷ 52 = 1.25.
Common mistakes
- Using it when items are put back after each draw: with replacement the draws are independent and the binomial distribution applies, not this one.
- Entering K as a percentage or a probability instead of a count of success items in the population; all four inputs must be whole numbers, so a k of 2.5 gives no result.
- Reading the result as 'at least k': the tool gives exactly k, so for 2 or more hearts you must add the probabilities for 2, 3, 4 and 5.
- Swapping n and k, so that the sample size is the number of successes wanted; n is how many you draw, k how many of those should be successes.
- Entering a sample the population cannot supply, such as k larger than n or K, or more failures than the population contains (N = 52, K = 13, n = 45, k = 2); such combinations give no result.
About this calculator
The hypergeometric distribution gives the probability of drawing exactly k successes in n draws taken without replacement from a finite population of size N that contains K successes overall. It differs from the more familiar binomial distribution precisely because each draw changes the population left behind — once you have pulled a winning ticket out of a jar, it is gone, and the odds for the next draw shift accordingly.
This makes it the right model for situations like drawing cards from a single deck without putting them back, quality-control auditors pulling a sample of items from a finished production batch to check for defects, lottery and raffle odds, and ecologists estimating a wild population's size using capture-recapture methods, where the same “sampling without replacement” logic applies to marked versus unmarked animals.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Be the first to comment.