Free Probability Calculator with Worked Steps
Enter P(A) and P(B), choose whether the events are independent or mutually exclusive, and get P(A and B), P(A or B), P(A|B), P(B|A), and P(not A) — each one with the rule written out and your numbers substituted in, so you can copy the working, not just the answer.
Probability Calculator
Enter P(A) and P(B), say how the events are related, and every basic rule is worked out step by step below.
This choice changes the formulas, so the calculator never assumes it for you.
One event happening does not change the other's probability (e.g. two separate coin flips). Uses P(A and B) = P(A) × P(B).
The events can never happen together (e.g. one die roll landing on 2 and on 5). Uses P(A and B) = 0.
Results
With P(A) = 0.3 and P(B) = 0.4, treated as independent events:
| Quantity | Decimal | Percent |
|---|---|---|
| P(A and B) | 0.12 | 12% |
| P(A or B) | 0.58 | 58% |
| P(A | B) | 0.3 | 30% |
| P(B | A) | 0.4 | 40% |
| P(not A) | 0.7 | 70% |
| P(not B) | 0.6 | 60% |
Worked steps
P(A and B)Multiplication rule (independent events)
P(A and B) = P(A) × P(B)
P(A and B) = 0.3 × 0.4
P(A and B) = 0.12
Independence lets you multiply the two probabilities directly.
P(A or B)General addition rule
P(A or B) = P(A) + P(B) − P(A and B)
P(A or B) = 0.3 + 0.4 − 0.12
P(A or B) = 0.58
Subtracting P(A and B) removes the overlap so it is not counted twice.
P(A | B)Conditional probability rule
P(A | B) = P(A and B) ÷ P(B)
P(A | B) = 0.12 ÷ 0.4
P(A | B) = 0.3
Notice this equals P(A). That is the definition of independence: knowing B occurred does not change the probability of A.
P(B | A)Conditional probability rule
P(B | A) = P(A and B) ÷ P(A)
P(B | A) = 0.12 ÷ 0.3
P(B | A) = 0.4
Notice this equals P(B), for the same reason: independence works in both directions.
P(not A)Complement rule
P(not A) = 1 − P(A)
P(not A) = 1 − 0.3
P(not A) = 0.7
P(not B)Complement rule
P(not B) = 1 − P(B)
P(not B) = 1 − 0.4
P(not B) = 0.6
The four rules this calculator uses
Every result on this page comes from one of four rules, and the calculator prints which rule it used next to each answer.
The multiplication rule gives the probability that both events happen. For independent events it is P(A and B) = P(A) × P(B). If the events are mutually exclusive, they cannot both happen, so P(A and B) = 0 — no multiplication needed.
The addition rule gives the probability that at least one event happens: P(A or B) = P(A) + P(B) − P(A and B). The subtraction removes the overlap so outcomes where both events occur are not counted twice. For mutually exclusive events the overlap is 0, so the rule collapses to P(A) + P(B).
The conditional probability rule gives the probability of A once you know B happened: P(A | B) = P(A and B) ÷ P(B). It rescales the joint probability by the probability of the thing you are conditioning on — which is also why it breaks down when P(B) = 0.
The complement rule is the simplest: P(not A) = 1 − P(A). Something either happens or it doesn't, and those two probabilities must add to 1.
Independent or mutually exclusive? Decide before you calculate
This is the one decision the calculator will not make for you, because it changes the formulas. Independent means one event happening tells you nothing about the other — two separate coin flips, or drawing a card and rolling a die. Mutually exclusive means the events can never happen together — a single die roll cannot land on both 2 and 5.
Students mix these up constantly, and it is worth pausing on why they are almost opposites. If A and B are mutually exclusive and B happens, you now know A did not happen — that is very strong information, the opposite of independence. Two events with nonzero probabilities can never be both independent and mutually exclusive.
A quick test for your homework problem: ask "if I knew B happened, would my estimate of A change?" If no, they are independent. Then ask "can both happen in the same trial?" If no, they are mutually exclusive. If the answer to both questions is "it depends" or "sort of," the events are dependent but overlapping, and you need P(A and B) from the problem itself — the two options on this page will not model it.
A worked example, done by hand
Suppose 30% of students in a class walk to school and 40% pack their own lunch, and the two habits are independent. So P(A) = 0.3 and P(B) = 0.4 — the calculator loads this exact example.
Both: P(A and B) = P(A) × P(B) = 0.3 × 0.4 = 0.12. Multiplying is legal only because we said the events are independent.
At least one: P(A or B) = P(A) + P(B) − P(A and B) = 0.3 + 0.4 − 0.12 = 0.58. If you skipped the subtraction you would get 0.7, which double-counts the 12% of students who do both.
Given B: P(A | B) = P(A and B) ÷ P(B) = 0.12 ÷ 0.4 = 0.3. Notice this equals P(A). That is not a coincidence — it is the definition of independence: learning that a student packs lunch tells you nothing new about whether they walk. Likewise P(B | A) = 0.12 ÷ 0.3 = 0.4 = P(B).
Neither direction of walking: P(not A) = 1 − 0.3 = 0.7. Now change the setting: if instead A and B were mutually exclusive (say, "walks to school" and "takes the bus"), then P(A and B) = 0, P(A or B) = 0.3 + 0.4 = 0.7, and P(A | B) = 0 ÷ 0.4 = 0 — once you know the student took the bus, walking is off the table.
Common mistakes to avoid
- Adding P(A) + P(B) for "or" without subtracting the overlap. That only works when the events are mutually exclusive; otherwise you count the both-happen outcomes twice.
- Multiplying P(A) × P(B) for "and" when the events are dependent. Drawing two cards without replacement is the classic trap — the second draw's probability changed, so plain multiplication is wrong.
- Treating "mutually exclusive" and "independent" as synonyms. They are nearly opposites: mutually exclusive events are maximally informative about each other.
- Swapping P(A | B) and P(B | A). "Probability of a positive test given disease" and "probability of disease given a positive test" are different numbers, often wildly different.
- Reporting a probability above 1 or below 0. If any intermediate step leaves the 0-to-1 range, an earlier assumption is broken — for mutually exclusive events, P(A) + P(B) itself can never exceed 1.
- Writing 30 when you mean 30%. A probability of 30 is meaningless; this calculator rejects it instead of guessing, so enter 0.3 or 30%.
How to check your answer
Before you box an answer on an exam, run these sanity checks — they catch most arithmetic and setup errors in a few seconds.
Every probability you computed must be between 0 and 1. P(A or B) can never be smaller than the larger of P(A) and P(B), and P(A and B) can never be larger than the smaller of them — "both" is always at least as hard as either alone. P(A) and P(not A) must add to exactly 1.
Two cross-checks tie the rules together. First, P(A and B) + P(A or B) should equal P(A) + P(B) — that is the addition rule rearranged. Second, if you claimed independence, verify P(A | B) came out equal to P(A); if it didn't, either the arithmetic slipped or the events were not independent after all.
Related free tools
Frequently Asked Questions
What is the difference between independent and mutually exclusive events?
Independent events don't affect each other: knowing one happened leaves the other's probability unchanged, so P(A and B) = P(A) × P(B). Mutually exclusive events can't happen together at all, so P(A and B) = 0. They are close to opposites — if exclusive events share a trial and B occurs, A is now impossible, which is the strongest possible dependence.
Why does the calculator say P(A | B) is undefined when P(B) = 0?
P(A | B) = P(A and B) ÷ P(B), and dividing by zero has no defined value. Conceptually, "the probability of A given that B happened" assumes B can happen; if B has probability 0, the condition never occurs and the question has no answer. Returning 0 or NaN would be inventing a number, so the calculator refuses instead.
Can P(A) + P(B) be greater than 1?
Yes — if the events can overlap. P(A) = 0.7 and P(B) = 0.6 is fine for overlapping events because the addition rule subtracts P(A and B) before reporting P(A or B). But if you mark the events mutually exclusive, the sum is itself P(A or B) and cannot exceed 1, so the calculator flags that combination as impossible rather than returning a probability above 1.
Is P(A | B) the same as P(B | A)?
No. They share the same numerator, P(A and B), but divide by different things: P(A | B) divides by P(B) while P(B | A) divides by P(A). With P(A) = 0.3 and P(B) = 0.4 independent, they come out 0.3 and 0.4 — already different, and in real problems (like medical testing) the gap can be enormous.
Can two events be both independent and mutually exclusive?
Only in the degenerate case where at least one of them has probability 0. Independence requires P(A and B) = P(A) × P(B); mutual exclusivity requires P(A and B) = 0. Both can hold only if P(A) × P(B) = 0. For any two events you actually care about, pick one relationship, not both.
What formats can I enter probabilities in?
Decimals (0.3), fractions (3/10), or percents (30%). Anything outside 0 to 1 is rejected with a message rather than silently rescaled — so 30 on its own is an error, not 30%. Fractions with a zero denominator and non-numeric input are also refused explicitly.
