About this tool
Probability measures how likely an event is, from 0 (impossible) to 1 (certain), or from 0% to 100%. Most everyday questions combine simpler events: the chance that two things both happen, that at least one happens, that neither happens, or that something happens given that something else already has.
This calculator covers the two-event rules taught in school, including conditional probability and a Venn diagram, and the binomial distribution for repeated independent trials such as coin flips, dice rolls, free throws or defective items in a batch. For counting the ways to choose items, use the combination calculator; for odds in betting formats, the odds calculator.
How it works
In the two events mode, enter the probabilities of events A and B and say how they are related. Independent events do not affect each other, such as two coin flips. Mutually exclusive events cannot happen together, such as rolling a 1 and a 6 with one die. If neither applies, enter the probability that both happen, or the probability of B once A has happened. The calculator returns every combination and draws a Venn diagram with the share of each region.
In the repeated trials mode, enter the number of independent trials n, the probability of success p on each trial and a number of successes k. You get the probability of exactly k successes, at most k, at least k and at least one success, using the binomial distribution, with a chart of all outcomes.
Example
Rain is forecast with probability 0.5 on Saturday and 0.4 on Sunday, independently. Rain on both days has probability , and rain on at least one day , so a dry weekend has probability 0.3.
Flip a fair coin 10 times. Exactly 3 heads has probability , at most 3 heads about 0.1719 and at least one head . Rolling at least one six in four throws of a die has probability .
Assumptions and limits
The two-event rules assume you know P(A), P(B) and how the events relate. Treating dependent events as independent is the most common mistake: two family members catching the same cold or two parts from the same faulty batch are usually not independent. The calculator checks that the numbers you enter are possible together and explains when they are not.
The binomial mode assumes a fixed number of independent trials with the same probability of success on each. Drawing cards without replacement or sampling a large share of a small population breaks this assumption. Up to 100,000 trials are supported, and the probabilities are computed in log space so that very small tail probabilities remain accurate.
Frequently asked questions
What is the difference between independent and mutually exclusive events?
Independent events do not influence each other, so . Mutually exclusive events cannot both happen, so . Two events with non-zero probabilities cannot be both: if they are mutually exclusive, knowing that one happened tells you the other did not.
How do I calculate P(A or B)?
Add the two probabilities and subtract the overlap, which would otherwise be counted twice: . For mutually exclusive events the overlap is 0 and you simply add.
What is conditional probability?
It is the probability of A once you know B has happened: . For a card drawn from a standard deck, the probability that it is a king given that it is a heart is .
How do I find the probability of at least one success?
Use the complement: is one minus the probability that every trial fails. With a 1 in 6 chance per roll, at least one six in 4 rolls has probability about 0.518, and in 24 rolls about 0.987.
When can I use the binomial distribution?
When there is a fixed number of trials, each trial has only two outcomes (success or failure), the probability of success is the same every time and the trials are independent. Counting heads in coin flips or defective items in a large production run are typical examples.
Link with your values
Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.
| Parameter | Value | If omitted |
|---|---|---|
modeCalculate | one of: events, binomial | default events |
probability_aP(A) | text in the tool's notation, see the examples; used with mode = events | required |
probability_bP(B) | text in the tool's notation, see the examples; used with mode = events | required |
relationEvents A and B are | one of: independent, exclusive, joint, conditional; used with mode = events | default independent |
probability_a_and_bP(A and B) | text in the tool's notation, see the examples; used with mode = events; used with relation = joint | required |
probability_b_given_aP(B | A) | text in the tool's notation, see the examples; used with mode = events; used with relation = conditional | required |
trialsTrials (n) | whole number; allowed 1–100000; used with mode = binomial | required |
successesSuccesses (k) | whole number; allowed 0–100000; used with mode = binomial | required |
success_probabilityProbability of success (p) | text in the tool's notation, see the examples; used with mode = binomial | required |
Examples
?probability_a=0.3&probability_b=0.6?relation=exclusive&probability_a=0.2&probability_b=0.5?probability_a=0.5&probability_b=0.4&probability_a_and_b=0.25?probability_a=0.6&probability_b=0.5&probability_b_given_a=0.7?trials=20&successes=5&success_probability=1/4
Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.
Result elements: [data-result-block="probability_calculator"]