Probability Calculator
Compute probabilities of single events, combined independent events (A and B, A or B, exactly one) and binomial outcomes – with formulas and clear explanations.
Single event probability
Use this mode when all outcomes are equally likely (for example, cards, dice, lotteries).
Number of outcomes that count as “success”.
Total number of equally likely outcomes in the sample space.
Result
- Fraction P(A):
- —
- Decimal P(A):
- —
- Percentage P(A):
- —
- Complement P(Ac):
- —
Combined independent events
Use this mode for independent events A and B, such as two separate dice rolls or two unrelated conditions.
Probability of event A in percent (0–100).
Probability of event B in percent (0–100).
Assumes A and B are independent. “A or B” is inclusive (either A, or B, or both).
Result
- Combined probability:
- —
- Percentage:
- —
Choose A and B, then pick a combination to see the formula and result.
Binomial probability
Use this mode for repeated independent trials with the same probability of success (e.g. number of heads in coin tosses).
Total number of independent trials.
Same for every trial (0–100%).
Value for which you want the probability.
X follows a binomial distribution X ∼ Bin(n, p).
Result
- Probability:
- —
- Percentage:
- —
- Mean μ = np:
- —
- Variance σ² = np(1 − p):
- —
Enter n, p and k, choose P(X = k), P(X ≤ k) or P(X ≥ k), then click calculate.
What is probability?
In basic probability theory, the probability of an event A is a number between 0 and 1 that measures how likely it is for A to occur. For experiments with equally likely outcomes, the probability is defined as
P(A) = \(\dfrac{\text{number of favourable outcomes}}{\text{total number of possible outcomes}}\)
A probability of 0 means the event is impossible, 1 means it is certain, and values in between represent varying degrees of likelihood (for example 0.25 = 25%).
Single event probabilities
For a single event with equally likely outcomes, you can work directly with counts of favourable and total outcomes. Typical examples include:
- Rolling a fair die.
- Drawing a card from a shuffled deck.
- Selecting a random item from a batch of products.
If you roll a fair six-sided die and ask for the probability of getting a 4, there is 1 favourable outcome and 6 possible outcomes:
P(\{4\}) = \(\dfrac{1}{6} \approx 0.1667 = 16.67\%\).
The complementary event “not 4” has probability P(Ac) = 1 − P(A), which the calculator also reports.
Combined independent events
When dealing with two independent events A and B, we often want probabilities of combinations such as “A and B” or “A or B”. Independence means that the occurrence of one does not change the probability of the other.
Key rules for independent events
- P(A \cap B) = P(A) P(B) (“A and B”).
- P(A \cup B) = P(A) + P(B) − P(A) P(B) (“A or B”, inclusive).
- P(\text{exactly one}) = P(A \cup B) − P(A \cap B).
- P(A \cap B^c) = P(A) (1 − P(B)) (“A and not B”).
The Combined events mode implements these formulas after converting your input percentages to probabilities between 0 and 1.
Binomial probability: repeated trials
The binomial distribution models the number of successes in a fixed number of independent trials, each with the same probability of success p. If X ∼ Bin(n, p), then the probability of exactly k successes is
P(X = k) = \(\binom{n}{k} p^k (1 - p)^{n-k}\),
where \(\binom{n}{k} = \dfrac{n!}{k!(n-k)!}\) is the binomial coefficient “n choose k”.
The calculator uses this formula and computes cumulative probabilities: P(X ≤ k) and P(X ≥ k) by summing the appropriate binomial terms. It also reports the mean and variance:
\(\mu = E[X] = np,\quad \sigma^2 = Var(X) = np(1 - p)\).
Worked example: binomial
Suppose you toss a fair coin 10 times and ask: “What is the probability of getting exactly 3 heads?” Here n = 10, p = 0.5, k = 3, so
P(X = 3) = \(\binom{10}{3} 0.5^3 0.5^7 = \binom{10}{3} 0.5^{10} = 120 \cdot \dfrac{1}{1024} \approx 0.1172\).
That is about 11.72%. Enter n = 10, p = 50% and k = 3 in the binomial panel and choose P(X = k) to verify.
FAQ – Probability calculator
Can I mix percentages and decimals?
For single events you work with counts of outcomes. For combined and binomial modes, enter probabilities as percentages (for example 25 for 25%). Internally the calculator converts them to decimals between 0 and 1 before applying the formulas.
What is the difference between “A or B” and “exactly one of A or B”?
“A or B” is inclusive: A, or B, or both. “Exactly one of A or B” excludes the case where both events occur. The calculator computes both options for independent events.
When should I use the binomial mode instead of the single event mode?
Use the single event mode when you are interested in a one-shot experiment with equally likely outcomes. Use the binomial mode when you repeat the same trial multiple times and want the distribution of the number of successes (e.g. “at least 2 defective items in a sample of 20”).
Are the results exact?
The results are computed using floating-point arithmetic, which is standard in numerical software. For moderate values of n and typical probabilities, the rounding error is negligible for applied work, but very small or very large probabilities may suffer from numerical underflow or rounding.