Intermediate

Conditional Probability Calculator

Compute the conditional probability P(A|B) from the joint probability P(A∩B) and P(B), with an optional independence check.
Probability that both A and B occur (0 to 1)
Probability of the condition B (0 to 1)
Add P(A) to also get P(B|A) and an independence check
P(A | B)
0.4500

Probability of A given that B occurred

P(A | B)
45%
P(B | A)
36%
P(A∩B)
0.18
P(B)
0.4
P(A)
0.5
Events
Dependent

45%

of B

P(A∩B)

45%

B without A

55%

Step by step
  1. 1

    Conditioning event P(B)

    P(B) = 0.4 = 0.4
  2. 2

    P(A | B)

    P(A∩B) ÷ P(B) = 0.18 ÷ 0.4 = 0.4500
    Conditional probability: what fraction of B outcomes also satisfy A.
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Conditional probability P(A|B) is the chance event A occurs given B already happened, computed as P(A∩B) divided by P(B). Enter the joint probability and P(B) to get P(A|B); add P(A) to also obtain P(B|A) and test whether the events are independent, which holds when P(A∩B) equals P(A) times P(B).

Formula
P(A|B) = P(A∩B) / P(B)
How this is calculated

Conditional probability measures how likely event A is once you know event B has already happened. You enter P(A∩B), the joint probability that both A and B occur, and P(B), the probability of the conditioning event. The calculator divides the joint probability by P(B) to give P(A|B) = P(A∩B) / P(B). All probabilities must lie between 0 and 1, and the joint probability cannot exceed P(B) (or P(A)), since the overlap of two events can never be larger than either event on its own.

If you also supply P(A), the tool returns the reverse conditional P(B|A) = P(A∩B) / P(A) and tests for independence. Two events are independent when knowing one tells you nothing about the other, which holds exactly when P(A∩B) = P(A)·P(B). The calculator compares the entered joint probability against that product (within a tiny numerical tolerance) and reports the events as independent or dependent.

The donut chart shows P(A∩B) as a slice of P(B), illustrating what fraction of outcomes in B also belong to A — that fraction is precisely P(A|B). Division by zero is guarded: if P(B) is 0 the conditional is undefined and no result is shown.

Frequently asked questions

Joint probability P(A∩B) is the chance both events happen together. Conditional probability P(A|B) is the chance A happens given B already occurred, found by dividing the joint probability by P(B).

Events A and B are independent when P(A∩B) = P(A)·P(B). Enter P(A) as well and the calculator checks this equality for you, labeling the events independent or dependent.

The overlap of A and B is a subset of B, so it can never be more probable than B itself. If you enter a joint probability larger than P(B), the inputs are inconsistent and no result is returned.

Also known as

conditional probability
p a given b
dependent events probability
joint probability
probability given event
conditional probability formula
p(a|b) calculator

APA

TG we-Calculate Editorial Team. (2026). Conditional Probability Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/conditional-probability-calculator

Chicago

TG we-Calculate Editorial Team. "Conditional Probability Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/conditional-probability-calculator.

IEEE

TG we-Calculate Editorial Team, "Conditional Probability Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/conditional-probability-calculator

BibTeX

@misc{wecalculate_conditional_probability_calculator, title = {Conditional Probability Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/conditional-probability-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?