Bayes Update Calculator
A test catches 99% of cases and only wrongly flags 5% of healthy people. You test positive. Most people, including most professionals asked in studies, guess the chance you have it is around 95%. For a condition affecting 1 in 100, the real answer is about 17%. The reason is that the false positives outnumber the true ones when the condition is rare, and the fix is to count people rather than multiply probabilities — which is exactly what this shows.
What this generator does
Applies Bayes' theorem, and also lays the same calculation out as natural frequencies — how many of 10,000 people fall into each of the four groups. The frequency form is not decoration: people reliably get the probability version wrong and the counted version right, so both are shown together.
How to use this tool
- Enter how common the condition is in the group being tested.
- Enter the test's sensitivity and specificity.
- Read the chance after a positive result — and after a negative one.
- Change the base rate and watch how much the answer moves.
Understanding the controls
- How common it is
- The base rate in the population being tested. This matters more than test accuracy and is the number people leave out.
- Sensitivity
- Of people who have it, the share who test positive. A high figure here is what makes a test feel trustworthy.
- Specificity
- Of people who do not have it, the share who correctly test negative. A few percent of false positives across a large healthy majority is what swamps the result.
Common use cases
- Understanding a screening result before panicking about it
- Explaining false positives to someone who finds the probability form slippery
- Deciding whether a rare-condition screen is worth running at all
- Teaching Bayes' theorem with counts instead of algebra
- Checking how much a symptom-driven higher prior changes the answer
How this generator works
The population is split into four groups — has it and tests positive, has it and tests negative, does not have it and tests positive, does not have it and tests negative — and the answer is simply the true positives divided by all positives. The four groups are checked to add back up to the population before display.
Randomness and fairness
Nothing here is random. The same three inputs always give the same answer, which is what a calculator should do.
For how randomness is produced across the whole site, see how Generate Random works.
Limitations and good to know
- It assumes the person was drawn at random from the population you described. Someone tested because they have symptoms has a much higher prior and a very different answer.
- Sensitivity and specificity are treated as fixed and known. In practice both are estimates with their own uncertainty.
- It covers one test. Two tests in sequence are not independent in the way a naive repeat would assume.
- It is a maths tool and not medical advice; a real result should be discussed with a clinician.
Privacy and your data
The figures you enter are used only for arithmetic in your browser. Nothing is transmitted, logged or stored between visits.
Related generators
- Probability Tree GeneratorExpands stages of chances into every possible path, with probabilities that multiply along each one and sum to exactly 100%.
- Confidence Interval CalculatorTurn a count out of a sample into an interval, with a warning when the sample is too small for the usual approximation to be trusted.
- Expected Value CalculatorThe long-run average of a set of weighted outcomes, with the variance beside it — and a note when the average is a result you can never get.