Binomial Distribution Calculator
Binomial PMF and cumulative probability.
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
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?
What is P(X ≤ 3) for n = 10 and p = 0.5?
What is P(X = 2) for n = 5 and p = 0.16667?
What is P(X = 5) for n = 20 and p = 0.3?
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 YouTubeStandard Deviation - Explained and Visualized
Jeremy Blitz-Jones
Visual SD intuition for probability and stats tools.
Watch on YouTube
- Math | Khan Academy
Khan Academy
Practice paths when a tool result needs more drill.
- Introductory Statistics
OpenStax
Free textbook for descriptive stats and inference.