Conditional Probability Calculator

Calculate P(A given B) and P(B given A) with clear formulas, examples, and step-by-step probability explanations.

ProbabilityStatisticsHigh School Math

Calculator

P(A and B)
P(B)
P(A)

Enter probabilities as decimals, such as 0.25 for 25%.

Please enter valid values.

What this calculator teaches

Conditional probability measures the chance that event A happens after you already know event B happened. It is one of the most important ideas in high-school probability, statistics, data science, medical testing, and risk analysis.

The key idea is that the sample space becomes smaller. Instead of looking at all outcomes, you look only at the outcomes where B occurred.

Formula & Symbols

ConceptFormulaMeaning
Conditional probabilityP(A|B)=P(A∩B)/P(B)The probability of A given B equals the overlap divided by the probability of B.
Reverse conditionP(B|A)=P(A∩B)/P(A)The probability of B given A may be different from P(A|B).

Step-by-Step Examples

Example 1
Students who play sports and music
  • Suppose P(sports and music) = 0.18.
  • Suppose P(music) = 0.30.
  • Then P(sports | music) = 0.18 / 0.30.
✓ P(sports | music) = 0.60, or 60%.
Example 2
Reverse the condition carefully
  • If P(sports) = 0.45, then P(music | sports) = 0.18 / 0.45.
  • This uses the same overlap but a different denominator.
✓ P(music | sports) = 0.40, or 40%.

Where students use this

🎲
Probability homework
Solve “given that” questions and two-way table problems.
📊
Statistics
Understand dependence, independence, and sample-space restriction.
🧪
Science
Interpret tests, events, and risk using conditional information.
💻
Data science
Build intuition for Bayes, classification, and event probability.

Common Mistakes to Avoid

⚠️
Using the wrong denominator

For P(A|B), divide by P(B), not by P(A).

⚠️
Assuming P(A|B) equals P(B|A)

These are usually different because the given information changes.

⚠️
Entering percentages as whole numbers

Use 0.30 for 30%, not 30.

Frequently Asked Questions

What does P(A|B) mean?
It means the probability of A happening given that B has already happened.
Can conditional probability be greater than 1?
No. A valid probability must be between 0 and 1. If the result is greater than 1, the inputs are inconsistent.
How is this related to Bayes’ theorem?
Bayes’ theorem rewrites conditional probability so you can reverse the condition from P(B|A) to P(A|B).

Related Math Calculators

Formula Explorer connections

Interpretation: This formula summarizes data, models uncertainty or supports inference about a population or random process. Assumption: The sampling design and distribution assumptions must match the data. Independence, sample size, outliers and measurement quality can materially affect interpretation.

Confidence Interval Calculator →Correlation Coefficient Calculator →Expected Value Calculator →Math Formula Explorer →