Since 2010 · Powering 2M+ tool runs every month
Since 2010
Add to Chrome

My Toolbox

Automatic Mode

No saved tools yet.

Go Premium
Related tools
Central Limit Theorem CalculatorProbability CalculatorRisk of Ruin CalculatorDice Roll Probability CalculatorOptions Probability Calculator
Home Page > Math > Statistics And Data Analysis

Bayes' Theorem Calculator

Calculate posterior probability using Bayes' theorem. Enter prior probability, likelihood, and false positive rate to get step-by-step solutions with probability tree diagrams and natural frequency visualizations.

Free to useNo sign-up requiredInstant Results
Bayes' Theorem CalculatorTry it now — free ▼
📌 Try a real-world scenario:
Initial probability of hypothesis A
P(evidence | hypothesis true)
P(evidence | hypothesis false)
Enter values as decimals (0.05) or percentages (5% or 5). Values > 1 are auto-converted from percentages.

Embed Bayes' Theorem Calculator Widget

About Bayes' Theorem Calculator

The Bayes' Theorem Calculator computes the posterior probability P(A|B) using Bayes' theorem. Enter the prior probability, likelihood, and false positive rate to see step-by-step solutions, probability tree diagrams, natural frequency breakdowns, and detailed probability summaries. Whether you're analyzing medical test accuracy, evaluating spam filters, or studying conditional probability, this tool makes Bayesian reasoning intuitive and visual.

How to Use the Bayes' Theorem Calculator

  1. Enter the prior probability P(A) — this is your initial belief about how likely the hypothesis is before seeing any evidence. For example, if 1% of the population has a disease, P(A) = 0.01.
  2. Enter the likelihood P(B|A) — this is the probability of observing the evidence when the hypothesis is true. For a medical test, this is the sensitivity or true positive rate. A 99% sensitive test means P(B|A) = 0.99.
  3. Enter the false positive rate P(B|¬A) — this is the probability of observing the evidence when the hypothesis is false. A test with a 5% false positive rate means P(B|¬A) = 0.05.
  4. Click Calculate to see the posterior probability P(A|B) with full step-by-step workings.
  5. Explore the visualizations — the probability tree diagram shows how the population splits, the natural frequency section uses whole numbers for intuitive understanding, and the comparison bar shows how the evidence shifted your belief.

What Is Bayes' Theorem?

Bayes' theorem is a fundamental rule of probability that describes how to update beliefs in light of new evidence. Named after Reverend Thomas Bayes (1701–1761), the theorem states:

P(A|B) = P(B|A) × P(A) / P(B)

Where:

The Base Rate Fallacy

One of the most counter-intuitive results in probability is the base rate fallacy, which Bayes' theorem helps expose. Consider a disease that affects 1% of people (P(A) = 0.01), with a test that is 99% accurate (P(B|A) = 0.99) and has a 5% false positive rate (P(B|¬A) = 0.05). Intuitively, most people assume a positive test means they almost certainly have the disease. However, Bayes' theorem reveals the posterior probability is only about 16.7%. This is because false positives from the large healthy population outnumber true positives from the small affected group.

Understanding the Likelihood Ratio

The likelihood ratio (LR) is P(B|A) divided by P(B|¬A). It measures the diagnostic power of the evidence:

Real-World Applications of Bayes' Theorem

Natural Frequencies: Making Bayes Intuitive

Research by Gerd Gigerenzer and others has shown that humans understand Bayesian reasoning much better when presented with natural frequencies rather than abstract probabilities. Instead of saying "P(A) = 1%", we can say "10 out of 1,000 people have the condition." Our calculator provides both representations, helping you build genuine intuition for conditional probability.

FAQ

What is Bayes' theorem?

Bayes' theorem is a mathematical formula that describes how to update the probability of a hypothesis based on new evidence. It states P(A|B) = P(B|A) × P(A) / P(B), where P(A|B) is the posterior probability, P(B|A) is the likelihood, P(A) is the prior probability, and P(B) is the total probability of the evidence.

What is the difference between prior and posterior probability?

Prior probability P(A) is your initial belief about the probability of an event before considering new evidence. Posterior probability P(A|B) is the updated probability after taking the evidence into account. Bayes' theorem provides the mathematical framework for computing this update.

Why does a positive medical test not always mean you have the disease?

When a disease is rare (low prior probability), even a highly accurate test produces many false positives relative to true positives. For example, with a 1% disease rate and a 95% accurate test with a 5% false positive rate, a positive result only means about a 16% chance of actually having the disease. This is known as the base rate fallacy.

What is the likelihood ratio in Bayes' theorem?

The likelihood ratio is P(B|A) divided by P(B|¬A). It measures how much the evidence shifts your belief. A ratio greater than 1 means the evidence supports the hypothesis, while a ratio less than 1 means it argues against it. Higher ratios indicate stronger evidence.

Can I enter percentages in the Bayes' theorem calculator?

Yes, you can enter values as decimals (like 0.05) or as percentages (like 5 or 5%). The calculator automatically detects and converts percentage inputs. Values greater than 1 without a percent sign are treated as percentages.

Reference this content, page, or tool as:

"Bayes' Theorem Calculator" at https://MiniWebtool.com/bayes-theorem-calculator/ from MiniWebtool, https://MiniWebtool.com/

Last updated: 2026-04-13

You can also try our AI Math Solver GPT to solve your math problems through natural language question and answer.

Statistics And Data Analysis:

Top & Updated:

Pythagorean Theorem CalculatorRational Root Theorem CalculatorBinomial Theorem Expansion CalculatorView all →
Home Page > Math > Statistics And Data Analysis > Bayes' Theorem Calculator