Exact probability for single and combined events, Bayes' theorem, binomial, dice and coins, permutations and combinations, and expected value, with steps.
Probability from counts, odds or a percentage; complement; repeated trials
Leave the optional fields empty if you only want the single-event result. Trials are assumed independent.
Fill in the fields above, or pick an example, to see the answer with its working.
This calculator's method was checked against the sources below on .
Computes exact probabilities for a single event, two combined events, conditional and Bayes problems, binomial, hypergeometric, Poisson and geometric distributions, dice and coins, counting (permutations and combinations) and expected value. Answers are shown as a fraction, a decimal and a percentage, with the working.
P(A or B) = P(A) + P(B) − P(A and B) P(A and B) = P(A) × P(B | A) (× P(B) if independent) P(A | B) = P(B | A) × P(A) ÷ P(B) Binomial: P(X = k) = C(n, k) pᵏ (1 − p)ⁿ⁻ᵏ At least one in n trials: 1 − (1 − p)ⁿ nPr = n! ÷ (n − r)!, nCr = n! ÷ (r! (n − r)!)
P(A)probability of event A, from 0 (impossible) to 1 (certain)P(B | A)probability of B once A is known to have happenedn, p, knumber of trials, success probability per trial, number of successesn, ritems available and items chosen in a counting problemUse the addition rule: P(A or B) = P(A) + P(B) − P(A and B). Subtracting the overlap stops it being counted twice. If A and B are mutually exclusive the overlap is 0, so you simply add. Example: a card is a heart or a king: 13/52 + 4/52 − 1/52 = 16/52 = 4/13.
Independent events do not affect each other, such as two coin flips, so P(A and B) = P(A) × P(B). Dependent events do, such as drawing two cards without replacement, so P(A and B) = P(A) × P(B | A). Mutually exclusive events (cannot both happen) are never independent unless one has probability 0.
P(A | B) = P(B | A) × P(A) ÷ P(B), where P(B) adds up every way B can occur. When A is rare, false alarms from the large "not A" group can outnumber true cases even if P(B | A) is high. Example: with a 1% base rate, 90% true-positive rate and 9% false-positive rate, P(A | B) is only 10/109, about 9.2%. This is a generic illustration, not medical advice.
Compute the chance that every try fails and subtract it from 1: P(at least one) = 1 − (1 − p)ⁿ. At least one six in 4 rolls is 1 − (5/6)⁴ = 671/1296 ≈ 51.77%. Multiplying n × p is wrong here and can exceed 100%.
The chance of exactly k successes in n independent trials that each have the same success probability p: P(X = k) = C(n, k) pᵏ (1 − p)ⁿ⁻ᵏ, with mean np and variance np(1 − p). "At most", "at least" and "between" are sums of these terms. If you sample without replacement from a small population, use the hypergeometric distribution instead.
Permutations count ordered selections, nPr = n!/(n − r)!; combinations count unordered groups, nCr = n!/(r!(n − r)!). Choosing 3 of 10 people for gold, silver and bronze is 720 permutations, but choosing a 3-person committee is 120 combinations. With repetition allowed the counts are nʳ (ordered) and C(n + r − 1, r) (unordered).
Probabilities from fractions, decimals, percentages, binomial, dice, hypergeometric, geometric and Bayes are computed with exact integer arithmetic and only rounded for display. Counts such as 52! are exact integers (shown in full on request). Only the Poisson distribution uses floating point, about 12 significant digits, because it involves e.
Probability compares "for" with everything: 1 chance in 4 is 25%. Odds compare "for" with "against": the same event has odds of 1 : 3. Odds of 1 : 1 mean a 50% chance. The calculator converts between odds, fractions, decimals and percentages.