Probability Calculator
Enter the number of favorable outcomes and the total possible outcomes to calculate the probability of a single event.
Enter probabilities for two independent events. Values must be between 0 and 1 (e.g., 50% = 0.5).
Conditional probability gives the likelihood of event A occurring given that event B has already occurred.
Bayes' theorem updates the probability of hypothesis A after observing evidence B. Enter prior probability, likelihood, and false-positive rate.
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
Select Single Event, Two Events, Conditional, or Bayes' Theorem based on your problem.
Input outcomes or probabilities in the fields provided. Use decimals for probabilities (0 to 1).
All probability values are calculated in real time as you type.
The results panel shows each calculation step so you can verify and learn the process.
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?
Total balls: 3 + 7 = 10. So n(S) = 10.
There are 3 red balls. So n(E) = 3.
P(red) = n(E) / n(S) = 3 / 10 = 0.3
P(not red) = 1 − 0.3 = 0.7 (70% chance of not picking red)
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
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).
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.
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).
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.