Bayes Theorem Calculator
Turn a test result into a real posterior probability.
Enter your values
Enter the prior probability (base rate) in %.
Enter the sensitivity — true positive rate in %.
Enter the false positive rate in %.
Results update instantly as you type — no submit needed. Your values are remembered on this device, and the shareable link reopens the calculator with exactly these numbers.
- 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.
P(A|B) = P(B|A)·P(A) ÷ P(B)
At a glance
| What it does | Turn a test result into a real posterior probability. |
|---|---|
| Category | Statistics |
| Inputs needed | Prior probability (base rate), Sensitivity — true positive rate, False positive rate |
| Main output | P(condition | positive test) |
| Formula | P(A|B) = P(B|A)·P(A) ÷ P(B) |
| Cost | Free — no sign-up, no download |
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.
Inputs explained
- Prior probability (base rate)(%)
- Enter the prior probability (base rate) in %.
- Sensitivity — true positive rate(%)
- Enter the sensitivity — true positive rate in %.
- False positive rate(%)
- Enter the false positive rate in %.
Worked example
Using the values the calculator loads with:
Inputs
- Prior probability (base rate)1 %
- Sensitivity — true positive rate95 %
- False positive rate5 %
Results
- 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
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.
What do I need to enter into the Bayes Theorem Calculator?
Just 3 values: prior probability (base rate), sensitivity — true positive rate, false positive rate. Every field starts with a realistic example, so you can change one number at a time and watch the result update instantly.
How does the Bayes Theorem Calculator work out the 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. It applies the formula P(A|B) = P(B|A)·P(A) ÷ P(B) and shows the working so you can check each step by hand.
Is the Bayes Theorem Calculator free, and do I need an account?
It is completely free with no sign-up, no download and no usage limit. Everything is calculated in your browser, so the numbers you type never leave your device.
Results are estimates for general information. For medical, legal, structural or financial decisions, confirm with a qualified professional.