🧮
🧮 Math & statistics

Probability Calculator (A and B, A or B, not A)

Results update as you type.

Your numbers

Understanding the probability calculator for two events — concept and principle

This calculator combines the probabilities of two events A and B: both happen, at least one happens, A does not happen, exactly one happens, or neither happens. It is useful for everyday questions such as "what is the chance that at least one of two flights is delayed" or "what is the chance both machines work", and for checking homework on the basic rules of probability. Enter P(A) and P(B) as numbers between 0 and 1.

Probabilities of independent events as areasA takes half the width and B 40% of the height; the overlap is 0.2, A or B is 0.7, neither is 0.3.Independent A and B on a 1×1 square0.20.20.30.3A 0.5not A 0.5B 0.4not B0.6A and B0.2A or B0.7not A0.5exactly one0.5neither0.3and: 0.5 × 0.4 = 0.2or: 0.5 + 0.4 − 0.2 = 0.7
For independent events, “and” is a rectangle: width × height.

How it is calculated

All five results assume that A and B are independent, meaning that knowing one happened does not change the chance of the other.

The principle

The complement rule comes from the fact that A either happens or does not, so the two probabilities add to 1. The addition rule P(A ∪ B) = P(A) + P(B) − P(A ∩ B) holds for any events: adding P(A) and P(B) counts the overlap twice, so it is subtracted once. Independence is what turns the overlap into a simple product. "Exactly one" removes the overlap from both events, hence 2·P(A)P(B). "Neither" is the complement of "or": 1 − P(A ∪ B) = (1 − P(A))(1 − P(B)).

Worked example

  1. Defaults: P(A) = 0.5, P(B) = 0.4.
  2. And: 0.5 × 0.4 = 0.2.
  3. Or: 0.5 + 0.4 − 0.2 = 0.7.
  4. Not A: 1 − 0.5 = 0.5.
  5. Exactly one: 0.5 + 0.4 − 2 × 0.2 = 0.5.
  6. Neither: 0.5 × 0.6 = 0.3. Check: 0.2 (both) + 0.5 (exactly one) + 0.3 (neither) = 1.
How P(A and B), independent changes with P(A)How P(A and B), independent changes with…00.10.20.30.40.1250.250.3750.50.6250.751Example: 0.2P(A)
Each point is the calculator re-run with only “P(A)” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
P(A)P(A and B), independent
0.1250.05
0.250.1
0.3750.15
0.50.2
0.6250.25
0.750.3
10.4

How to read the result

The four cases "both", "only A", "only B" and "neither" always add up to 1, which is a quick consistency check. "At least one" is usually easiest to compute as 1 − P(neither), and this idea extends to many events: the chance of at least one success in k independent tries with probability p each is 1 − (1 − p)ᵏ.

Common mistakes

Keep in mind: Every output here, not only "A and B", uses the independence assumption. If A and B are related, you need P(A ∩ B) or a conditional probability P(B|A) from data, and the results can be very different.

Frequently asked questions

How do I find P(A and B) when the events are dependent?

Use the multiplication rule P(A ∩ B) = P(A)·P(B|A), where P(B|A) is the probability of B given that A happened.

Can P(A or B) be more than 1?

No. If adding gives more than 1, the overlap was not subtracted or the inputs are wrong.

How can I test whether two events are independent?

Check whether P(A ∩ B) observed in data is close to P(A)·P(B), or equivalently whether P(B|A) ≈ P(B).

Sources: Sheldon M. Ross, A First Course in Probability, Pearson — axioms of probability and independence · William Feller, An Introduction to Probability Theory and Its Applications, Vol. 1, Wiley

Checked 8 Nov 2026. Standard formulas, computed in your browser with double-precision numbers.

🧮 All math & statistics tools →🌍 Calculators by country →