Conditional Probability Calculator
Find the probability of A after restricting the sample space to outcomes where B occurred.
Concept diagram; circle area is not proportional to probability.
Conditional probability result
Enter P(A∩B) and P(B), then calculate.
- Joint probability — P(A∩B)
- —
- Conditioning probability — P(B)
- —
- Not A given B — P(Aᶜ|B)
- —
- B without A — P(B∩Aᶜ)
- —
P(A|B) and P(B|A) are generally different.
How to calculate conditional probability
Use this calculator when the joint probability and the probability of the condition are known. Enter decimals between 0 and 1.
- Enter P(A∩B), the chance that A and B both occur.
- Enter P(B), the chance that the conditioning event occurs.
- Select Calculate to divide the joint probability by P(B).
- Read P(A|B) and the remaining share of B outside A.
- Editing an input clears the confirmed result; Clear removes both inputs.
Conditional probability formula
The definition is P(A|B)=P(A∩B)/P(B). Once B is known to have occurred, B becomes the restricted sample space. The numerator counts outcomes inside both A and B.
Why P(B) cannot be zero
Conditioning on an event with probability 0 would require division by zero, so this elementary numeric calculation is undefined. The calculator reports the issue instead of displaying a false zero or infinity.
Input consistency
Because A∩B is contained in B, P(A∩B) cannot exceed P(B). Equality is allowed and produces P(A|B)=1; a zero intersection with positive P(B) produces 0.
Interpret the direction carefully
- P(A|B) asks about A after B is known.
- P(B|A) reverses the condition and usually has a different value.
- This calculator uses supplied probabilities, not raw counts or predictions.
- Displayed values are rounded, while the division uses the entered numbers.
Worked example
If P(A∩B)=0.18 and P(B)=0.30, then P(A|B)=0.18/0.30=0.60. Within event B, 40% of outcomes are outside A.
Frequently asked questions
Is P(A|B) the same as P(B|A)?
Not generally. Reversing the condition changes the denominator.
Can P(A∩B) equal P(B)?
Yes. Then every B outcome is also an A outcome and P(A|B)=1.
What happens when P(B)=0?
The ratio is undefined, so the calculator rejects the input.
Can I enter percentages?
Convert them to decimals first: enter 0.3 for 30%.