# Bayes’ Theorem Calculator

URL: https://speedycalculator.com/calculators/statistics/bayes-theorem/
Last updated: 2026-10-25

> The Bayes’ theorem calculator updates the probability of a hypothesis after new evidence. It is commonly used to find the chance of having a condition after a positive test result.

## Inputs

- Prior probability P(A) (%)
- P(B | A) — e.g. sensitivity (%)
- P(B | not A) — e.g. false-positive rate (%)

## Results

- Posterior P(A | B)
- Total P(B)

## Formula

```
P(A|B) = P(B|A) P(A) ÷ [P(B|A) P(A) + P(B|¬A) (1 − P(A))]
```

## Explanation

Bayes’ theorem shows why a positive result on an accurate test can still mean a modest probability when the condition is rare.

### How to use the Bayes’ Theorem Calculator

- **Prior probability P(A)**
- **P(B | A) — e.g. sensitivity**
- **P(B | not A) — e.g. false-positive rate**

Results update as you type, and every field accepts the units shown in its menu.

### How it works

Multiply the prior by the likelihood and divide by the total probability of the evidence.

### Inputs explained

FieldWhat to enterPrior probability P(A)In %P(B | A) — e.g. sensitivityIn %P(B | not A) — e.g. false-positive rateIn %

### What each result means

- **Posterior P(A | B)** = [P(B | A) — e.g. sensitivity]×[Prior probability P(A)]÷([P(B | A) — e.g. sensitivity]×[Prior probability P(A)] + [P(B | not A) — e.g. false-positive rate]×(100 - [Prior probability P(A)]))×100
- **Total P(B)** = ([P(B | A) — e.g. sensitivity]×[Prior probability P(A)] + [P(B | not A) — e.g. false-positive rate]×(100 - [Prior probability P(A)]))÷100

### Example values

How the main result changes when **Prior probability P(A)** changes and everything else stays at the example values above:

Prior probability P(A) (%)Posterior P(A | B) (%)0.58.7160.7512.555116.1021.2519.3881.522.441227.941

## Worked example

Inputs — Prior probability P(A): 1 %; P(B | A) — e.g. sensitivity: 95 %; P(B | not A) — e.g. false-positive rate: 5 %.

Results — **Posterior P(A | B) = 16.102 %**; Total P(B) = 5.9 %.

## FAQ

**Why is the answer only about 16%?**
With 1% prevalence, false positives from the 99% without the condition outnumber true positives.

**What is a prior?**
Your probability before seeing the new evidence.

**What formula does the Bayes’ Theorem Calculator use?**
P(A|B) = P(B|A) P(A) ÷ [P(B|A) P(A) + P(B|¬A) (1 − P(A))].

