BY: Statistics Fundamentals Team
Reviewed By: Minsa A (Senior Statistics Editor)

Probability Calculator

Compute probability for single events, two independent events, conditional probability, and Bayes' theorem — with instant step-by-step solutions.

Probability Calculator

Formula P(E) = n(E) / n(S)

Enter the number of favorable outcomes and the total possible outcomes to calculate the probability of a single event.

How many outcomes are successes?
Total outcomes in the sample space
AND P(A∩B) = P(A) × P(B) OR P(A∪B) = P(A) + P(B) − P(A∩B)

Enter probabilities for two independent events. Values must be between 0 and 1 (e.g., 50% = 0.5).

Enter as decimal (e.g. 0.5 = 50%)
Enter as decimal (e.g. 0.3 = 30%)
Formula P(A|B) = P(A∩B) / P(B)

Conditional probability gives the likelihood of event A occurring given that event B has already occurred.

Probability that both A and B occur
Must be greater than 0
Formula P(A|B) = P(B|A) × P(A) / [P(B|A)·P(A) + P(B|A')·P(A')]

Bayes' theorem updates the probability of hypothesis A after observing evidence B. Enter prior probability, likelihood, and false-positive rate.

Probability of hypothesis A before evidence
Probability of evidence B given A is true
Probability of B given A is false

What Is Probability?

Probability is the measure of how likely an event is to occur. It is expressed as a number between 0 and 1, where 0 means the event is impossible and 1 means it is certain. In everyday language we often express probability as a percentage: a 75% chance is a probability of 0.75.

Probability theory forms the mathematical foundation of statistics, machine learning, risk analysis, and decision-making. Understanding how to correctly calculate and interpret probability is essential for working with data in any field.

Types of probability calculations

  • Single event probability: the likelihood of one specific outcome out of all possible outcomes.
  • Two independent events: when the outcome of one event does not affect the other, such as two separate coin flips.
  • Conditional probability: the probability of an event occurring given that another event has already occurred.
  • Bayes' theorem: a method for updating the probability of a hypothesis after observing new evidence.

Formulas used in this calculator

Single Event

P(E) = n(E) / n(S) n(E) = favorable outcomes n(S) = total outcomes

Complement Rule

P(A') = 1 − P(A) P(A) + P(A') = 1

Independent Events (AND)

P(A∩B) = P(A) × P(B)

Addition Rule (OR)

P(A∪B) = P(A) + P(B) − P(A∩B)

Exactly One (XOR)

P(AΔB) = P(A∪B) − P(A∩B)

Neither Event

P(A'∩B') = (1−P(A)) × (1−P(B))

Conditional Probability

P(A|B) = P(A∩B) / P(B) Requires P(B) > 0

Bayes' Theorem

P(A|B) = P(B|A) × P(A) / [P(B|A)·P(A) + P(B|A')·P(A')]

Step-by-step guide

1
Choose the calculator type

Select Single Event, Two Events, Conditional, or Bayes' Theorem based on your problem.

2
Enter your values

Input outcomes or probabilities in the fields provided. Use decimals for probabilities (0 to 1).

3
Results update instantly

All probability values are calculated in real time as you type.

4
Review step-by-step workings

The results panel shows each calculation step so you can verify and learn the process.

5
Try the example button

Each tab includes a pre-loaded example to demonstrate how the calculator works.

Worked example

Problem: A bag contains 3 red balls and 7 blue balls. What is the probability of picking a red ball at random?

Identify the sample space

Total balls: 3 + 7 = 10. So n(S) = 10.

Identify favorable outcomes

There are 3 red balls. So n(E) = 3.

Apply the formula

P(red) = n(E) / n(S) = 3 / 10 = 0.3

Calculate the complement

P(not red) = 1 − 0.3 = 0.7 (70% chance of not picking red)

Express as percentage

P(red) = 0.3 = 30%

The probability of picking a red ball is 0.3 (30%). The complement — picking any non-red ball — is 0.7 (70%). Together they sum to 1, confirming the complement rule: P(E) + P(E') = 1.

How to interpret probability results

A probability of 0 means the event is impossible; a probability of 1 means it is certain. Values closer to 0.5 indicate high uncertainty, while values close to 0 or 1 indicate strong certainty in one direction.

For two independent events, the AND probability is always less than or equal to either individual probability. The OR probability is always greater than or equal to either individual probability but never exceeds 1.

When using Bayes' theorem, the posterior probability can be surprisingly different from the prior if the false-positive rate is high relative to the base rate — a critical insight in medical testing and machine learning classification.

Frequently Asked Questions

What is the probability formula?
The basic probability formula is P(E) = n(E) / n(S), where n(E) is the number of favorable outcomes and n(S) is the total number of outcomes. For example, the probability of rolling a 4 on a fair die is 1/6 (about 0.167).
What is the difference between independent and dependent events?
Independent events do not affect each other. For example, flipping a coin twice, the first result does not change the second. Dependent events do affect each other, such as drawing cards without replacement.
When should I use conditional probability?
Use conditional probability when you already know that another event has happened. It adjusts the probability based on this information using P(A|B) = P(A∩B) / P(B).
Why can Bayes' theorem give surprising results?
Bayes' theorem can seem surprising when the original probability (base rate) is very low. Even highly accurate tests can produce many false positives if the condition being tested is rare.