Probability Calculator

Compute basic probability, union P(A∪B), intersection P(A∩B), conditional P(A|B), and at-least-one probability across n trials.

Science 5 modes Decimal + percent + odds
Rate this calculator · 5.0 (1)

Probability

Five modes - basic, union, intersection, conditional, at-least-one

Instructions — Probability Calculator

1

Pick the mode

Five modes cover the common cases: Basic for P(A) = favorable / total, Union for "A or B", Intersection for "A and B" (independent), Conditional for P(A|B), and At least once for the chance of at least one success in n trials. Switching modes changes the input fields.

2

Enter the inputs

Basic mode needs counts (favorable, total). The other four modes take probabilities as decimals from 0 to 1. The calculator flags impossible combinations - for example, P(A ∩ B) cannot exceed min(P(A), P(B)). Mutually exclusive events have P(A ∩ B) = 0.

3

Read percent, decimal, and odds

Output is given three ways. Percent is the most familiar (e.g., 16.67%), decimal is the format for further math (0.1667), and the fraction/odds line gives an approximate rational form (1/6). For probabilities very close to 0 or 1, the percent display switches to extra decimal places.

Independence vs. dependence: "Intersection" mode assumes independent events: P(A ∩ B) = P(A) × P(B). For dependent events (drawing cards without replacement), enter the conditional probability P(B|A) and use intersection P(A) × P(B|A) - or switch to the conditional mode and work backwards.
The "at least one" shortcut: If you want the probability that something happens at least once in repeated trials, the complement is the easy way: P(at least one) = 1 − (1 − p)^n. Trying to enumerate the cases where it happens once, twice, etc. is much harder.

Formulas

Four rules cover most everyday probability questions. The fifth is Bayes theorem, which lets you reverse a conditional probability.

Basic probability
$$ P(A) = \frac{\text{favorable}}{\text{total}} $$
The fundamental definition: count outcomes in your event A, divide by total outcomes in the sample space. Requires all outcomes to be equally likely.
Complement rule
$$ P(A^\prime) = 1 - P(A) $$
The chance that A does NOT happen. Often easier to compute than P(A) directly, especially for "at least one" questions.
Union (addition rule)
$$ P(A \cup B) = P(A) + P(B) - P(A \cap B) $$
Probability that A or B (or both) happens. Subtract the joint probability to avoid double-counting cases where both occur. For mutually exclusive events, P(A ∩ B) = 0.
Intersection (multiplication rule)
$$ P(A \cap B) = P(A) \cdot P(B \mid A) $$
Probability that both A and B happen. For independent events, P(B|A) = P(B), so the formula simplifies to P(A) × P(B).
Conditional probability
$$ P(A \mid B) = \frac{P(A \cap B)}{P(B)} $$
Probability of A given that B has occurred. Requires P(B) > 0. The denominator restricts the sample space to outcomes where B is true.
At least one in n trials
$$ P(\text{at least one}) = 1 - (1 - p)^n $$
Complement of "zero successes". For p = 0.05 over 10 independent trials, P(at least one) = 1 − 0.95^10 ≈ 40.13%.

Reference

Common probability values
EventP%
Coin flip - heads1/250.00%
Die roll - specific face1/616.67%
d20 - natural 201/205.00%
2d6 sum of 76/3616.67%
Card - specific card1/521.92%
Card - specific suit13/5225.00%
Card - face card12/5223.08%
Roulette - one number1/382.63%

At-least-one probabilities

p = 0.05 per trial
nP(≥1)
15.00%
522.62%
1040.13%
2064.15%
5092.31%
p = 0.10 per trial
nP(≥1)
110.00%
540.95%
1065.13%
2087.84%
5099.48%

Article — Probability Calculator

Probability Calculator

Probability is a number between 0 and 1 (or 0% and 100%) that measures the chance of an event. The fundamental formula is P(A) = favorable outcomes / total outcomes. For a fair die, P(rolling a 6) = 1/6 ≈ 16.67%. For two events: P(A or B) = P(A) + P(B) − P(A and B), and P(A and B) = P(A) × P(B|A).

The calculator above handles five modes: basic, union, intersection, conditional, and at-least-one. This page walks through each one with the math, intuition, and worked examples. All formulas come from the standard NIST and LibreTexts references; no Bayesian metaphysics required.

What is probability?

Probability quantifies uncertainty. An event with probability 0 cannot happen; an event with probability 1 must happen. Everything else falls in between. A fair coin has P(heads) = 0.5. A fair six-sided die has P(any specific face) = 1/6. A standard deck of cards has P(specific card) = 1/52.

The classical definition assumes all outcomes are equally likely. The frequentist definition treats probability as the long-run fraction across many independent trials. The Bayesian view treats probability as a degree of belief. For all the calculations in this page, the classical and frequentist views coincide, and the math is the same.

The basic probability formula

The basic probability formula is P(A) = number of favorable outcomes / total number of outcomes, valid when every outcome is equally likely. Drawing a heart from a 52-card deck: 13 favorable, 52 total, P = 13/52 = 25%. Rolling an even number on a d6: 3 favorable {2,4,6}, 6 total, P = 50%.

The complement rule comes from the same axioms: P(A') = 1 − P(A). It is often the fastest route. For "probability that two coin flips give at least one head," compute the complement: P(no heads) = (1/2) × (1/2) = 1/4, so P(at least one head) = 3/4 = 75%.

Did you know

The first formal axioms of probability theory were laid out by the Russian mathematician Andrey Kolmogorov in 1933. Every modern probability calculator, including this one, ultimately reduces to three rules: probabilities are non-negative, the total probability is 1, and the probability of a disjoint union is the sum of probabilities.

Probability of A or B (union)

P(A ∪ B) = P(A) + P(B) − P(A ∩ B). The subtraction prevents double-counting the cases where both events happen. For mutually exclusive events (A ∩ B = ∅), the formula simplifies to P(A) + P(B).

Example: a card drawn from a deck is a heart with P = 0.25 and a face card with P = 12/52 ≈ 0.231. The card can be both (J, Q, K of hearts, P = 3/52 ≈ 0.058). So P(heart or face card) = 0.25 + 0.231 − 0.058 = 0.423, or 42.3%.

Probability of A and B (intersection)

P(A ∩ B) = P(A) × P(B|A). For independent events, P(B|A) = P(B), so the formula reduces to P(A) × P(B). Two coin flips both heads: 0.5 × 0.5 = 0.25. Two dice both showing 6: (1/6) × (1/6) = 1/36 ≈ 2.78%.

For dependent events the conditional matters. Drawing two hearts from a 52-card deck without replacement: P(first heart) = 13/52 = 0.25; P(second heart given first is heart) = 12/51 ≈ 0.235. Joint probability = 0.25 × 0.235 = 0.0588, or 5.88%.

Indep
Two coin flips, both heads
25.00%
P(A) × P(B) = 0.5 × 0.5
Dep
Two hearts in a row, no replacement
5.88%
13/52 × 12/51

Conditional probability explained

P(A|B) = P(A ∩ B) / P(B) is the probability of A given that B is already known. Conditioning shrinks the sample space to outcomes consistent with B. If you draw a card and someone tells you it is red, the probability that it is a heart updates from 25% to 50% (13 hearts out of 26 red cards).

Bayes theorem rearranges the conditional: P(A|B) = P(B|A) × P(A) / P(B). It is the standard tool for medical-test interpretation. If a test is 99% accurate and the disease has prevalence 1%, the conditional that you actually have the disease given a positive test is about 50%, not 99% — a counterintuitive result that has tripped up many practicing doctors.

Tip

Use natural frequencies instead of percentages when explaining conditional probabilities to non-statisticians. "Out of 10,000 people, 100 have the disease, the test correctly flags 99 of them, and falsely flags 99 of the 9,900 healthy. So 99 of 198 positive tests are true. That is 50%." Far clearer than the Bayes algebra.

At-least-one probability across n trials

"At least once in n trials" is the most common compound probability question. The cleanest approach is the complement: P(at least one) = 1 − (1 − p)^n, where p is the per-trial probability and n is the number of trials.

Example: rolling at least one 6 in 4 throws of a fair die. P(no 6 per throw) = 5/6; P(no 6 in any of 4 throws) = (5/6)^4 ≈ 0.482; P(at least one 6) = 1 − 0.482 = 0.518, or 51.8%. This is the classic gambling problem analyzed by the Chevalier de Méré in 1654 and solved by Pascal and Fermat.

At-least-one probability for common p
p=0.05, n=10 40.13%
p=0.05, n=20 64.15%
p=0.10, n=10 65.13%
p=0.10, n=20 87.84%
p=1/6, n=4 51.77%
p=1/20, n=20 64.15%

Common probability mistakes

The gambler's fallacy is the most common error: thinking that a tails "must come" after a long run of heads. Independent coin flips have no memory. After ten heads, the next flip is still 50%.

The base-rate fallacy is the second most common: ignoring the prior probability when interpreting a conditional. A positive medical test from a 99% accurate test does NOT imply 99% chance of disease unless you also know the prevalence. The Bayes calculation is essential.

Independence is not always true

Many probability mistakes happen because people assume independence when it is not justified. Drawing cards without replacement, picking days in a calendar, or sampling people in a small social network all introduce dependence. Always ask "does the first outcome change the probability of the second?" before multiplying.

A probability cheat sheet

  • Basic probability = favorable / total
  • Complement P(A') = 1 − P(A)
  • Union P(A∪B) = P(A) + P(B) − P(A∩B)
  • Intersection (independent) = P(A) × P(B)
  • Conditional P(A|B) = P(A∩B) / P(B)
  • At least one = 1 − (1 − p)^n
  • Bayes P(A|B) = P(B|A) × P(A) / P(B)
  • Probability range 0 ≤ P ≤ 1

FAQ

P(A) = number of favorable outcomes / total number of outcomes. For rolling a 6 on a fair die, favorable = 1 (one face shows 6) and total = 6 (six possible faces), so P(6) = 1/6 ≈ 16.67%. The formula assumes all outcomes are equally likely. For weighted dice or biased coins the math changes.
P(A∪B) is A OR B (or both); P(A∩B) is A AND B together. For two coin flips: P(at least one heads) = P(A∪B) = 3/4 = 75%. P(both heads) = P(A∩B) = 1/4 = 25%. The union is always larger than or equal to either single probability; the intersection is always smaller.
P(A|B) = P(A∩B) / P(B), the probability of A given that B occurred. If you draw a card from a deck and it is red, the conditional probability that it is a heart is 13/26 = 50%. Knowing one event has occurred restricts the sample space to outcomes consistent with that event.
Use the complement: P(at least one) = 1 − (1 − p)^n. For a 5% chance per trial across 10 trials, P(at least one) = 1 − 0.95^10 ≈ 40.13%. The "at least one" framing is the classic complement question - much easier than summing P(exactly 1) + P(exactly 2) +... separately.
When P(A∩B) = P(A) × P(B), or equivalently when P(A|B) = P(A). Two coin flips, two dice rolls, or two draws with replacement are independent - the first outcome does not affect the second. Drawing cards without replacement is NOT independent because the deck composition changes.
P(A|B) = P(B|A) × P(A) / P(B). It reverses the direction of a conditional. Common medical example: if a test is 99% accurate and the disease prevalence is 1%, the conditional probability that you have the disease given a positive test is only about 50% - much lower than people intuitively expect.
Mutually exclusive = cannot happen together (P(A∩B) = 0). Independent = one does not affect the other. These are different concepts. Two events can be independent without being mutually exclusive (two coin flips). Mutually exclusive events are usually NOT independent - if A happens, B cannot, which is the strongest possible dependence.
Every probability is between 0 and 1 inclusive. P = 0 means impossible; P = 1 means certain; values in between are uncertain. Probabilities are often reported as percentages (0% to 100%) or odds (5:1, 100 to 1). All three forms are equivalent.