Binomial Distribution Calculator

Binomial PMF and cumulative probability.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Enter the number of trials n, the number of successes k and the success probability p. For 10 fair coin flips, P(exactly 3 heads) is 0.117188.

How to use

1
Step 1
Enter n, the number of trials.
2
Step 2
Enter k, the number of successes.
3
Step 3
Enter p, the chance of success each trial.
4
Step 4
Press Calculate.

How it works

Use it when each trial has two outcomes, trials are independent and p stays the same. P(X = k) = C(n, k) pᵏ (1 − p)ⁿ⁻ᵏ. For n = 10, k = 3 and p = 0.5 that is 120 × 0.5¹⁰ = 120 ÷ 1024 = 0.117188. The tool also gives the cumulative P(X ≤ k).

P(X = k) = C(n, k) pᵏ (1 − p)ⁿ⁻ᵏ      mean = np      variance = np(1 − p)

Worked example

Twenty trials at 30%

Input
n = 20, k = 5, p = 0.3
Output
P(X = 5) = 0.178863; P(X ≤ 5) = 0.416371
Walkthrough
C(20, 5) = 15,504; 0.3⁵ = 0.00243; 0.7¹⁵ = 0.004748. Multiplying: 15,504 × 0.00243 × 0.004748 = 0.1789.

Limitations

  • p must be between 0 and 1, and n must be a whole number. Large n (such as 100,000) is supported.
  • A k larger than n is not an error; it returns probability 0 for exactly k and 1 for at most k.

Questions

What is P(X = 3) for n = 10 and p = 0.5?
0.117188.
What is P(X ≤ 3) for n = 10 and p = 0.5?
0.171875.
What is P(X = 2) for n = 5 and p = 0.16667?
0.160756, the chance of exactly two sixes in five die rolls.
What is P(X = 5) for n = 20 and p = 0.3?
0.178863.

Features

  • Exact and cumulative probability
  • Any n and p
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Vectors | Essence of linear algebra

    3Blue1Brown

    Linear algebra intuition for matrix and vector tools.

    Watch on YouTube
  • Standard Deviation - Explained and Visualized

    Jeremy Blitz-Jones

    Visual SD intuition for probability and stats tools.

    Watch on YouTube