Statistics & Probability
Instant, private, and free
Bayes' Theorem Calculator.
Compute a posterior probability from a prior and two likelihoods.
Set your values
Results update as you type.
Results update automatically as you type.
Use Cases
Diagnostic Test Interpretation
Determine the probability that a patient actually has a condition after a positive test result, using prevalence, sensitivity, and false positive rate.
Example: If disease prevalence is 1%, sensitivity is 90%, and false positive rate is 5%, the posterior probability is about 15.4%.
Spam Email Filtering
Estimate the probability that an email is spam given it contains a certain word, using prior spam rate and word occurrence probabilities.
Example: If 20% of emails are spam, 80% of spam contains 'offer', and 10% of non-spam contains 'offer', then P(spam|'offer') ≈ 66.7%.
Frequently Asked Questions
- What does the Bayes' Theorem Calculator compute?
- It computes the posterior probability P(A|B) using Bayes' theorem: P(A|B) = [P(B|A) * P(A)] / [P(B|A) * P(A) + P(B|not A) * P(not A)]. You provide P(A), P(B|A), and P(B|not A), and the calculator returns the updated probability of A given B.
- What do the input fields P(A), P(B|A), and P(B|not A) mean?
- P(A) is the prior probability of event A before seeing evidence B. P(B|A) is the likelihood of observing B given that A is true. P(B|not A) is the probability of observing B when A is false (also called the false positive rate).
- Can I use this calculator for medical test accuracy?
- Yes, it's commonly used to interpret diagnostic tests. For example, if P(A) is the prevalence of a disease, P(B|A) is the test's sensitivity, and P(B|not A) is the false positive rate, the calculator gives the probability of having the disease given a positive test result.
Tips & Common Mistakes
Tips
- Ensure all probabilities are between 0 and 1. Use decimals (e.g., 0.05 for 5%) or percentages (5) – the calculator handles both.
- Double-check that P(B|not A) is the probability of B when A is false, not the probability of not B given A.
- Remember that P(not A) is automatically calculated as 1 - P(A). So P(A) must be between 0 and 1.
- Use this calculator to update beliefs as new evidence arrives – it's the foundation of Bayesian reasoning.
Common Mistakes to Avoid
- Confusing P(B|not A) with P(not B|A). They are different: P(B|not A) is the false positive rate, while P(not B|A) is the false negative rate.
- Entering P(A) as a percentage without converting to a decimal (e.g., 50 instead of 0.5) – the calculator may interpret it as 50, leading to incorrect results.
- Forgetting that the denominator includes both the true positive and false positive terms – skipping P(B|not A) will overestimate the posterior probability.
Last updated: August 13, 2026