Statistics & Probability · Formula v1.0

Bayes' Theorem Calculator

Calculate the chance of a condition after a positive or a negative test from prevalence, sensitivity and false positive rate.

LAST REVIEWEDSeptember 24, 2026Inputs stay in your browser
Live calculation

Enter your numbers

Calculated result
Chance of the condition after a positive test15.4%
Chance of a positive test overall5.9%
Chance of the condition after a negative test0.106%
Sensitivity check

What if prevalence (prior chance) changes?

-10% input14.1%
0% input15.4%
+10% input16.7%

Answer first

What this calculator tells you

Calculate the chance of a condition after a positive or a negative test from prevalence, sensitivity and false positive rate. See why a positive result on a good test can still mean a low chance of the condition when it is rare. Formula: P(condition | positive) = sensitivity × prevalence ÷ [sensitivity × prevalence + false positive rate × (1 − prevalence)]. At the worked-example inputs, the chance of the condition after a positive test is 15.4%. Holding every other input steady, moving prevalence (prior chance) from 0.500% to 1.5% moves the result from 8.3% to 21.5%.

FreeNo sign-upInputs stay in-browserCSV exportReviewed September 24, 2026

Transparent method

The formula

P(condition | positive) = sensitivity × prevalence ÷ [sensitivity × prevalence + false positive rate × (1 − prevalence)]Enter prevalence (prior chance) in percent, sensitivity in percent and false positive rate in percent (1 means 1%).

See why a positive result on a good test can still mean a low chance of the condition when it is rare.

Worked example

Chance of the condition after a positive test15.4%
Chance of a positive test overall5.9%
Chance of the condition after a negative test0.106%

Example inputs

Prevalence (prior chance)1.0%
Sensitivity90.0%
False positive rate5.0%

How to interpret the result

Bayes' theorem updates a probability when new evidence arrives, and it shows how much the starting rate matters. With a condition affecting 1 percent of people, a test that is 90 percent sensitive and gives 5 percent false positives returns a positive result that means only about a 15 percent chance of the condition. Most positives come from the 99 percent who are healthy, since 5 percent of a large group beats 90 percent of a small one.

At the worked-example inputs the chance of the condition after a positive test is 15.4%. It rises with prevalence (prior chance) and sensitivity and falls as false positive rate increases.

Interpretation boundary

These are standard formulas from introductory statistics. Real-world inference depends on assumptions, normality, independence, a genuinely random sample, that this calculator does not check for you.

Before you rely on it

What to check

Use the prevalence for the group being tested. A person with symptoms starts from a much higher prior than one tested at random, and the same test means more for them.

The common error

Where people go wrong with bayes' theorem calculator

Reading sensitivity as the chance of having the condition after a positive test. Those are different numbers, and mixing them up is one of the most common errors in medical testing.

Sensitivity evidence

How prevalence (prior chance) changes the chance of the condition after a positive test

Holding every other input at the worked-example value, moving prevalence (prior chance) from 0.500% to 1.5% moves the chance of the condition after a positive test from 8.3% to 21.5%: a spread of 13.2%, or 86% of the worked-example result.

Bayes' Theorem Calculator: chance of the condition after a positive test and chance of a positive test overall and chance of the condition after a negative test across a range of prevalence (prior chance), every other input held at the worked-example value.
Prevalence (prior chance)Chance of the condition after a positive testChance of a positive test overallChance of the condition after a negative test
0.500%8.3%5.4%0.053%
0.750%12.0%5.6%0.079%
1.0%worked example15.4%5.9%0.106%
1.3%18.6%6.1%0.133%
1.5%21.5%6.3%0.160%

Every input, tested

Which input moves the chance of the condition after a positive test most

Of the 3 inputs, prevalence (prior chance) moves the chance of the condition after a positive test most (6.6% across the range tested) and sensitivity moves it least (0.579%).

Bayes' Theorem Calculator: chance of the condition after a positive test with each input moved on its own, every other input held at the worked-example value.
InputTested fromToChance of the condition after a positive test at each endSwing
Prevalence (prior chance)0.750%1.3%12.0% to 18.6%6.6% (43%)
False positive rate4.0%6.0%18.5% to 13.2%5.4% (35%)
Sensitivity88.0%92.0%15.1% to 15.7%0.579% (3.8%)

Two variables at once

Chance of the condition after a positive test by prevalence (prior chance) and sensitivity

Across the grid the chance of the condition after a positive test runs from 8.0% to 22.3%. Moving prevalence (prior chance) from 0.500% to 1.5% shifts it by 13.2% at the middle column, and moving sensitivity from 86.0% to 94.0% shifts it by 1.2% at the middle row, so prevalence (prior chance) is the bigger lever here.

Bayes' Theorem Calculator: chance of the condition after a positive test at each combination of prevalence (prior chance) (rows) and sensitivity (columns).
Prevalence (prior chance) \ Sensitivity86.0%90.0%94.0%
0.500%8.0%8.3%8.6%
0.750%11.5%12.0%12.4%
1.0%14.8%15.4%16.0%
1.3%17.9%18.6%19.2%
1.5%20.8%21.5%22.3%

The highlighted cell is the worked example: 15.4%.

Step by step

The worked example, input by input

Worked-example inputs and the results they produce for the bayes' theorem calculator.
InputValue usedWhat it means
Prevalence (prior chance)1.0%How common the condition is before any test.
Sensitivity90.0%The chance the test is positive when the condition is present.
False positive rate5.0%The chance the test is positive when the condition is absent.
Chance of the condition after a positive test15.4%
Chance of a positive test overall5.9%
Chance of the condition after a negative test0.106%

Inputs, definitions and assumptions

Prevalence (prior chance)

How common the condition is before any test. The prefilled worked-example value is 1.0%.

Sensitivity

The chance the test is positive when the condition is present. The prefilled worked-example value is 90.0%.

False positive rate

The chance the test is positive when the condition is absent. The prefilled worked-example value is 5.0%.

How to use this calculator

  1. 1Verify the inputs. Gather prevalence (prior chance), sensitivity and false positive rate from your own documents; the prefilled values are examples.
  2. 2Save a baseline. The worked example puts the chance of the condition after a positive test at 15.4%. Store your own version of it as Scenario A.
  3. 3Test one change. Start with prevalence (prior chance), the input with the biggest effect here: moving prevalence (prior chance) from 0.750% to 1.3% takes the chance of the condition after a positive test from 12.0% to 18.6%, a swing of 43% of the worked-example figure.
  4. 4Check the extremes. At half the example prevalence (prior chance) (0.500%) the chance of the condition after a positive test is 8.3%; at double (2.0%) it is 26.9%.

People also ask

Frequently asked questions

How do you calculate bayes' theorem?

P(condition | positive) = sensitivity × prevalence ÷ [sensitivity × prevalence + false positive rate × (1 − prevalence)]. Enter prevalence (prior chance) in percent, sensitivity in percent and false positive rate in percent (1 means 1%). At the worked-example inputs the chance of the condition after a positive test is 15.4%.

What does the bayes' theorem result mean?

See why a positive result on a good test can still mean a low chance of the condition when it is rare. At the worked-example inputs the chance of the condition after a positive test is 15.4%. It rises with prevalence (prior chance) and sensitivity and falls as false positive rate increases.

How much does prevalence (prior chance) change the chance of the condition after a positive test?

Holding every other input at the worked-example value, moving prevalence (prior chance) from 0.500% to 1.5% moves the chance of the condition after a positive test from 8.3% to 21.5%, a spread of 13.2%.

What are the limits of this bayes' theorem calculator?

These are standard formulas from introductory statistics. Real-world inference depends on assumptions, normality, independence, a genuinely random sample, that this calculator does not check for you. The tables on this page test prevalence (prior chance) only from 0.500% to 1.5%; a value outside that range is not tabulated here.

Which input moves the chance of the condition after a positive test most in the bayes' theorem calculator?

Ranked by how far each moves the chance of the condition after a positive test across the range tested: prevalence (prior chance) (6.6%, 43%), false positive rate (5.4%, 35%) and sensitivity (0.579%, 3.8%).

If I double prevalence (prior chance) in the bayes' theorem calculator, does the chance of the condition after a positive test double?

Doubling it from 1.0% to 2.0% takes the chance of the condition after a positive test from 15.4% to 26.9%, which is 1.75 times the worked-example figure. So it grows, but by less than double. Halving it to 0.500% gives 8.3%.

How much does sensitivity matter in the bayes' theorem calculator?

The worked example uses 90.0%. With the other inputs left at the worked example, moving sensitivity from 88.0% to 92.0% takes the chance of the condition after a positive test from 15.1% to 15.7%, a swing of 3.8% of the worked-example figure.

How much does false positive rate matter in the bayes' theorem calculator?

The worked example uses 5.0%. Holding every other input at its worked-example value, moving false positive rate from 4.0% to 6.0% takes the chance of the condition after a positive test from 18.5% to 13.2%, a swing of 35% of the worked-example figure.

Which inputs change the chance of a positive test overall in the bayes' theorem calculator?

At the worked-example inputs it is 5.9%. Prevalence (prior chance) takes it from 5.6% to 6.1%, sensitivity takes it from 5.8% to 5.9% and false positive rate takes it from 4.9% to 6.8%.

Which inputs change the chance of the condition after a negative test in the bayes' theorem calculator?

At the worked-example inputs it is 0.106%. Prevalence (prior chance) takes it from 0.079% to 0.133%, sensitivity takes it from 0.127% to 0.085% and false positive rate takes it from 0.105% to 0.107%.

What does a 95% confidence interval actually mean?

It means that if you repeated the sampling process many times and built an interval the same way each time, about 95% of those intervals would contain the true population value. It does NOT mean there's a 95% probability the true value falls in this one specific interval: a common and understandable misreading.

Why do smaller margins of error need disproportionately larger samples?

Required sample size grows with the square of how small you want the margin of error to be. Cutting the margin of error in half roughly quadruples the sample size needed, which is why polls rarely promise a margin under 2-3% even with very large samples.

All statistics & probability questions answered

Sources and evidence

Free Calculators Online is independent and is not affiliated with or endorsed by the source organizations. Educational estimates only.

Background reading

Guides that use this calculator

Definitions

Terms used on this page

Standard deviation : glossary term
A measure of how spread out a set of values is around its mean. A small standard deviation means values cluster tightly; a large one means they scatter widely.
Z-score : glossary term
How many standard deviations a value sits from the mean of its distribution. A z-score of 2 means the value is two standard deviations above average.
Combination : glossary term
A selection of items where order does not matter. Choosing 3 people for a committee from a group is a combination problem.
Confidence interval : glossary term
A range built from sample data. It is likely to contain the true population value at a stated confidence level, commonly 95%.