Probability calculator for events, repeated tries and odds

Work out P(A and B), P(A or B), the chance of at least one success in n tries, binomial odds and odds to probability.

How it works

  1. Choose two events, repeated tries, or odds
  2. Pick percent or decimal and type your numbers
  3. Read each probability, with the formula and your numbers underneath

The chance of at least one success in n tries

If one try succeeds with probability p, the chance of at least one success in n independent tries is 1 − (1 − p)^n. The page opens on p = 10% and n = 10: the chance of no success is 0.9^10 = 0.348678, so the chance of at least one is 1 − 0.348678 = 0.651322, or 65.1322%. The same page also shows how many tries give a 50% and a 95% chance of at least one success. For 10% that is 7 tries and 29 tries. The formula assumes every try has the same chance and that one try does not change the next, which is true for dice and coin flips and often false for real processes such as drawing cards without putting them back.

Two independent events, A and B

For independent events, P(A and B) = P(A) × P(B). Add the chances and take away the overlap for either: P(A or B) = P(A) + P(B) − P(A and B). For P(A) = 40% and P(B) = 25%, the chance of both is 0.4 × 0.25 = 10%, the chance of at least one is 0.4 + 0.25 − 0.1 = 55%, the chance of exactly one (A xor B) is 55% − 10% = 45%, and the chance of neither is 0.6 × 0.75 = 45%. A 2 by 2 table lists all four outcomes and they add up to 100%. If one event changes the chance of the other, for example two cards drawn from one deck, the product rule does not apply and this page gives the wrong answer.

Exactly, at most and at least k successes

The chance of exactly k successes in n tries is C(n, k) × p^k × (1 − p)^(n − k), the binomial formula. At most k adds up the chances for 0 to k, and at least k adds up the chances for k to n. For 10 flips of a fair coin, exactly 5 heads is 252 × 0.5^10 = 252 ÷ 1024 = 24.6094%. n can go up to 1,000. The page works in logarithms and adds up the terms directly, so a 1,000-try answer is not thrown off by the huge numbers inside C(n, k). A value too small to display is shown as less than 0.0001% with its exponent form. Answers are shown to 4 decimals in percent and 6 in decimal form.

Odds and probability

Odds compare the chance of an event happening with the chance of it not happening. A probability of 25% is odds of 1 : 3 in favour, 3 : 1 against, and a chance of 1 in 4. In reverse, odds of 3 : 2 in favour give 3 ÷ (3 + 2) = 60%. Odds written as 5 to 1 against give 1 ÷ (5 + 1) = 16.6667%, which is 1 in 6. Choose Against on the Odds to probability option for those. Probabilities with up to 6 decimals are turned into exact whole-number odds. Odds do not exist for exactly 0% or 100%, so the page shows a message instead. The page does not handle bookmaker margins or payouts.

Frequently asked questions

How do I calculate the probability of at least one success in several tries?

Use 1 − (1 − p)^n. With p = 10% and n = 10 tries the chance of no success is 0.9^10 = 0.348678, so the chance of at least one is 65.1322%. Type p and n in the Repeated tries option and the page shows each step.

What is the difference between P(A or B) and P(A xor B)?

P(A or B) counts the case where both happen, and P(A xor B) does not. For P(A) = 40% and P(B) = 25%, A or B is 55% and A xor B is 45%, the difference being P(A and B) = 10%.

How do I find the probability of exactly 3 heads in 5 coin flips?

Use C(5, 3) × 0.5^3 × 0.5^2 = 10 × 0.03125 = 31.25%. In the Repeated tries option enter 50%, n = 5 and k = 3. The exactly, at most and at least lines are shown together.

How do I turn odds like 5 to 1 into a probability?

For 5 to 1 against, the probability is 1 ÷ (5 + 1) = 16.6667%. For 5 : 1 in favour it is 5 ÷ 6 = 83.3333%. Choose the Odds to probability option, pick In favour or Against, and type 5 and 1.

Why does the page need independent events?

The product rule P(A) × P(B) only holds when A does not change B. Rolling a 6 on one die and heads on a coin are independent. Drawing two aces from one deck without replacement is not: the second chance is 3/51, not 4/52.

Are my numbers stored or sent anywhere?

No. The numbers are processed in your browser and are not uploaded. They are not stored on your device either, and reloading the page puts the example back. The page only counts that a result was shown, without any of your numbers.