Probability Calculator
Calculate basic probabilities: a single event, or the combined probability of two independent events.
Assumes A and B are independent events.
Probability Calculator: Formulas, Rules, and Worked Examples
Quick summary: A probability calculator finds the likelihood of one or more events happening by applying core probability rules — addition, multiplication, complement, and conditional probability — depending on whether the events are independent, dependent, or mutually exclusive. This guide breaks down each rule with formulas and worked examples so you know exactly which formula fits your situation.
Whether you’re rolling dice, drawing cards, or estimating the odds of two unrelated things happening together, a probability calculator applies a small set of well-established rules to give you an exact answer. The hard part is usually figuring out which rule applies. This guide walks through the core probability formulas — independent events, dependent events, mutually exclusive events, and conditional probability — with clear worked examples for each.
What Is Probability?
Probability is calculated as the number of ways something can happen divided by the total number of possible outcomes. Every probability value falls between 0 and 1 inclusive — the probability of any event A satisfies 0 ≤ P(A) ≤ 1, where 0 means the event is impossible and 1 means it’s certain.
The Core Probability Rules
1. The Complement Rule
The complement of an event is everything outside that event. The complement of event A is everything not in A, and since complementary events are mutually exclusive and together make up the entire sample space, the probability of the sample space always equals 1.
P(not A) = 1 − P(A)
Worked example: If the probability of rain tomorrow is 0.3, the probability it does not rain is 1 − 0.3 = 0.7.
2. Independent Events (Multiplication Rule)
Two events are independent if the occurrence of one event does not affect the probability of the other event occurring. A coin toss is a classic example — a coin doesn’t “know” it landed heads before, so each toss remains an isolated 50/50 event regardless of previous results.
P(A and B) = P(A) × P(B)
This is called the multiplication rule for independent events — if you know the probability of A and the probability of B individually, you simply multiply them together to get the combined probability of both happening.
Worked example 1: What’s the probability of rolling a 6 on a die and then rolling a 6 again? Rolling a standard six-sided die and then rolling it again is a textbook example of independent events, since the outcome of the first roll has no effect on the result of the second roll.
P(6 and 6) = (1/6) × (1/6) = 1/36 ≈ 2.78%
3. Dependent Events (Conditional Multiplication Rule)
Events are dependent if the outcome of one event affects the outcome of another — for example, if you draw two colored balls from a bag and don’t replace the first ball before drawing the second, the outcome of the first draw changes the odds for the second draw.
P(A and B) = P(A) × P(B | A)
Where P(B | A) is the conditional probability of B occurring given that A has already happened.
Worked example 2: Drawing two cards from a deck is considered dependent if the first card is not returned to the deck before the second draw — this is referred to as “without replacement,” and if you draw an ace first and don’t replace it, there are fewer aces left in the deck for the second draw.
P(1st card is ace) = 4/52
P(2nd card is ace | 1st was ace) = 3/51
P(both aces) = (4/52) × (3/51) = 12/2652 ≈ 0.45%
4. The Addition Rule (A or B)
For two events that can overlap:
P(A or B) = P(A) + P(B) − P(A and B)
For independent events, this addition rule can also be expressed as P(A or B) = P(A) + P(B) − P(A)×P(B), which conveniently simplifies to 1 − [1 − P(A)] × [1 − P(B)].
5. Mutually Exclusive Events
Mutually exclusive (or disjoint) events are events where if A occurs, B cannot occur, and vice versa. For mutually exclusive events, the rules simplify:
P(A and B) = 0
P(A or B) = P(A) + P(B)
6. Conditional Probability (Bayes’ Theorem)
Conditional probability answers: “given that B has already happened, what’s the probability of A?”
P(A | B) = P(A) × P(B | A) / P(B)
This is Bayes’ Theorem, derived by solving the two forms of the “A and B” formula for P(A given B).
Worked Example 3: Three Independent Events
Suppose a particular species of trained dog has a 90% chance of detecting contraband in airline luggage, and the same luggage is checked three times by three different dogs, each working independently of the others. To find the probability that at least one dog detects the contraband, it’s easier to first find the probability that none of them do, then subtract from 1:
P(none detect) = (1 − 0.90) × (1 − 0.90) × (1 − 0.90) = 0.10³ = 0.001
P(at least one detects) = 1 − 0.001 = 0.999, or 99.9%
This uses the same complement-and-multiplication logic behind three-event probability calculators: to find the chance that at least one of three events happens, you can use the complement rule for the opposite scenario — the case where none of the events happen at all.
Worked Example 4: Checking Independence
Question: A coin is tossed and a die is rolled. Are these two events independent?
Yes. The formal test for independence is whether P(A|B) equals P(A) — if knowing that event B happened doesn’t change the probability of event A, the two events are independent. Since the outcome of a coin toss has no bearing on a die roll (and vice versa), P(coin = heads | die = 6) still equals P(coin = heads) = 0.5, confirming independence.
P(heads and rolling a 6) = 0.5 × (1/6) = 1/12 ≈ 8.33%
Independent vs. Dependent vs. Mutually Exclusive: Quick Comparison
| Concept | Key Test | Formula |
|---|---|---|
| Independent | Does A affect B’s probability? (No) | P(A and B) = P(A) × P(B) |
| Dependent | Does A affect B’s probability? (Yes) | P(A and B) = P(A) × P(B | A) |
| Mutually exclusive | Can A and B happen together? (No) | P(A and B) = 0 |
| Not mutually exclusive | Can A and B happen together? (Yes) | P(A or B) = P(A) + P(B) − P(A and B) |
A common point of confusion: independent events and mutually exclusive events are not the same thing — two events that are mutually exclusive can never happen together, which is actually a strong form of dependence, not independence.
Frequently Asked Questions
Independent events don’t influence each other’s probability — like separate coin tosses. Dependent events do — like drawing cards from a deck without replacing them, where each draw changes the odds for the next.
Two events are mutually exclusive if they cannot both happen at the same time — for example, rolling a single die can’t produce both a 3 and a 5 on the same roll.
Bayes’ Theorem calculates conditional probability — the likelihood of an event given that another related event has already occurred. It’s widely used in medical testing, spam filtering, and any scenario involving updated beliefs based on new evidence.
No. Valid probabilities always fall between 0 (impossible) and 1 (certain), inclusive.
The easiest approach is usually to calculate the complement — the probability that none of the events happen — and subtract that result from 1.
Yes, as long as you’re rolling a fair, standard die multiple times. Each roll is unaffected by any previous roll, which is what makes dice a go-to example for independent events in most probability lessons.
Related Calculators
Solar Saving Calculator By State
Permutation and Combination Calculator
Conclusion
A probability calculator is only as good as knowing which rule to apply — and as this guide shows, the entire decision tree comes down to a few simple questions: does one event affect the other, can they happen together, and are you looking for “and” or “or”? Once you’ve correctly classified your events as independent, dependent, or mutually exclusive, the formulas themselves are straightforward multiplication and addition. Master that classification step, and a probability calculator becomes less of a black box and more of a fast way to double-check math you already understand.