Hypergeometric Distribution Calculator

Calculate the probability of drawing k successes in a sample taken without replacement.

Runs in your browser. Your files never leave your device. See how to check

…

How to do it

  1. 1
    Step 1: Open Hypergeometric Distribution Calculator and add your input

    Type your numbers or text, add your file, or pick the options you need. Nothing is uploaded: everything stays in your browser.

  2. 2
    Step 2: What Hypergeometric Distribution Calculator does

    Calculate the probability of drawing k successes in a sample taken without replacement.

  3. 3
    Step 3: Read the result and compare

    The result appears at once. Change one value to see how the answer moves, then keep the figure that fits your case.

  4. 4
    Step 4: Copy or save it

    Copy the result or download it. For an important decision, confirm it with the official source or an adviser.

About this tool

Enter the population size, the number of successes in the population, the sample size and the number of successes k you are asking about. The calculator gives P(X = k), P(X ≤ k), P(X ≥ k) and the mean.

Formula

P(X = k) = C(K, k) × C(N − K, n − k) ÷ C(N, n), where N is the population size, K the number of successes in it, n the sample size and k the number of successes in the sample. The mean is n K ÷ N.

Use

Sampling without replacement from a small population: cards in a hand, defective items in a lot, winning tickets in a draw. It differs from the binomial because each draw changes the odds.

Example

The chance of exactly 2 hearts in a 5-card hand from a 52-card deck is 27.4%.

Worked example

Drawing 5 cards from a 52-card deck with 13 hearts: P(exactly 2 hearts) = 0.27428, P(at most 2) = 0.907233 and the expected number of hearts is 1.25.

Tips for best results

Check every box before you rely on a result, because one wrong digit changes the whole answer. Use the exact figures from your payslip, bill, certificate or contract, and keep a note of the date you calculated. Rates, thresholds and rules change from time to time, so for tax, fees and legal matters treat the output as an estimate and confirm with the official source named on this page. You can run as many scenarios as you like; nothing is saved or sent, and refreshing the page clears the boxes.

Quick facts

Embed this calculator on your site

Copy this code to show the calculator on your own page. A link back to shobfree.com is included.

Frequently asked questions

How does it differ from the binomial?

Draws are without replacement, so the probability changes each time.

When is the binomial a good approximation?

When the sample is a small part of the population.

What is the largest population?

Up to one million.

What is k?

The number of successes you are asking about.

Guides for this tool

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages