Skip to content

Conditional Probability Calculator

Find the probability of A after restricting the sample space to outcomes where B occurred.

Condition BA∩B inside B—Share of B that is also A—

Concept diagram; circle area is not proportional to probability.

Enter the joint and conditioning probabilities

Processed in your browser.

Decimal from 0 to 1; it cannot exceed P(B).

Decimal greater than 0 and no greater than 1.

Conditional probability result

Enter P(A∩B) and P(B), then calculate.

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.

  1. Enter P(A∩B), the chance that A and B both occur.
  2. Enter P(B), the chance that the conditioning event occurs.
  3. Select Calculate to divide the joint probability by P(B).
  4. Read P(A|B) and the remaining share of B outside A.
  5. 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%.