Binomial Distribution Calculator
Calculate binomial distribution probabilities for exactly, at most, at least, or a range of successes, plus the mean, variance, standard deviation, mode, median, skewness, and kurtosis, from n and p.
https://hexacalculator.com/calculators/mathematics/statistics/binomial-distribution-calculator
Mathematics
Statistics
Binomial Distribution Calculator
Calculate binomial distribution probabilities for exactly, at most, at least, or a range of successes, plus the mean, variance, standard deviation, mode, median, skewness, and kurtosis, from n and p.
Binomial Distribution Calculator
Binomial inputs
- P(X = k)
- P(X < k)
- P(X ≤ k)
- P(X > k)
- P(X ≥ k)
Distribution plots
The binomial distribution is a probability distribution that describes the number of successes in a fixed number of independent trials where each trial has an equal probability of success. It is one of the most useful discrete distributions in statistics and can be used to calculate, for example, the probability of getting exactly a certain number of heads when flipping a coin multiple times or the probability of having a certain number of defective products in a batch of manufactured goods.
This calculator allows you to compute individual probabilities for exactly k successes, all forms of cumulative probability (maximum, minimum, less than, greater than and between), critical values corresponding to a target probability as well as summary measures of this distribution.
What is a Bernoulli trial?
If all four of these conditions are met then the situation is a binary model.
An experiment consists of a fixed number of repetitions, denoted by n.
The results of each trial are only two types: success or failure.
The probability of success is denoted by "p" and is the same for all attempts.
Since each individual series of tests is independent of the others, one result does not affect another.
A classic example is the repeated throwing of a coin. If one were to throw a fair coin ten times and count "heads" as success, then n = 10 and p = 0.5. The number of heads obtained follows a binomial distribution.
The formula for binomial distribution is:
The probability of getting exactly k successes in n trials is the product of the number of ways to choose the successful trials, multiplied by the probability of a single success raised to the power of the number of successes, and the probability of failure raised to the power of the number of failures.
The first factor is a binomial coefficient, which counts the number of different ways that k successes can be achieved in n trials.
The cumulative probability is the sum of individual probabilities. The probability that there are at most k successes is calculated by adding up the probabilities from 0 to k, and similar cumulative forms can be obtained in this way.
How to use this calculator:
Enter the number of trials and probability of success and choose what to compute.
In the "Probability" mode you can select a probability type and check the exact probability of the selected event. The help card shows the whole breakdown at once, so that you can see P(X=k) and all cumulative forms simultaneously. In the "Threshold" mode you enter a target cumulative probability to get the minimum number of successes where this cumulative probability reaches the target value for the first time. This is the threshold used in hypothesis tests. In the "Distribution indicators" mode you can check the mean, variance, standard deviation, mode, median, skewness and kurtosis simultaneously. The two charts below always show the current probability density function and the cumulative distribution function.
Example:
Suppose you want to calculate the probability of getting exactly 3 heads on 5 tosses of a fair coin. In this case n = 5, p = 0.5 and k = 3. There are 10 possible combinations that contain the desired number of successes (heads). These results come from 5 trials. Multiplying these numbers by the probability of being successful 3 times and unsuccessful 2 times gives you a probability of 0.3125, or 31.25%. This is represented in the formula below.
Mean, variance and standard deviation:
The average value, i.e. the expected number of successes, is the product of the number of attempts and the probability of success.
Variance measures the spread of results while standard deviation is the square root of variance.
If you flip a fair coin 10 times, the expected value is 5 successes, the variance is 2.5, and the standard deviation is about 1.58. The mode is the most common number of successes and equals the rounded result of (n + 1) multiplied by p.
Form and normal approximation
When p is equal to 0.5 the distribution is symmetric about the mean. When p is less than 0.5 the distribution is skewed right and when it's greater than 0.5 it's skewed left. The shape gets closer to a bell curve as more trials are performed.
If both the product of n and p and the product of n and (1 − p) are at least 5, then the binomial distribution is sufficiently approximated by a normal distribution with equal mean and standard deviation. This is why this approximation for hypothesis tests for proportions is used in large sample sizes for confidence intervals. In rare cases where p is very small and n is very large, a Poisson distribution with rate n multiplied by p will give a better approximation.
Examples of common parameter values
The table below shows the probability of exactly k successes for some common scenarios.
n | p | k | P(X = k) |
|---|---|---|---|
5 | 0.5 | 3 | 0.3125 |
10 | 0.5 | 5 | 0.2461 |
10 | 0.1 | 0 | 0.3487 |
20 | 0.3 | 6 | 0.1916 |
12 | 0.25 | 3 | 0.2581 |
Application examples for binomial distribution:
The binomial distribution can be used anywhere that it is necessary to count the number of successes. In quality control, it is used to model the number of defective products in a sample. In opinion polls, it is used to model the number of people who support a particular candidate. Geneticists use it to model the number of offspring with a particular trait, and clinical trials use it to model the number of patients who respond to a particular treatment.
The binomial distribution also forms the basis for many of the statistical concepts you will learn later. A sample proportion is a newly calculated binomial value and the normal approximation to the binomial distribution is used in this format when it comes to hypothesis tests for proportions and their confidence intervals.
Frequently asked questions
- Is a binomial distribution discrete or continuous?
It is a discrete distribution. The random variable represents the number of successes and therefore takes only integer values from 0 to the number of trials.
- How do you calculate the mean of a binomial distribution?
The probability of success is multiplied by the number of trials. The mean is the product of n and p. With 20 trials (and a probability of success of 0.3), the expected number of successes is 6.
- How do you calculate standard deviation of a binomial distribution?
First you calculate the variance by multiplying n times p times one minus p and then take the square root of that. So for example if n is equal to 10 and p is equal to 0.5, then the variance would be 2.5 and the standard deviation would be about 1.58.
- What is the probability of having 3 successes in 5 attempts with a success rate of 0.5?
Use the formula for binomial distribution: P(X=k). This calculates the product of the number of possible ways to select k elements from n multiplied by p raised to the power of k and then multiplied again by the value obtained from 1 minus p, raised to the power of the number of items that are deducted from n. If n is equal to 5, k is equal to 3 and p is equal to 0.5 there are 10 possible ways to achieve success. Multiplying this with the probability of being successful three times and unsuccessful twice gives a value of 0.3125 which is approximately 31.25%.
- What is the difference between a single binomial probability and a cumulative binomial probability?
The individual probability, P(X=k), gives the likelihood of exactly k successes. The cumulative probabilities are sums of multiple probabilities; for example, P(X<=k) represents the chance of at most k successes while P(X>=k) is the probability of at least k successes. This calculator displays both exact probabilities and all forms of cumulatives simultaneously.
- When should one use a normal distribution to approximate a binomial distribution and when not?
It is appropriate to use a normal approximation when both n multiplied by p and n multiplied by (1-p) are at least 5. If this condition is not met or an exact answer is desired then the binomial probabilities should be used directly. This is what this calculator computes.
Related calculators






Disclaimer: This calculator is provided for general informational and educational purposes only. Our calculators are under active development, and results may be inaccurate, incomplete, or unsuitable for your situation. Always verify the figures independently and seek advice from a qualified professional before relying on them. We make no warranties and accept no liability for any loss or decision arising from use of this tool.
References
- Wikipedia: Binomial distribution
Definition, probability mass function, moments, and properties of the binomial distribution.
- Wolfram MathWorld: Binomial Distribution
Formula reference for the mass function, cumulative function, and moments.
- NIST/SEMATECH e-Handbook of Statistical Methods: Binomial Distribution
Standard reference on the binomial distribution and its use in reliability and quality.