Part of the Maths & Statistics suite · 235 calculators

Bayes' Theorem Calculator

Turn a base rate and a test's accuracy into the probability that actually matters — the chance the condition is present given a positive result.

Bayes' theorem is P(H | E) = P(E | H) P(H) ÷ P(E), where P(E) expands to P(E | H)P(H) + P(E | not H)P(not H).

%
%
%
Results update as you type
Results
P(condition | positive test)
50%
P(no condition | negative test)
P(condition | negative test) — a missed case
P(testing positive at all)
Positive likelihood ratio
Negative likelihood ratio
True positives per 1,000 tested
False positives per 1,000 tested
Reviewed September 2026. Pure mathematics: the result does not depend on where you are. Terminology follows the Australian Curriculum (maths, brackets, decimal point).
No account required · Google Analytics off unless allowedCalculator arithmetic runs in your browserResults update as you type
All calculations run 100% in your browser. The calculator code does not submit your figures to GlobalCalc to obtain a result.
About bayes' theorem

How the bayes' theorem calculator works

Bayes' theorem is P(H | E) = P(E | H) P(H) ÷ P(E), where P(E) expands to P(E | H)P(H) + P(E | not H)P(not H). Given a prevalence, a sensitivity (true-positive rate) and a specificity (true-negative rate), it returns the positive and negative predictive values.

The famous result: a 99%-accurate test for a condition affecting 1 in 1,000 people gives a positive result that is wrong about 90% of the time, because the false positives from the vast healthy majority swamp the true positives.

Formula: PPV = sens × prev / (sens × prev + (1 − spec)(1 − prev))

Worked examples

InputsP(condition | positive test)Note
1% prevalence, 99% accurate both ways50%a positive is right exactly half the time
0.1% prevalence9.0164%a positive is right only about 9%
Common condition (20%)96.1165%PPV rises above 96%

Frequently asked questions

What is Bayes' theorem?

A rule for updating a probability when new evidence arrives: the prior, multiplied by how well the evidence discriminates, renormalised.

Why is a 99% accurate test so often wrong?

Because accuracy is measured against the condition, not against the population. If only 1 in 1,000 has it, the 1% false positives from the other 999 outnumber the true positives ten to one.

What is the difference between sensitivity and PPV?

Sensitivity is P(positive | condition) — a property of the test. PPV is P(condition | positive) — what you actually want, and it depends on prevalence.

Does this apply outside medicine?

Everywhere: spam filters, fraud detection, security screening and forensic evidence all have the same structure.

What is a likelihood ratio?

How many times more likely a positive result is in someone with the condition than without. Above 10 is strong evidence; near 1 is none.

Where these figures come from

Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.