Probability Calculator

Choose outcome counts, independent events or dependent events. Enter event probabilities as percentages.

This calculator assumes events A and B are independent — the outcome of one doesn't affect the other.

Both happen: P(A and B)
15%
Either happens: P(A or B)
65%
A doesn't happen: P(not A)
50%
Probability P(A)
—
Conditional P(A | B)
—

For dependent events, supply the intersection. Its value must be consistent with both event probabilities. The conditional probability is undefined when P(B) is zero.

Approximate results show up to 12 significant digits. Decimal fields use a dot, up to 12 digits on each side, an exponent from −24 to 24 and absolute values up to 10¹². Rational intermediate numerators and denominators are limited to 512 bits. Integer and scientific-notation exceptions are specified below. P(A∪B)=P(A)+P(B)−P(A∩B); P(¬A)=1−P(A); P(A|B)=P(A∩B)/P(B); P(B)>0.

How these probability rules work

For independent events, the probability both A and B happen is the product of their individual probabilities: P(A and B) = P(A) × P(B). This works because independence means knowing A happened tells you nothing about B's chances.

The probability that A or B (or both) happens is P(A or B) = P(A) + P(B) − P(A and B) — subtracting the overlap avoids double-counting the outcomes where both occur. The probability A doesn't happen is simply 1 − P(A), since "A happens" and "A doesn't happen" cover all possibilities.

For dependent events, supply the intersection. Its value must be consistent with both event probabilities. The conditional probability is undefined when P(B) is zero.

Frequently asked questions

What does it mean for two events to be independent?

Two events are independent if the occurrence of one doesn't change the probability of the other — like flipping a coin twice, where the first flip's result has no effect on the second.

Why do you subtract P(A and B) when finding P(A or B)?

Without subtracting, the outcomes where both A and B happen would be counted twice — once in P(A) and once in P(B) — so subtracting P(A and B) corrects for that double-counting.

Does this work for dependent events?

For dependent events, supply the intersection. Its value must be consistent with both event probabilities. The conditional probability is undefined when P(B) is zero.

How we verified this calculator

The calculator is checked against 6 reference cases computed independently of its code. Last passed: .

# Inputs Expected result
1
Mode = Independent events
P(A) (%) = 50
P(B) (%) = 30
Probability P(A): 50%
Conditional P(A | B): 50%
2
Mode = Independent events
P(A) (%) = 12.5
P(B) (%) = 40
Probability P(A): 12.5%
Conditional P(A | B): 12.5%
3
Mode = Dependent events
P(A) (%) = 60
P(B) (%) = 50
Intersection P(A ∩ B) (%) = 20
Probability P(A): 60%
Conditional P(A | B): 40%
4
Mode = Dependent events
P(A) (%) = 100
P(B) (%) = 100
Intersection P(A ∩ B) (%) = 100
Probability P(A): 100%
Conditional P(A | B): 100%
5
Mode = Favourable / total outcomes
Favourable outcomes = 3
Total outcomes = 6
Probability P(A): 50%
6
Mode = Favourable / total outcomes
Favourable outcomes = 1
Total outcomes = 3
Probability P(A): 33.3333333333%

How we test our calculators →

Also try:

Back to category →