How to use it
- Enter the Chance of the condition in all cases, the share of cases that have it.
- Enter the Chance of a positive result when the condition is present, from the test or the source you use.
- Enter the Chance of a positive result when the condition is absent.
- Read Chance of the condition given a positive result, then open Working to see each product and the total.
How Bayes' theorem is applied
Bayes' theorem turns the chance of a positive result, given the condition, into the chance of the condition, given a positive result. It needs the prior chance of the condition and the chance of a positive result in both groups.
The total chance of a positive result is the sum of the two groups that test positive. The posterior chance is the part of that total that comes from the group with the condition.
P(C | +) = P(+ | C) × P(C) ÷ P(+)
P(+) = P(+ | C) × P(C) + P(+ | not C) × P(not C)
C the condition is present
+ the result is positive
What the result means
- A high posterior needs a high sensitivity and a low false positive rate, and a condition that is not too rare.
- When the condition is rare, even a good test gives many positive results from people without it, so the posterior can be small.
- The result depends on the three chances you enter. Check that they describe the same group of cases.
What this calculator does not cover
- Two tests in a row, or results that are not a simple positive or negative.
- Chances that change over time or differ between groups in a way the three numbers do not show.
- Any decision based on the result. The calculator gives a probability, not advice.
Worked example: a quality check on a part
Suppose 2% of parts are defective, the check flags 95% of defective parts, and it also flags 5% of good parts. The chance of a flag is 2% × 95% + 98% × 5% = 1.9% + 4.9% = 6.8% of all parts.
Of all parts, the flagged ones that are defective are 1.9%. So the chance that a flagged part is defective is 1.9% ÷ 6.8% = 27.94%.
| Result | Value |
|---|---|
| Chance of a positive result in all cases | 6.80% |
| Chance of the condition given a positive result | 27.94% |
Frequently asked questions
What is a posterior probability?
It is the probability of a condition after you have seen the evidence. Here the evidence is a positive result, and the posterior is the chance that the condition is present given that result.
Why is the answer often much smaller than the sensitivity?
When the condition is rare, the cases without it are so many that their false positives can outnumber the true positives. The posterior then depends mostly on how rare the condition is.
What is the difference between sensitivity and the posterior?
Sensitivity is the chance of a positive result when the condition is present. The posterior is the chance of the condition when the result is positive, which also depends on how common the condition is.
Can I use percentages that do not add up to 100?
The three chances are independent inputs, so they need not add up to anything. Each must be between 0% and 100%, and the chance of a positive result must not be zero, or no posterior exists.
Does the calculator send my numbers anywhere?
No. The calculation runs in your browser, and nothing you enter is stored or sent to us.
Sources
Figures and text last checked on Thursday, November 12, 2026.