Skip to content
Statculator

Probability Calculators: Events, Bayes & Counting

Free probability calculators for two events (and, or, not), conditional probability, Bayes’ theorem, combinations, permutations and factorials, with steps.

Open the Probability Calculator

Updated · Formulas and conventions follow our methodology

In short

Probability measures how likely an event is, from 0 (impossible) to 1 (certain). When every outcome is equally likely, P(A) = favorable outcomes ÷ total outcomes: one roll of a die gives P(6) = 1/6 ≈ 0.1667. The calculators on this hub combine two events with the and, or and not rules, find conditional probabilities and Bayes’ theorem updates, count combinations, permutations and factorials exactly, and generate random numbers.

Enter P(A) and P(B) as decimals, percentages or fractions such as 1/6, say whether the events are independent, mutually exclusive or overlap by a known amount, and the calculator returns every combined probability with a joint probability table, a chart and each step. Questions with “given that” and test-result updates have their own calculators, listed below.

  • P(A and B)
  • P(A or B)
  • P(not A), P(not B)
  • Exactly one, neither
  • P(A | B), P(B | A)
Open the Probability Calculator

All 7 probability and counting calculators

What these probability calculators cover

The Probability Calculator handles questions about two events: P(A and B), P(A or B), complements, exactly one and neither. It needs to know how the events relate. Independent events do not affect each other, so P(A ∩ B) = P(A) · P(B). Mutually exclusive events cannot happen together, so P(A ∩ B) = 0. For any other pair, enter the overlap P(A ∩ B) directly. If the question says “given that” or “if we know”, it is a conditional probability and belongs in the Conditional Probability Calculator. If you know P(B | A) but need P(A | B), as with a medical test, a spam filter or a quality check, use the Bayes’ Theorem Calculator.

Counting problems split on one question: does order matter? If it does (rankings, codes, seating plans), count permutations; if it does not (committees, lottery tickets, card hands), count combinations. Both are built on factorials, and Statculator computes them with exact integer arithmetic, so C(52, 5) = 2,598,960 and 100!, a 158-digit number, come out exactly. To simulate dice, coin flips or a lottery draw, or to pick a random sample with or without repeats, use the Random Number Generator. For the probability of a number of successes across many trials, continue to Probability Distribution Calculators.

How to calculate a probability, step by step

  1. List the outcomes. Write down the sample space, every outcome that can happen, and check whether the outcomes are equally likely. A fair die has 6 equally likely outcomes; “rain or no rain” usually does not.
  2. Count the favorable outcomes. For small problems count them directly. For larger ones use the Combination Calculator when order does not matter and the Permutation Calculator when it does.
  3. Divide. For equally likely outcomes, P(A) = favorable ÷ total. Rolling an even number on a die gives 3 ÷ 6 = 0.5.
  4. Combine events with the rules. Use the complement for “not”, the addition rule for “or”, the multiplication rule for “and”, and P(A | B) when one event is known to have happened. The table further down lists each formula.
  5. Check the answer. Every probability lies between 0 and 1, and P(A) + P(not A) = 1. If “at least one” is hard to count, find 1 − P(none) instead.

Probability worked examples

Two problems of the kind the calculators on this hub solve. Enter the probabilities in the Probability Calculator, or the counts in the Combination Calculator, to check each value.

Drawing marbles from a bag, with and without replacement

Problem. A bag holds 4 red and 6 blue marbles. You draw two marbles. What is the probability that both are red, and that at least one is red?

  1. 01Without replacement, the first marble stays out, so the second draw has 9 marbles left. Multiply along the branch, or count pairs with combinations.
    P(both red) = 4/10 × 3/9 = 12/90 = 2/15 ≈ 0.1333
    Check: C(4, 2) / C(10, 2) = 6 / 45 = 0.1333
  2. 02With replacement, the first marble goes back, so the two draws are independent and the multiplication rule applies directly.
    P(both red) = 0.4 × 0.4 = 0.16
  3. 03At least one red, without replacement: find the complement, both blue, and subtract it from 1.
    P(both blue) = 6/10 × 5/9 = 30/90 = 1/3
    P(at least one red) = 1 − 1/3 = 2/3 ≈ 0.6667

Answer. Both red: 0.1333 without replacement and 0.16 with replacement. At least one red without replacement: 0.6667. The three outcomes, both red (2/15), one of each (8/15) and both blue (5/15), add up to 1.

At least one six in four rolls of a die

Problem. You roll a fair die four times. What is the probability of rolling at least one six?

  1. 01Use the complement. “At least one six” has many cases; “no six” has one. Each roll misses a six with probability 5/6, and the rolls are independent.
    P(no six in 4 rolls) = (5/6)⁴ = 625/1296 ≈ 0.4823
  2. 02Subtract from 1.
    P(at least one six) = 1 − 625/1296 = 671/1296 ≈ 0.5177

Answer. The chance of at least one six in four rolls is about 51.8%, slightly better than even. Adding the separate chances (4 × 1/6 = 0.667) overcounts, because it counts rolls with two or more sixes more than once.

Which probability calculator should I use?

If you want to…Use
If you want P(A and B), P(A or B) or the complement for two events
If you want the probability of A given that B has happened
If you want to update a prior probability with new evidence, such as a test result
If you want to count selections where order does not matter (committees, card hands, lotteries)
If you want to count arrangements where order matters (rankings, codes, seating)
If you need n! exactly, even for large n
If you want random numbers, a random sample without repeats, or a simulated dice roll or lottery draw
If you want the probability of exactly k or at least k successes in n independent trials
If you draw without replacement and want the probability of exactly k successes
If you want a probability from a normal distribution, such as P(X < 110)

Probability of a series of independent events

When the same event can happen on each of n independent trials with probability p, three formulas cover most questions: all n succeed with probability pⁿ, none succeed with probability (1 − p)ⁿ, and at least one succeeds with probability 1 − (1 − p)ⁿ. If 5% of items are defective, the chance that a sample of 20 contains at least one defective item is 1 − 0.95²⁰ = 1 − 0.3585 = 0.6415.

For the probability of exactly k successes, or of k or more, use the Binomial Distribution Calculator. When you draw without replacement from a small population, such as cards from a deck, the trials are not independent; use the Hypergeometric Distribution Calculator instead.

Probability as a percentage, fraction or odds

The same probability can be written several ways. A probability of 25% is 0.25 or 1/4: the event happens about 1 time in 4, and the odds are 1 to 3 in favor (3 to 1 against). A probability of 70% is 0.7 or 7/10, and the odds are 7 to 3 in favor. To turn odds of a to b in favor into a probability, compute a ÷ (a + b): odds of 7 to 3 give 7 ÷ 10 = 0.7.

A probability is a long-run frequency, not a promise about the next try. Theoretical probability comes from counting equally likely outcomes, such as 1/6 for a six. Experimental probability is the share of times the event happened in real trials, and by the law of large numbers it settles close to the theoretical value as the number of trials grows. You can see this by simulating a few hundred dice rolls with the Random Number Generator.

Probability rules and counting formulas

RuleFormulaExample
Equally likely outcomesP(A) = favorable outcomes ÷ total outcomesEven number on a die: 3 ÷ 6 = 0.5
ComplementP(not A) = 1 − P(A)P(A) = 0.3 gives P(not A) = 0.7
Addition ruleP(A ∪ B) = P(A) + P(B) − P(A ∩ B)0.5 + 0.4 − 0.2 = 0.7
Multiplication rule (independent events)P(A ∩ B) = P(A) · P(B)Two heads: 0.5 × 0.5 = 0.25
Conditional probabilityP(A | B) = P(A ∩ B) / P(B)0.2 / 0.4 = 0.5
Bayes’ theoremP(A | B) = P(B | A) · P(A) / P(B)1% prevalence, 95% sensitivity, 5% false positives: P(disease | positive) = 0.161
At least one in n independent trials1 − (1 − p)ⁿAt least one six in 4 rolls: 1 − (5/6)⁴ = 0.5177
Odds to probabilityOdds a : b in favor gives P = a ÷ (a + b)Odds 7 : 3 give 0.7
Factorialn! = n × (n − 1) × … × 1, with 0! = 15! = 120
PermutationsP(n, r) = n! / (n − r)!P(10, 3) = 720
CombinationsC(n, r) = n! / [r! (n − r)!]C(52, 5) = 2,598,960

Frequently asked questions

How do I calculate a probability?

When all outcomes are equally likely, divide the number of favorable outcomes by the total number of outcomes: drawing a heart from a 52-card deck has probability 13/52 = 0.25. For combined events, use the complement rule for “not”, the addition rule for “or” and the multiplication rule for “and”. The Probability Calculator applies these rules to any two events and shows each step.

What is the probability of rolling six dice?

It depends on the outcome you want. With six fair dice, the probability of at least one six is 1 − (5/6)⁶ ≈ 0.6651, of all six dice showing the same number is 6/6⁶ = 1/7,776 ≈ 0.000129, and of six different numbers is 6!/6⁶ = 720/46,656 ≈ 0.0154. Each comes from counting outcomes out of the 6⁶ = 46,656 equally likely results.

What does a probability of 25% or 70% mean?

A probability of 25% means the event is expected about 1 time in 4 over many repetitions; as a fraction it is 1/4 and as odds it is 1 to 3 in favor. A probability of 70% means about 7 times in 10, or odds of 7 to 3 in favor. Neither guarantees what happens on a single try.

What is the difference between a permutation and a combination?

A permutation counts arrangements where order matters, and a combination counts selections where it does not. Choosing 3 of 10 people for gold, silver and bronze gives P(10, 3) = 720 permutations, but choosing 3 of 10 for a committee gives C(10, 3) = 120 combinations. Each combination corresponds to 3! = 6 permutations.

What is the difference between conditional probability and Bayes’ theorem?

Conditional probability P(A | B) is the probability of A once you know B has happened. Bayes’ theorem is a rule for reversing a conditional probability, computing P(A | B) from P(B | A) and the prior P(A). Use the Conditional Probability Calculator for the first and the Bayes’ Theorem Calculator for the second.

How do I know whether two events are independent?

Two events are independent when P(A ∩ B) = P(A) · P(B), or equivalently when P(A | B) = P(A), so knowing one tells you nothing about the other. Do not confuse independence with mutual exclusivity: mutually exclusive events cannot happen together, so if both have positive probability they are dependent.

Why can a positive result on an accurate test still be unlikely to be correct?

When a condition is rare, false positives from the large healthy group can outnumber true positives from the small affected group. With 1% prevalence, 95% sensitivity and a 5% false-positive rate, only about 16.1% of positive results are true positives. Bayes’ theorem makes this calculation explicit.

Looking for something else? See all calculators or search the site.