Probability Calculator

Calculate single event probability, complement, union, intersection, conditional probability, Bayes' theorem, permutations, and combinations. Free, private, and runs entirely in your browser.

Probability Input

P(A) = favourable ÷ total. Example: rolling a 3 on a fair die → 1/6.
P(A′) = 1 − P(A). Enter a decimal between 0 and 1.
P(A ∪ B) = P(A) + P(B) − P(A ∩ B). Use 0 if A and B are mutually exclusive.
P(A ∩ B) = P(A) × P(B|A). If A and B are independent, P(B|A) = P(B).
P(A | B) = P(A ∩ B) ÷ P(B). Requires P(B) > 0.
P(A | B) = [P(B | A) × P(A)] ÷ P(B). Classic use: medical test accuracy.
nPr = n! ÷ (n − r)!. Order matters. n must be ≥ r.
nCr = n! ÷ [r! × (n − r)!]. Order does not matter.

Choose a calculation type, enter values, and click Calculate to see the result.

What does this probability calculator do?

This free online probability calculator handles the most common probability problems you'll encounter in statistics, maths homework, and real-world decision making. It covers single event probability, complements, unions, intersections, conditional probability, Bayes' theorem, permutations, and combinations.

Probability is the branch of mathematics that deals with uncertainty. It tells you how likely an event is to occur, expressed as a number between 0 (impossible) and 1 (certain). Whether you're calculating the odds of rolling a six, estimating the accuracy of a medical test, or working out how many ways you can arrange a set of items, this tool gives you the answer instantly — with the formula shown so you can follow along.

How to use the probability calculator

  1. Pick a calculation type: Choose from Single Event, Complement, Union, Intersection, Conditional, Bayes' Theorem, Permutations, or Combinations using the tabs.
  2. Enter your values: Fill in the input fields. Probabilities go between 0 and 1 (e.g. 0.25 for 25%). Counts are whole numbers.
  3. Click Calculate: The result appears instantly in the result panel, along with the formula used.
  4. Read the result: You'll see the answer as a decimal, a percentage, and a simplified fraction where possible.

Use the Reset button to clear all fields and start fresh.

Why use this probability calculator?

100% private

Everything runs in your browser. The numbers you enter never leave your device — no server, no logs, no tracking.

Eight calculation modes

Single event, complement, union, intersection, conditional, Bayes' theorem, permutations, and combinations.

Formula shown

Every result comes with the formula used, so you can learn the method as you calculate.

Multiple formats

Results shown as decimal, percentage, and simplified fraction — whatever is most useful for your problem.

Clear error messages

Invalid inputs like P(B) = 0 for conditional probability are caught with helpful explanations.

Works offline

Once the page loads, you can perform probability calculations without an internet connection.

Probability concepts explained

Single event probability

The probability of a single event A is the number of favourable outcomes divided by the total number of equally likely outcomes. If you roll a fair six-sided die, the probability of rolling a 3 is 1 favourable outcome ÷ 6 total outcomes = 1/6 ≈ 0.1667.

Complement

The complement of event A, written A′ or Aᶜ, is the probability that A does not happen. It is calculated as 1 − P(A). If the probability of rain tomorrow is 0.3, the probability of no rain is 0.7. The sum of an event and its complement is always exactly 1.

Union (A ∪ B)

The union is the probability that event A or event B (or both) occurs. The formula P(A ∪ B) = P(A) + P(B) − P(A ∩ B) avoids double-counting the overlap. If A and B are mutually exclusive (they cannot both happen), P(A ∩ B) = 0 and the formula simplifies to P(A) + P(B).

Intersection (A ∩ B)

The intersection is the probability that both A and B occur. Using conditional probability, P(A ∩ B) = P(A) × P(B|A). If A and B are independent, P(B|A) = P(B), so P(A ∩ B) = P(A) × P(B). For example, the probability of flipping heads twice in a row is 0.5 × 0.5 = 0.25.

Conditional probability (A | B)

Conditional probability is the probability of A given that B has already occurred. P(A|B) = P(A ∩ B) ÷ P(B). It requires P(B) > 0. This concept is central to Bayesian statistics and machine learning.

Bayes' theorem

Bayes' theorem updates a prior probability with new evidence. P(A|B) = [P(B|A) × P(A)] ÷ P(B). A classic example: a medical test is 90% accurate (P(B|A) = 0.9), the disease affects 1% of people (P(A) = 0.01), and 5% of tests are positive (P(B) = 0.05). Then P(disease | positive test) = (0.9 × 0.01) ÷ 0.05 = 0.18 — just 18%.

Permutations (nPr)

A permutation counts the number of ways to arrange r items chosen from n items where order matters. nPr = n! ÷ (n − r)!. For example, the number of ways to arrange 3 books from a shelf of 10 is 10P3 = 10! ÷ 7! = 720.

Combinations (nCr)

A combination counts the number of ways to choose r items from n items where order does not matter. nCr = n! ÷ [r! × (n − r)!]. For example, the number of ways to choose 3 people from a group of 10 is 10C3 = 120.

Where probability is used

  • Statistics: Hypothesis testing, confidence intervals, and p-values all rely on probability.
  • Machine learning: Bayesian inference, classification, and probabilistic models.
  • Medicine: Interpreting diagnostic tests, estimating risk, and clinical trials.
  • Finance: Risk assessment, option pricing, and portfolio theory.
  • Gaming: Calculating odds in poker, dice games, and lottery draws.
  • Engineering: Reliability analysis and quality control.
  • Weather forecasting: Expressing the likelihood of rain, storms, and other events.

Frequently asked questions

Yes, completely free. No signup, no watermark, no hidden charges. Perform as many probability calculations as you want.
It supports single event probability, complement, union of two events, intersection of two events, conditional probability, Bayes' theorem, permutations (nPr), and combinations (nCr).
Absolutely. Everything runs in your browser using JavaScript. The numbers you enter never leave your device — there is no server processing, no logging, and no data storage.
Permutations count arrangements where order matters, while combinations count selections where order does not matter. For example, AB and BA are different permutations but the same combination. The formula for permutations is n! ÷ (n − r)!, and for combinations it is n! ÷ [r! × (n − r)!].
The complement of event A is the probability that A does not occur. It is calculated as 1 minus the probability of A. The sum of an event and its complement is always 1.
No. Probability is always between 0 and 1 inclusive. A probability of 0 means the event is impossible, and 1 means it is certain. Any value outside this range indicates a calculation error or invalid input.
Bayes' theorem updates the probability of an event based on new evidence. It is widely used in statistics, machine learning, medical testing, spam filtering, and any situation where you need to revise a belief in light of new data.
Conditional probability P(A|B) is defined as P(A ∩ B) ÷ P(B). If P(B) = 0, you would be dividing by zero, which is undefined. If event B cannot occur, asking "what is the probability of A given B" has no meaning.