No ads, no sign-upChecked 2026-08-25

Conditional Probability Calculator

Result

0.4000

Result: 0.4000
How the result moves

Knowing that B happened shrinks the world to the outcomes where B is true, so the joint probability is rescaled by P(B). Enter both as decimals between 0 and 1. The joint probability can never exceed P(B), because every outcome with both A and B is also an outcome with B.

Worked examples

Case 3
P(A∩B) — both events together
0.12
P(B) — the event you condition on
0.3

0.4000

Open with these values

How it's calculated

P(A|B) = P(A∩B) ÷ P(B)

  1. StepEnter the probability that A and B both happen, as a decimal.
  2. StepEnter the probability of B alone. It must be greater than zero.
  3. ResultRead the chance of A once B is known.

What this number means

P(A|B) is not P(B|A)

Swapping the two asks a different question and generally gives a different number. Turning one into the other takes Bayes' theorem, which also needs P(A) and P(B) — this formula will not do it.

Conditioning shrinks the sample space

Knowing that B happened narrows the outcomes to those where B is true, and the joint probability is rescaled by P(B). That rescaling is the whole of the formula.

The joint probability cannot exceed P(B)

Every outcome in which A and B both happen is also an outcome with B, so P(A∩B) is at most P(B). A larger entry would give a result above 1, which no probability can be.

Enter decimals, not percentages

Both fields run from 0 to 1, so a 20 percent chance goes in as 0.2. Entering 20 and 50 instead of 0.2 and 0.5 falls outside the range.

Commonly misread

P(A|B) = 0.4 means A and B happen together 40 percent of the time.

That would be the joint probability, the number you entered. 0.4 is the share of the B outcomes in which A also holds — 0.2 out of 0.5.

If P(A|B) is high, P(B|A) must be high as well.

They are two separate quantities and agree only by coincidence. Bayes' theorem is what converts one into the other, using P(A) and P(B).

The formula assumes A and B are independent.

It is the other way round: the definition holds for any two events. Independence is the special case in which P(A|B) equals P(A).

Reference table

P(A∩B), P(B)ReadingP(A|B)
0, 0.5A never happens alongside B0
0.1, 0.4A holds in a quarter of the B outcomes0.25
0.12, 0.3Two fifths of the B outcomes0.4
0.2, 0.5Two fifths again, on a larger B0.4
0.3, 0.6Half of the B outcomes0.5
0.5, 0.5A always happens when B does1

Questions

How do I calculate conditional probability?

Divide the joint probability by the probability of the condition: P(A|B) = P(A∩B) ÷ P(B). Enter both values as decimals between 0 and 1. With P(A∩B) = 0.2 and P(B) = 0.5 the result is 0.2 ÷ 0.5 = 0.4, a 40 percent chance of A once B is known.

What is conditional probability?

It is the probability that event A occurs given that event B has already occurred. Knowing B happened narrows the sample space to the outcomes where B is true, so the calculation rescales the joint probability by P(B). The result always lies between 0 and 1.

Why must P(B) be greater than zero?

You cannot condition on an event that never happens. If P(B) is zero then B is impossible, and asking what follows once B occurred has no meaning. The formula divides by P(B), and division by zero is undefined.

Why can the joint probability not exceed P(B)?

The joint event is a subset of B: every outcome where A and B both happen is also an outcome where B happens. So P(A∩B) can never be larger than P(B). A joint probability above P(B) would give a result greater than 1, which is impossible for a probability.

How does this relate to independence?

Two events are independent when knowing B tells you nothing about A, that is when P(A|B) equals P(A). In that case the joint probability factorises into P(A) × P(B). If P(A|B) differs from P(A), the events are dependent and B changes the chance of A.

How is this different from Bayes' theorem?

This calculator uses the direct definition, for when the joint probability is already known. Bayes' theorem reverses a conditional probability, finding P(A|B) from P(B|A), P(A) and P(B) when the joint probability is not given. Both rest on the same definition.

Sources and last check

  1. mathworld.wolfram.com

Information, not professional advice.