Bayes Theorem Calculator
Turn a test result into a real posterior probability.
Reviewed by James Whitfield · How we check our maths
Your values
ⓘ Live results
Results
- P(condition | positive test)
- 16.102%
- P(condition | negative test)
- 0.0531%
- Probability of a positive test
- 5.9%
- Share of positives that are false
- 83.9%
- Specificity
- 95%
- Positive likelihood ratio
- 19
Quick answer
Bayes' theorem updates a prior with new evidence: P(A|B) = P(B|A)·P(A) ÷ P(B), which is why a positive test on a rare condition is often still a false alarm.
The formula
P(A|B) = P(B|A)·P(A) ÷ P(B)
Worked example
Worked example
Using the values the calculator loads with.
Inputs
- Prior probability (base rate)1 %
- Sensitivity — true positive rate95 %
- False positive rate5 %
Result
- P(condition | positive test)16.102%
- P(condition | negative test)0.0531%
- Probability of a positive test5.9%
- Share of positives that are false83.9%
- Specificity95%
- Positive likelihood ratio19
How to use the Bayes Theorem Calculator
- 1Enter how common the condition is in the population you are testing.
- 2Enter the test's sensitivity and false positive rate.
- 3Read the posterior — the real chance the result is true.
Frequently asked questions
Why is a 95% accurate test often wrong?
With a 1% base rate, the far larger healthy group generates more false positives than the small sick group generates true ones.
How do I improve the posterior?
Test a higher-risk group (raising the prior) or retest — a second independent positive multiplies the likelihood ratio.
About this calculator
- Built and reviewed by James Whitfield · How we build and test calculators
- Report an error