About the Bayes' Theorem Calculator
Bayes' theorem shows how to update the chance of something after you see new evidence. It explains why a positive result from a good test can still be wrong most of the time when the condition is rare. Enter the prior probability, the chance of the evidence when the thing is true and the chance of the evidence when it is false. The calculator gives the updated probability, the overall chance of the evidence and a table of what happens to a population of people, so you can see the true and false positives in actual numbers. Everything is calculated in your browser.
Updated October 2026
How to use the Bayes' Theorem Calculator
- 1Type the prior: how common the thing is before any evidence.
- 2Type the chance of the evidence when it is true, for example a test's sensitivity.
- 3Type the chance of the evidence when it is false, the false positive rate.
- 4Choose the number of people to imagine, such as 10,000.
- 5Read the updated probability and the table.
The classic example
Imagine a disease that affects 1 in 100 people and a test that catches 90 percent of cases but also flags 9 percent of healthy people. Out of 10,000 people, 100 are ill and 90 of them test positive. Of the 9,900 healthy people, 891 also test positive. So a positive result means a real case in only 90 out of 981 positives, around 9 percent.
The surprise comes from ignoring the prior. The population table on this page puts the four groups side by side, so the answer is easy to see and explain to someone else.
Tips for using Bayes well
- Start with a fair prior based on data, not a guess.
- Use percentages from the same population as your case.
- Run both the positive and the negative result to see how much each moves the odds.
- Update step by step: the posterior becomes the next prior.
- Be careful with very small percentages and round only at the end.
Related tools
The Probability Calculator handles basic chances, the Expected Value Calculator weighs outcomes by their likelihood and the Binomial Distribution Calculator counts successes over many trials. If you need to judge a difference between groups instead, the Chi-Square Calculator tests counts. Probabilities describe uncertainty, they do not remove it.
Features
- Posterior probability after positive evidence
- Chance of the evidence overall
- Chance after negative evidence
- Population table of true and false positives
- Works for tests, spam filters and diagnoses
- Clear checks for percentages out of range
- Private and free
Frequently asked questions
What is Bayes' theorem?
It states that the probability of A given B equals the chance of B given A, times the chance of A, divided by the chance of B. It tells you how to turn a prior belief into an updated one.
What is the prior?
The prior is how likely you thought it was before the new evidence, for example how common a disease is in the population you are testing.
Why can a positive test still be wrong?
If the condition is rare, even a small false positive rate produces more false alarms than real cases. With a 1 percent prior, 90 percent hit rate and 9 percent false alarm rate, only about 9 percent of positives are real.
What are sensitivity and false positive rate?
Sensitivity is the chance a test is positive when the person has the condition. The false positive rate is the chance it is positive when they do not.
Can I use it for a spam filter?
Yes. The prior is the share of mail that is spam, the hit rate is how often a word appears in spam and the false alarm rate is how often it appears in normal mail.
Is the result medical advice?
No. It is a probability exercise. Real diagnoses depend on more than one number, so speak to a doctor about any test result.
Why must the evidence be possible?
If both the hit rate and the false alarm rate are zero the evidence can never occur, so there is nothing to update.