Probability calculator
Three common calculations in one tool: the complement of a single event, the combined probability of two independent events with AND and OR, and Bayes’ theorem for a conditional probability. It covers the everyday probability questions in statistics, risk, testing and games of chance.
How it works
Pick a mode and enter probabilities as decimals between 0 and 1:
Complement: P(not A) = 1 − P(A)
Independent: P(A and B) = P(A) × P(B)
P(A or B) = P(A) + P(B) − P(A) × P(B)
Bayes: P(A|B) = [P(B|A)·P(A)] /
[P(B|A)·P(A) + P(B|¬A)·(1 − P(A))]
The OR formula subtracts the overlap so the shared outcome is not counted twice. Bayes combines a prior, a likelihood and a false-positive rate.
Example
Two independent events with P(A) = 0.5 and P(B) = 0.4:
- P(A and B) = 0.5 × 0.4 = 0.20
- P(A or B) = 0.5 + 0.4 − 0.20 = 0.70
Bayes — a disease with prior P(A) = 0.01, a test with P(B|A) = 0.99 and false positive P(B|¬A) = 0.05:
- P(A|B) = (0.99 × 0.01) / (0.99 × 0.01 + 0.05 × 0.99) ≈ 0.167, so a positive test means only about a 17% chance of having the disease.
| Mode | Inputs | Result |
|---|---|---|
| Complement | P(A)=0.3 | 0.7 |
| AND | 0.5, 0.4 | 0.20 |
| OR | 0.5, 0.4 | 0.70 |
Everything runs locally in your browser.