Probability Calculator
Free probability calculator: compute single events, AND/OR for independent events, complements, percent chance, and odds — with Kolmogorov axioms.
Probability Calculator
Background.
The Quanta probability calculator handles the four operations that make up the core of every introductory probability course: a single event P(A), the joint probability of two independent events P(A and B), the probability that at least one of two independent events occurs P(A or B), and the complement P(not A) = 1 − P(A). Pick the mode, enter your probabilities as decimals between 0 and 1, and the calculator returns the raw probability, the same value expressed as a percent chance, the complement, and the odds — all four representations you might need to communicate the answer to a different audience.
Probability is, at its foundation, simpler than most people remember from school. Andrey Kolmogorov's 1933 monograph Grundbegriffe der Wahrscheinlichkeitsrechnung distilled the entire subject into three axioms: every event has a probability that is at least zero, the probability of the certain event (the whole sample space) is exactly one, and the probability of a union of disjoint events is the sum of their individual probabilities. Every rule the calculator above implements — multiplication for independent events, inclusion-exclusion for unions, the complement rule — follows from those three axioms by a few lines of algebra.
The thing that goes wrong, over and over, when people try to compute probabilities in real life is not the arithmetic. It is one of two confusions about what the inputs actually mean. The first confusion is between independent events and mutually exclusive events. Two events are independent when knowing one occurred tells you nothing about whether the other did — a coin flip in Nairobi and a die roll in Mombasa, or two successive spins of a roulette wheel. Two events are mutually exclusive when they cannot both happen at the same time — rolling a 1 and rolling a 6 on a single die, or the same horse finishing both first and second. Independent AND is multiplication: P(A and B) = P(A) · P(B). Mutually exclusive OR is plain addition: P(A or B) = P(A) + P(B). General OR for events that are neither necessarily independent nor mutually exclusive needs inclusion-exclusion: P(A or B) = P(A) + P(B) − P(A and B). Confusing these is how people end up claiming a 'fifty-fifty' probability for the wrong question.
The second confusion is the gambler's fallacy — the belief that a streak of one outcome makes the opposite outcome 'due'. If a fair coin lands heads ten times in a row, the eleventh flip is still 50/50. Independence is a permanent property of the random mechanism, not a tendency that fixes itself over time. The misconception arises because in the long run heads and tails do balance out to roughly 50/50 by the law of large numbers, but the balancing happens by overwhelming the streak with a much larger volume of subsequent flips, not by the coin remembering its past behaviour.
A related confusion is base rate neglect: if a medical test for a rare disease is 99% accurate and you test positive, your actual probability of having the disease can still be under 10% if the disease is rare enough — because the false positives from the healthy 99.9% of the population outnumber the true positives from the sick 0.1%. Bayes' rule formalises the correction: posterior odds = prior odds × likelihood ratio. The probability calculator above does not implement full Bayesian updating, but it does give you the odds representation that makes Bayesian reasoning natural — odds multiply, probabilities do not, which is why every Bayesian statistician quietly works in odds-space and only converts back to probabilities at the end for human consumption.
The remaining gotcha is the difference between probability and percentage. A probability of 0.25 and a percent chance of 25% are mathematically identical, but the percent form invites a category error: weather forecasts that say '30% chance of rain' are reporting a probability, not a fraction of the sky that will be wet or a fraction of the day during which it will rain. The calculator returns both representations so you can pick whichever one your audience understands without ambiguity. Worked examples below cover the canonical classroom problems — two fair coins both landing heads (probability 0.25, or 25%), at least one head out of two coins (probability 0.75, or 75%), rolling a six on a fair die (1/6 ≈ 16.67%, odds 1:5 against) — alongside notes on when to convert to odds and when to leave the answer as a probability, the difference between independent and mutually exclusive events spelled out with examples, a short note on conditional probability and Bayes' rule for the curious, and the reasons why even an apparently simple probability question can have the wrong answer if you mis-identify the underlying experiment.
What is probability calculator?
Probability is the formal mathematical measure of how likely an event is to occur, expressed as a number between 0 (impossible) and 1 (certain). The modern definition is due to Andrey Kolmogorov, whose 1933 monograph Grundbegriffe der Wahrscheinlichkeitsrechnung set out the three axioms that define a probability measure: non-negativity (every event has probability ≥ 0), normalisation (the whole sample space has probability 1), and countable additivity (the probability of a union of pairwise disjoint events is the sum of their probabilities). Every other rule in elementary probability is a theorem derivable from those three axioms. The complement rule, P(not A) = 1 − P(A), comes from applying additivity to A and its complement (which together cover the entire sample space). The general addition rule for any two events, P(A or B) = P(A) + P(B) − P(A and B), comes from inclusion-exclusion — subtract the intersection because it has been counted twice. Independence is a separate definition layered on top of the axioms: two events A and B are independent if and only if P(A and B) = P(A)·P(B). When that condition holds the addition rule simplifies to P(A or B) = P(A) + P(B) − P(A)·P(B), which is the formula the calculator uses for independent-or mode. Conditional probability is defined as P(A | B) = P(A and B) / P(B), and Bayes' theorem rearranges that into P(A | B) = P(B | A)·P(A) / P(B), giving the canonical recipe for updating a prior belief in light of new evidence. Odds are an equivalent representation: the odds in favour of A are P(A) / (1 − P(A)), and odds against are the reciprocal. Bookmakers, geneticists, epidemiologists, and Bayesian statisticians all prefer odds because Bayes' rule on odds is multiplicative: posterior odds = prior odds × likelihood ratio, no division required. Convert between probability and odds with p = odds / (1 + odds), and odds = p / (1 − p). The two representations carry exactly the same information; which to use is a question of audience, not mathematics.
How to use this calculator.
- Pick the mode that matches your question. 'Single event' just echoes P(A) back with its complement, percent, and odds — useful when you want the percent or odds form of a probability you already know. 'Both events occur (independent)' multiplies P(A) and P(B). 'At least one occurs (independent)' applies the addition rule with the independence simplification. 'Complement' returns 1 − P(A).
- Enter probabilities as decimals between 0 and 1, not percentages. A 25% chance is 0.25, not 25. The calculator rejects values outside [0, 1] because they cannot be valid probabilities — a 'probability' of 1.5 or −0.1 is a sign that you converted units incorrectly or are using the wrong rule.
- Confirm your events really are independent before using the AND or OR modes. Two coin flips, two die rolls, two roulette spins — yes. The two halves of a tennis match, the two legs of a parlay where the same team plays both, two stock returns on the same trading day — no. If the events influence each other you need conditional probability instead, which means computing P(A) and P(B | A) separately and multiplying, not P(A) · P(B).
- Read the percent output when you are presenting the result to a non-technical audience and the raw probability when you are feeding it into another formula. 0.25 and 25% are the same number; using the wrong representation in a calculation (multiplying by 100 twice, or forgetting to divide) is one of the most common arithmetic mistakes in applied probability.
- Use the odds output when the question is naturally about betting, risk ratios, or Bayesian updating. Odds of 4 (often written 4:1 on) mean the event is four times more likely to happen than not; odds of 0.25 (1:4 against) mean it is four times more likely not to happen than to happen. Conversion: odds = p / (1 − p); p = odds / (1 + odds).
- Apply the complement output as a sanity check. Probability + complement must equal exactly 1 — if you can compute the complement more easily than the event itself, do that and subtract. The classic example is 'at least one head in ten flips of a fair coin': the complement is 'no heads at all' = (1/2)^10 ≈ 0.000977, so the answer is 1 − 0.000977 ≈ 0.999, which is much easier than summing ten binomial terms.
The formula.
Four formulas cover every mode of the calculator, all derivable from Kolmogorov's three axioms. Single event: result = P(A). Nothing to compute beyond unit conversions — this mode exists so you can quickly translate a known probability into the percent, complement, and odds forms. AND for independent events (multiplication rule): result = P(A and B) = P(A) · P(B). The rule follows directly from the definition of independence: two events A and B are independent if and only if P(A ∩ B) = P(A)·P(B). It does not apply when A and B influence each other — for dependent events you need the general multiplication rule P(A and B) = P(A) · P(B | A) instead, which requires the conditional probability and is not what this mode computes. OR for any two events (inclusion-exclusion): P(A or B) = P(A) + P(B) − P(A and B). The intersection is subtracted because it would otherwise be counted once in P(A) and again in P(B). When A and B are independent this becomes result = P(A) + P(B) − P(A)·P(B), which is the formula used by the calculator's independent-or mode. When A and B are mutually exclusive the intersection is empty and the formula collapses to P(A or B) = P(A) + P(B), but this calculator does not assume mutual exclusivity — if your events are mutually exclusive, set their joint probability to zero by setting one of them to zero and adding manually, or use single mode on each and add. Complement rule: result = P(not A) = 1 − P(A). This is an immediate consequence of normalisation: A and its complement together make up the whole sample space, which has probability 1. Once result is known the calculator derives three secondary outputs: resultPercent = result × 100 (the same number in percent form), complement = 1 − result (the probability the event does not occur), and odds = result / (1 − result) (the ratio form used by bookmakers and Bayesians). The odds output is capped at 1×10^308 when result = 1, to keep the JSON serialisable; treat that sentinel as 'infinite odds' meaning certainty. All arithmetic runs through Decimal.js to avoid IEEE-754 rounding artefacts that would otherwise make 0.1 + 0.2 read as 0.30000000000000004 in the result panel.
A worked example.
Worked example: flip two fair coins. What is the probability that both land heads? Each coin lands heads independently with probability 0.5, so P(A and B) = 0.5 × 0.5 = 0.25. The calculator returns result = 0.25, resultPercent = 25%, complement = 0.75 (the probability that at least one of the two flips is tails), and odds = 0.333 (one in three, or 1:3 against). Switch the mode to 'At least one occurs (independent)' with the same inputs and you get a different question: what is the probability of at least one head out of two flips? Inclusion-exclusion gives P(A or B) = 0.5 + 0.5 − 0.5·0.5 = 0.75 (75%, complement 0.25, odds 3:1 on). Sanity check: 'at least one head' is the complement of 'no heads at all' = 0.5·0.5 = 0.25, so 1 − 0.25 = 0.75 confirms the answer. Try a single-die example: probability of rolling a six is 1/6 ≈ 0.1667. Put 0.1667 into single mode and the calculator returns result ≈ 0.1667, resultPercent ≈ 16.67%, complement ≈ 0.8333 (the probability of rolling something other than six), and odds ≈ 0.2 — usually quoted as 1:5 against, which matches the intuition that there are five non-six outcomes for every six outcome on a fair die.
Frequently asked questions.
What is the difference between independent and mutually exclusive events?
How do I calculate the probability of A and B when they are not independent?
What is Bayes' theorem and when do I need it?
When should I convert a probability to odds, and which way around is 1:5 versus 5:1?
Is probability the same thing as percent chance?
What is the gambler's fallacy and why is it wrong?
What is base rate neglect and how does it affect probability calculations?
Can a probability be greater than 1 or less than 0?
How do I compute the probability that at least one of several independent events occurs?
Why do I get strange decimal artefacts like 0.30000000000000004 in some online probability calculators?
References& sources.
- [1]Kolmogorov, A.N. (1933). Grundbegriffe der Wahrscheinlichkeitsrechnung (Foundations of the Theory of Probability). Ergebnisse der Mathematik. Springer, Berlin. The monograph that introduced the modern axiomatic foundation of probability theory.
- [2]Feller, W. (1968). An Introduction to Probability Theory and Its Applications, Volume 1, 3rd edition, Chapter I: 'The Sample Space'. John Wiley & Sons, New York. The canonical introductory treatment of sample spaces, the addition and multiplication rules, and independence.
- [3]Casella, G. & Berger, R.L. (2002). Statistical Inference, 2nd edition, Chapter 1: 'Probability Theory'. Duxbury / Cengage, Pacific Grove, CA. The standard graduate textbook treatment of Kolmogorov's axioms, conditional probability, and Bayes' rule.
- [4]Ross, S.M. (2019). A First Course in Probability, 10th edition. Pearson, New York. A widely-adopted undergraduate text covering independence, the inclusion-exclusion principle, and worked examples on coin flips, dice, and card draws.
- [5]Laplace, P.-S. (1814). Essai philosophique sur les probabilités (A Philosophical Essay on Probabilities). Mme Ve Courcier, Paris. The first systematic non-technical exposition of probability, introducing the classical (equally-likely-outcomes) definition and the principle of insufficient reason.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 313 calculators remain free
- No billing is enabled