Math calculator

Probability Calculator

Two events, repeated trials, and the test result nobody reads correctly.

Three questions the arithmetic gets wrong on its own

P(A or B) — at least one of them

70.0000%

P(A) + P(B) = 90.0000%, minus the overlap 20.0000%. Dropping that subtraction is the most common error in elementary probability, and the answer still looks like a probability.

P(A and B)

20.0000%

assuming independence

P(A or B)

70.0000%

P(neither)

30.0000%

P(A only)

30.0000%

P(B only)

20.0000%

P(A | B)

50.0000%

A, given B happened

These events are independent: P(A and B) equals P(A)⋅P(B) = 20.0000%, so P(A | B) = P(A) = 50.0000%. Knowing B happened tells you nothing about A. Note that independence is a statement about the overlap, not about the events being unable to co-occur — that would be mutual exclusivity, which is the opposite thing.

What this tool shows

Three specific errors, handled rather than described. The dropped overlap in P(A or B); multiplying n × p instead of taking the complement, which returns 100% for six rolls of a die; and the base rate that makes a 99%-sensitive test right 16.7% of the time.

  • P(A or B), P(A and B), P(neither), P(A | B)
  • Independence and mutual exclusivity, reported separately
  • A refusal when the probabilities describe no possible world
  • At least one success in n trials, via the complement
  • How many trials for a 50% or 95% chance
  • Bayes for a test result, counted in whole people
Impossible input refused Three modes Complement, not n×p Base rate handled

Mutually exclusive events with nonzero probability are never independent.

Updated 8 September 2026 · Works in any browser, no installation

Probability is the long-run share of times something happens, on a scale from 0 to 1. The arithmetic is simple; the errors come from combining events, and there are three that account for most of them.

At a glance

Formula shown
P(A or B) = P(A) + P(B) − P(A and B) — the subtraction is not optional. P(A and B) = P(A)·P(B) only when independent. P(at least one in n) = 1 − (1 − p)ⁿ, never n·p. P(A | B) = P(A and B)/P(B). Bayes: P(A | B) = P(B | A)·P(A)/P(B), which is why a test’s sensitivity is not its positive predictive value.
Scenario support
Combining two risks; “what are the chances it happens at least once”; reading a medical or drug test result; games and dice; reliability of a system with several components; deciding whether two events are genuinely independent.
Educational estimate
Planning support from the values you enter — not professional advice.

Mutually exclusive and independent are opposites

These two terms are used interchangeably more often than any other pair in elementary probability, and they mean nearly opposite things.

Mutually exclusive means they cannot both happen. P(A and B) = 0. A single coin flip cannot be both heads and tails.

Independent means one tells you nothing about the other. P(A and B) = P(A)⋅P(B). Two separate coin flips.

Two events with nonzero probability cannot be both, and the proof is one line. If they are mutually exclusive then P(A | B) = 0 — knowing B happened tells you A definitely did not, which is as informative as it gets. Independence would require P(A | B) = P(A), and P(A) is not zero. So mutual exclusivity is a strong dependence, the strongest kind.

Try it in the tool. Set P(A) = 0.3, P(B) = 0.4 and the overlap to 0. It reports mutually exclusive and not independent, and shows that independence would need an overlap of 0.12.

The practical consequence is which rule you may use. P(A or B) = P(A) + P(B) with no subtraction is valid only for mutually exclusive events. P(A and B) = P(A)⋅P(B) is valid only for independent ones. Applying either to the wrong pair is the error the tool exists to prevent, and it is silent — the answer stays between 0 and 1 and looks fine.

The subtraction, when it applies, is inclusion-exclusion. Add P(A) and P(B) and you have counted the overlap twice, so you subtract it once. With P(A) = 0.5, P(B) = 0.4 and an overlap of 0.2, the union is 0.7 rather than 0.9 — and 0.9 would be wrong by a fifth while still looking like a probability.

Never multiply n by p

“What are the chances it happens at least once in n tries?” is the most common practical probability question, and the instinctive answer is wrong in a way that is easy to demonstrate.

The instinct is n × p. One roll gives a 1-in-6 chance of a six, so four rolls give 4/6 = 66.7%. It is plausible and it is wrong.

Push it two more rolls and it collapses. Six rolls would give 6/6 = 100% — certainty of rolling a six in six rolls, which nobody believes. The true answer is 66.51%. The formula was already wrong at four rolls, where it gives 66.7% against the true 51.77%; it just had not yet produced an obviously impossible number.

The error is double-counting. Adding p once per trial counts the outcomes where you succeed twice as two separate successes, three times as three, and so on. Those overlaps are exactly what inclusion-exclusion subtracts, and with many trials there are too many overlaps to track.

The correct route is always the complement. Find the probability of no successes — a simple product, (1 − p)n, because failing every time requires failing each time independently — and subtract from 1. One multiplication and one subtraction, and it is exact at every n.

The birthday problem is the same calculation and the classic surprise. Twenty-three people give a 50.73% chance of a shared birthday, which feels far too high for 23 against 365. It is not, because the comparison is not people against days — it is pairs against days, and 23 people make 253 pairs. Intuition counts people; the arithmetic counts pairs, and pairs grow as the square. At 57 people the probability is 99%.

A 99% test that is right 17% of the time

This is the error with the highest cost attached, because it is made about medical results, security alerts and fraud flags by people acting on them.

A condition affects 1% of people. A test catches 99% of those who have it and correctly clears 95% of those who do not. You test positive. What is the chance you have it?

Most people answer 99%. The answer is 16.67%.

Count whole people rather than multiplying percentages and it becomes obvious. Take 10,000 people. 100 have the condition, and the test finds 99 of them. 9,900 do not, and the test wrongly flags 5% of them — 495 people. So 594 test positive and only 99 of them have it: 99/594 = 16.7%. There are five false positives for every true one.

The test is not bad. The base rate is low. When a condition is rare, the healthy majority is so much larger that even a small false-positive rate on it outnumbers the true positives from the affected minority. This is why population-wide screening for rare conditions produces mostly false alarms with an excellent test, and why the same test is genuinely useful on a high-risk group where prevalence is higher.

The underlying confusion is directional. Sensitivity is P(positive | has it). What a patient wants is P(has it | positive). These are different quantities, and Bayes’ theorem is the conversion between them — the base rate is the missing ingredient, which is why ignoring it is called the base rate fallacy.

Notice what the negative result is worth, though. The same test gives a negative predictive value of 99.99%. Ruling the condition out is exactly what it is good at, and that asymmetry is the real design of most screening programmes: a cheap test to clear the majority, a better test on whoever is left.

Some probabilities describe no possible world

Probabilities constrain each other, and a set of numbers can be individually reasonable and jointly impossible. Most calculators will happily process them.

The overlap can never exceed the smaller event. P(A and B) ≤ min(P(A), P(B)), because the intersection is contained in both. An overlap of 0.6 with P(A) = 0.4 is not unlikely, it is incoherent.

And when P(A) + P(B) exceeds 1, the events are forced to overlap. P(A and B) ≥ P(A) + P(B) − 1. With P(A) = 0.8 and P(B) = 0.7 the overlap must be at least 0.5, so a stated overlap of 0.1 describes nothing — the union would be 1.4. The tool refuses this and says which bound was broken.

These bounds are useful in their own right. When you know two marginal probabilities and not the joint one, they give the exact range the answer must lie in. If 80% of users are on mobile and 70% are returning visitors, then between 50% and 70% are both, whatever the dependence structure. That is a genuine conclusion from incomplete information.

The related habit worth building is checking that a set of probabilities sums correctly. The four cells of a two-event breakdown — both, A only, B only, neither — must sum to exactly 1. The tool prints all four, which makes an inconsistent set visible immediately rather than after it has propagated into a decision.

Independence is an assumption about the world

Every multiplication on this page rests on independence, and independence is not something the arithmetic can check. It is a claim about how the events are generated, and it is the assumption that fails most often and most expensively.

The failure is always in the same direction. Correlated events co-occur more than the product suggests, so multiplying probabilities understates the chance of everything going wrong at once. Two backup systems each 99% reliable give 99.99% only if their failures are unrelated — and if they share a power supply, a supplier or a design flaw, the real figure can be closer to 99%.

This is how risk models fail. Mortgage defaults were modelled as near-independent because historically they had been, and in a national downturn they were not. The arithmetic was correct throughout; the independence assumption was the entire error, and it made the tail look thousands of times thinner than it was.

Conditional independence is not independence either. Two events can be independent overall and strongly dependent within every subgroup, or the reverse. A naive Bayes classifier assumes features are conditionally independent given the class, which is almost always false and often works anyway — useful, but it means the probabilities it outputs are not calibrated.

The practical test is mechanical, not statistical. Ask what would make both events happen together. If you can name a shared cause — the same weather, the same supplier, the same person, the same day — they are not independent, whatever the sample correlation says. A correlation near zero is weak evidence of independence, since zero covariance does not imply independence.

Sources and methodology

References for the rules and the fallacies.

Method. The union is always computed as P(A) + P(B) − P(A and B), and independence is never assumed silently — when the overlap is not supplied the tool says it is assuming it. Independence and mutual exclusivity are computed and reported as separate facts, because they are near-opposites that are routinely conflated. Repeated trials use the complement, 1 − (1 − p)ⁿ, and the naive n⋅p is shown alongside specifically so it can be seen exceeding 1. Input is checked against the Fréchet bounds — the overlap cannot exceed the smaller event, nor fall below P(A) + P(B) − 1 — and impossible combinations are refused with the bound that was broken. The suite asserts that mutually exclusive events with nonzero probability are never independent, that n⋅p reaches exactly 1 at six rolls of a die where the truth is 0.665102, that the base-rate example returns a positive predictive value of exactly 1/6, and that the four-cell breakdown sums to 1 across ten thousand random inputs. That engine is verified on every change against 99 assertions. The count and the per-case breakdown are published on the formula verification page.

Related calculators

Where this goes next:

Binomial DistributionExact binomial probabilities at any n — including thousands, where a factorial overflows — with the normal approximation beside them and its error measured, which is 0.6% at the centre and 261% in the tail.
Beta DistributionTakes raw successes and failures and runs the conjugate update, so 5 out of 5 returns 6/7 rather than the 100% a plain proportion claims — with a credible interval that stays honest at zero.
Binomial Coefficientn choose k exactly on big integers, by the multiplicative formula that divides as it goes and never builds a factorial — with Pascal's rule and permutations beside it.
Normal DistributionProbabilities under a normal curve in all four directions with the region shaded — and the empirical rule given exactly, because two standard deviations is 95.45% and the 95% everyone quotes sits at 1.96σ.
Poisson DistributionPoisson probabilities with a dispersion test against your own variance — because a Poisson forces variance to equal the mean, and real count data usually does not, which is exactly where the tail goes wrong.
Geometric DistributionWaiting until the first success, with both conventions shown — and a panel that computes your remaining wait given past failures and from scratch, proving they are identical. The gambler's fallacy as arithmetic.

More in Math, or browse all calculators.

Educational use disclaimer

An educational tool. Independence is an assumption about the world, not a property the arithmetic can verify — and applying the independent-events rule to dependent events produces a plausible-looking answer with nothing to indicate the error.

How we calculate · Found an error? email us

Authorship & verification

Written and maintained by , a business operator who builds spreadsheet-based calculators.

What's changed (4 updates)

Published 8 September 2026

  1. Published a probability calculator covering two events, repeated trials and Bayes, each built around a specific error rather than a formula.
  2. Reports independence and mutual exclusivity as separate facts, because they are near-opposites used as synonyms: two events with non-zero probability that cannot both happen are necessarily dependent, which the suite proves by exhaustive search rather than by restating the definition.
  3. Uses the complement for 'at least one', never n times p. The naive form returns exactly 100% for six rolls of a die where the true answer is 66.51%, and it was already wrong at four rolls.
  4. Refuses probabilities that describe no possible world — P(A) = 0.8 with P(B) = 0.7 and an overlap of 0.1 breaks the Frechet bounds, and most calculators return an answer anyway.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.