Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Probability Calculator

Exact answers with the working — from coin tosses and dice to Bayes’ theorem.

Math No upload Works offline Free, no sign-up
Type of problem

Probabilities can be typed as decimals (0.25), percentages (25%) or fractions (1/4); answers stay exact fractions where possible.

Try:

Probability

Probability —

    Steps

      Next steps

      About the Probability Calculator

      Work out probabilities with the formula and every step shown: a single event from its favourable and total outcomes; two events — and, or, neither, exactly one and the conditional probabilities — whether they are independent, mutually exclusive or overlap by a known amount; Bayes’ theorem from rates or from a 2 × 2 table of counts; the chance of at least one success (or exactly, at least or at most k) in n independent trials; and odds ↔ probability.

      For dice and cards the calculator counts the outcomes exactly: the chance of any total with up to 30 dice of any size, with a grid of the 36 outcomes of two dice, and the chance of drawing aces, hearts or any other kind of card — or coloured balls from a bag — with or without replacement. Type probabilities as decimals, percentages or fractions; the answers stay exact fractions such as 671/1296 wherever possible, with the decimal and the percentage next to them.

      How to use it

      1. Choose the type of problem: single event, two events, Bayes’ theorem, repeated trials, odds, dice, or cards & urns.
      2. Fill in what you know — probabilities as 0.25, 25% or 1/4, counts as whole numbers. For two events, say how they are related; you can also name them (A = “it rains”).
      3. Read the answer with its fraction, decimal and percentage, the other probabilities that follow, and the steps.
      4. For dice and repeated trials, look at the chart of the whole distribution; for two dice, at the grid of all 36 outcomes.
      5. Copy the result to paste into your notes or homework.

      Examples

      Two independent events
      Input
      P(A) = 0.5, P(B) = 0.4, independent
      Result
      P(A and B) = 0.5 × 0.4 = 0.2
      P(A or B) = 0.5 + 0.4 − 0.2 = 0.7 · neither: 0.3
      Bayes’ theorem and the base rate
      Input
      P(A) = 1%, P(B | A) = 90%, P(B | not A) = 5%
      Result
      P(B) = 0.9 × 0.01 + 0.05 × 0.99 = 0.0585
      P(A | B) = 0.009 ÷ 0.0585 = 2/13 ≈ 15.4%
      Out of 10,000: 90 of the 585 with B have A
      At least one six in four rolls
      Input
      p = 1/6 per roll, 4 rolls
      Result
      1 − (5/6)⁴ = 1 − 625/1296 = 671/1296 ≈ 0.5177
      Cards
      Input
      At least one ace in 2 cards from a 52-card deck
      Result
      1 − C(48, 2) ÷ C(52, 2) = 1 − 1128/1326 = 33/221 ≈ 0.1493

      Common uses

      • Checking school and college probability homework, including conditional probability and Bayes’ theorem.
      • Understanding why a positive result from a good test can still mean the condition is unlikely when it is rare (the base-rate effect).
      • Working out the chances in board games: dice totals, “at least one six”, drawing a card you need.
      • Planning how many attempts give a good chance of at least one success.

      The rules behind the answers

      • Complement: P(not A) = 1 − P(A).
      • Addition rule: P(A or B) = P(A) + P(B) − P(A and B); for mutually exclusive events P(A and B) = 0.
      • Multiplication rule: P(A and B) = P(A) × P(B | A); for independent events this is P(A) × P(B).
      • Conditional probability: P(A | B) = P(A and B) ÷ P(B).
      • Bayes’ theorem: P(A | B) = P(B | A) × P(A) ÷ [P(B | A) × P(A) + P(B | not A) × P(not A)].

      The calculator also checks that your numbers can belong together: P(A and B) can be neither larger than P(A) or P(B) nor smaller than P(A) + P(B) − 1.

      Independent is not the same as mutually exclusive

      Independent events do not affect each other: tossing heads does not change the chance of rolling a six, so P(heads and six) = ½ × 1/6 = 1/12. Mutually exclusive events cannot happen together: one roll of a die cannot show both 2 and 5. Two events that each have a probability above 0 can never be both — if they are mutually exclusive, knowing that one happened tells you the other did not, so they are not independent.

      Bayes’ theorem and natural frequencies

      Bayes’ theorem turns the probability of the evidence given a cause, P(B | A), into the probability of the cause given the evidence, P(A | B). The answer depends strongly on how common A is to begin with. With A in 1% of cases, B in 90% of those and B also in 5% of the others, out of 10,000 cases 100 have A and 90 of them show B, but so do 495 of the 9,900 without A — so only 90 of the 585 cases with B (15.4%) have A. The calculator shows this natural-frequency table for every Bayes problem, because it is much easier to follow than the formula.

      “At least one” and repeated trials

      The chance of at least one success in n independent trials is easiest through the complement: 1 − (1 − p)ⁿ. Exactly k successes follow the binomial formula C(n, k) pᵏ (1 − p)ⁿ⁻ᵏ, where C(n, k) counts the ways to choose which trials succeed; “at least k” and “at most k” add those terms. To reach a target chance of at least one success you need n ≥ ln(1 − target) ÷ ln(1 − p) trials, rounded up — 299 tries for a 95% chance when each has a 1% chance.

      Odds

      Odds in favour a : b mean a chances for and b against, so the probability is a ÷ (a + b); odds against a : b give b ÷ (a + b). A probability of 1/6 is odds of 1 : 5 in favour, or 5 : 1 against (written 5/1 as fractional odds). Decimal odds d imply a probability of 1 ÷ d; a bookmaker’s odds include a margin, so the implied probabilities of all outcomes of an event add up to more than 100%.

      Limitations

      • Outcomes are assumed to be equally likely where the calculator counts them (fair dice, a well-shuffled deck), and trials are assumed to be independent with the same chance each time.
      • Bayes’ theorem is only as good as the rates you put in. For a medical test, sensitivity, specificity and prevalence differ between tests and groups of people — the example shows the reasoning, not the meaning of any real result; ask a doctor about that.
      • Exact fractions are kept while they stay manageable; for very many trials the probability is computed in floating point instead — good to about 7 significant digits or better, more than the 6 shown — and the page says so. Probabilities too small for floating point (below 10⁻³⁰⁰) are still given, from their logarithm.
      • Dice: up to 30 dice with 2 to 100 sides. Cards: a standard 52-card deck without jokers, or any bag or deck you describe by its size and the number of items you count.

      Privacy

      Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.

      Frequently asked questions

      How do I calculate the probability of A or B?

      Add the two probabilities and subtract the overlap: P(A or B) = P(A) + P(B) − P(A and B). For independent events the overlap is P(A) × P(B): with P(A) = 0.5 and P(B) = 0.4 that is 0.5 + 0.4 − 0.2 = 0.7. For mutually exclusive events there is no overlap, so you just add.

      How do I find the probability of at least one?

      Work out the chance of none and subtract it from 1. The chance of at least one six in four rolls of a die is 1 − (5/6)⁴ = 671/1296 ≈ 51.8%. Choose Repeated trials and At least one success.

      What is the probability of rolling a 7 with two dice?

      1/6. Two dice have 6 × 6 = 36 equally likely outcomes, and six of them add up to 7: (1, 6), (2, 5), (3, 4), (4, 3), (5, 2) and (6, 1). Seven is the most likely total; 2 and 12 are the least likely, at 1/36 each.

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

      P(A | B) is the chance of A when you know B happened; P(B | A) is the chance of B when you know A happened. They are usually different — the chance that a person with a cough has the flu is not the chance that a person with the flu has a cough. Bayes’ theorem converts one into the other.

      How do I turn odds into a probability?

      For odds in favour a : b, the probability is a ÷ (a + b): odds of 3 : 1 in favour mean 3 ÷ 4 = 75%. For odds against a : b it is b ÷ (a + b): 5 : 1 against means 1 ÷ 6 ≈ 16.7%. Decimal odds of 2.5 imply 1 ÷ 2.5 = 40%.

      Does it matter whether cards are put back?

      Yes. Without replacement each draw changes what is left, which is the hypergeometric distribution: at least one ace in two cards is 33/221 ≈ 14.9%. With replacement every draw has the same 4/52 chance, which is the binomial distribution: 1 − (12/13)² = 25/169 ≈ 14.8%.

      Quick answers and tool search

      Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.