Conditional Probability Calculator
Calculate the conditional probability P(A|B) using Bayes' theorem and the definition of conditional probability. Essential for medical testing, risk assessment, and Bayesian inference in statistics.
This free online conditional probability calculator provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Enter your values below and see results update in real time as you type. Perfect for everyday calculations, homework, or professional use.
How to Use This Calculator
Enter your input values
Fill in all required input fields for the Conditional Probability Calculator. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.
Review your inputs
Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.
Read the results
The Conditional Probability Calculator instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.
Explore parameter sensitivity
Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.
Formula Reference
Conditional Probability Calculator Formula
See calculator inputs for the governing equation
Variables: All variables and their units are labeled in the calculator interface above. Input fields accept values in multiple unit systems — select your preferred unit from the dropdown next to each field.
When to Use This Calculator
- •Use the Conditional Probability Calculator when you need accurate results quickly without the risk of manual computation errors or unit conversion mistakes.
- •Use it to verify calculations made by hand or in spreadsheets — an independent check can catch errors before they lead to costly decisions.
- •Use it to explore how changing input parameters affects the output — a quick way to develop intuition and identify the most influential variables.
- •Use it when collaborating with others to ensure everyone is working from the same numbers and applying the same assumptions.
About This Calculator
The Conditional Probability Calculator is a free, browser-based calculation tool for engineers, students, and technical professionals. Calculate the conditional probability P(A|B) using Bayes' theorem and the definition of conditional probability. Essential for medical testing, risk assessment, and Bayesian inference in statistics. It implements standard formulas and supports both metric (SI) and imperial unit systems with automatic unit conversion. All calculations are performed instantly in your browser with no data sent to a server. Use this calculator as a quick reference and sanity-check tool during design, analysis, and learning. Always verify results against primary engineering references and applicable standards for any safety-critical application.
About Conditional Probability Calculator
The Conditional Probability Calculator computes P(A|B) — the probability that event A occurs given that event B has already occurred. This concept is fundamental to statistics and drives everything from medical test interpretation to machine learning to everyday decision-making. Conditional probability is often misunderstood: people confuse P(A|B) with P(B|A), leading to the famous 'prosecutor's fallacy' and flawed medical diagnoses. This calculator helps you correctly compute and understand how additional information (event B) changes the probability of event A. Whether you're interpreting a medical test, analyzing data, or making decisions under uncertainty, mastering conditional probability is essential.
The Math Behind It
Formula Reference
Conditional Probability
P(A|B) = P(A ∩ B) / P(B)
Variables: P(A|B) = probability of A given B has occurred; P(A ∩ B) = joint probability
Worked Examples
Example 1: Card Drawing
From a standard 52-card deck, what's the probability of drawing a king given that you drew a face card?
Given that the card is a face card, there's a 1/3 (33.3%) probability it's a king.
Example 2: Medical Test
A disease affects 2% of the population. A test has 95% sensitivity and 90% specificity. What's P(disease | positive test)?
About 16% probability of actually having the disease given a positive test — much lower than the 95% 'accuracy' suggests!
Common Mistakes & Tips
- !Confusing P(A|B) with P(B|A). They're different and can vary dramatically.
- !Forgetting about base rates. A 99% accurate test for a rare disease still gives many false positives.
- !Assuming independence when events are actually correlated.
- !Computing P(A ∩ B) as P(A) × P(B) when events aren't independent.
Related Concepts
Used in These Calculators
Calculators that build on or apply the concepts from this page:
Frequently Asked Questions
Is P(A|B) the same as P(B|A)?
No! This is called the 'prosecutor's fallacy' and is one of the most common statistical errors. P(A|B) asks 'given B happened, what's P(A)?' while P(B|A) asks 'given A happened, what's P(B)?' They can be very different. Example: P(wet|raining) ≈ 1, but P(raining|wet) is much lower (you could be wet from many reasons).
When are events independent?
Events A and B are independent if knowing one tells you nothing about the other: P(A|B) = P(A). Examples: coin flips (each flip is independent), two different dice rolls, drawing cards with replacement. Non-examples: drawing cards without replacement (the first draw affects what's left), weather conditions over consecutive days.
Why do false positives matter for medical testing?
Because of base rates. If a disease is rare (say, 1%), even a 'highly accurate' test with 99% sensitivity and 99% specificity will produce more false positives than true positives in absolute numbers. Out of 10,000 people: ~100 actually have it (99 correctly detected). But 99 healthy people also test positive (1% of the 9,900 healthy). Only about half of positive results are true positives!
What's the Monty Hall problem?
A classic counterintuitive probability problem. You pick 1 of 3 doors. The host (who knows what's behind each door) opens a different door, revealing it's empty. Should you switch? YES — switching gives you a 2/3 chance of winning vs 1/3 if you stay. Your original choice was 1/3, and the remaining probability (2/3) concentrates on the door the host didn't open. This demonstrates how additional information changes conditional probabilities.