Probability Calculator screenshot

Probability Calculator

Union, conditional and complement probabilities from P(A), P(B) and P(A and B).

Privacy First
0 Runs
Updated 2026-11-06
No upload
Runs in this tab
No signup

What this page computes

Type P(A), P(B) and P(A and B). The page applies the addition rule P(A ∪ B) = P(A) + P(B) − P(A ∪ B), the two conditionals P(A|B) = P(A ∪ B)/P(B) and P(B|A) = P(A ∪ B)/P(A), the two exclusive parts, and the complement of the union. Figures print to six significant figures.

The three numbers must be consistent with each other before any of this means anything: the page refuses a probability outside 0 to 1, an intersection larger than either event, and an intersection below P(A) + P(B) − 1, which would make the union exceed 1. A conditional with a zero denominator prints as undefined rather than as a number.

The arithmetic runs in this tab, so the same three probabilities always give the same six answers.

The page takes P(A), P(B) and P(A and B) and derives the rest from them: the union P(A ∪ B) = P(A) + P(B) − P(A∩B), both conditional probabilities, and the shares that are A only, B only or neither. At 0.5, 0.3 and 0.15 the union is 0.65, and P(A | B) is 0.5 while P(B | A) is 0.3. It refuses a P(A and B) larger than the smaller of the two events, because an intersection cannot exceed either one.

Derive a union, conditionals and the only/neither shares from three probabilities, with the bounds checked.

How to use it

Type P(A), P(B) and P(A and B). Each must lie in 0 … 1, and the intersection is checked against both bounds that make it possible: it cannot exceed the smaller of P(A) and P(B), and it cannot fall below P(A) + P(B) − 1. Either violation is refused with the arithmetic shown rather than silently corrected.

The bounds that make three probabilities consistent

Every derived value comes from the three you typed by the standard identities, so the union is not a fourth independent input and cannot contradict the others. The conditional probabilities are separate lines because P(A | B) and P(B | A) are different numbers and are routinely transposed; at 0.5, 0.3 and 0.15 they are 0.5 and 0.3. The page assumes no independence — if A and B are independent you may type P(A)·P(B) as the intersection and the page will agree with you.

What to Expect

Best for

  • Checking a two-event probability set for consistency

What this tool keeps

  • Nothing leaves this tab: the arithmetic runs in the page you are reading, and a reload discards both the input and the result.

Sample output

P(A ∪ B) = 0.65 P(A | B) = 0.5 P(B | A) = 0.3 P(A only) = 0.35, P(B only) = 0.15, P(neither) = 0.35

Frequently asked questions

What if my three probabilities contradict each other?

The page refuses them and shows the arithmetic: P(A and B) cannot exceed the smaller of P(A) and P(B), and it cannot fall below P(A) + P(B) − 1. Nothing is clamped into a plausible-looking answer.

Does it assume A and B are independent?

No. The intersection is an input, not something derived, so dependence is whatever you typed. If they are independent you can type P(A)·P(B) and the derived lines will be consistent with that.

Is anything uploaded?

No. Every derived probability is computed in this page from the three you typed, and nothing is posted to a server or stored.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.