Probability Calculator
Calculate probability by entering the number of successful events and total events.
What Is Probability?
Probability is a branch of mathematics that measures 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 the event is certain. The basic formula for probability is:
For example, the probability of rolling a 4 on a standard six-sided die is P(4) = 1/6 = 0.1667, or about 16.67%. Probability is foundational to statistics, data science, risk management, gaming theory, and decision-making under uncertainty.
Basic Probability Rules
Several fundamental rules govern how probabilities combine and interact:
- Complement Rule: The probability that an event does not occur is P(not A) = 1 - P(A). If there is a 30% chance of rain, there is a 70% chance it will not rain.
- Addition Rule: For two mutually exclusive events (they cannot happen at the same time), P(A or B) = P(A) + P(B). For non-mutually exclusive events, P(A or B) = P(A) + P(B) - P(A and B).
- Multiplication Rule: For independent events, P(A and B) = P(A) x P(B). The probability of flipping heads twice in a row is 0.5 x 0.5 = 0.25.
Independent vs. Dependent Events
Two events are independent if the outcome of one does not affect the outcome of the other. Coin flips are a classic example -- the result of the first flip has no bearing on the second. When events are independent, the multiplication rule above applies directly.
Events are dependent when the outcome of one event changes the probability of the other. For instance, drawing cards from a deck without replacement is a dependent scenario. After drawing one ace from a 52-card deck, the probability of drawing another ace changes from 4/52 to 3/51.
Conditional Probability and Bayes' Theorem
Conditional probability measures the likelihood of an event occurring given that another event has already occurred. It is written as P(A | B) and calculated as:
Bayes' Theorem extends conditional probability by allowing you to reverse the condition -- computing P(A | B) when you know P(B | A). The formula is:
Bayes' Theorem is widely used in medical testing (determining the probability of a disease given a positive test result), spam filtering, machine learning, and forensic analysis.
Common Probability Distributions
Probability distributions describe how probabilities are spread across possible outcomes. The following table summarizes the most commonly encountered distributions:
| Distribution | Type | Use Case |
|---|---|---|
| Binomial | Discrete | Number of successes in fixed trials (e.g., coin flips) |
| Poisson | Discrete | Events per time period (e.g., customer arrivals) |
| Normal (Gaussian) | Continuous | Natural phenomena (e.g., heights, test scores) |
| Uniform | Continuous | Equal likelihood outcomes (e.g., rolling a fair die) |
| Exponential | Continuous | Time between events (e.g., equipment failure) |
Probability vs Odds: What's the Difference?
Probability and odds both describe the likelihood of an event, but they express it differently. Confusing them is one of the most common mistakes in statistics, gambling, and medical research.
Probability
Favorable outcomes ÷ Total outcomes
Range: 0 to 1 (or 0% to 100%)
P(rolling a 6) = 1/6 ≈ 16.7%
Odds
Favorable outcomes : Unfavorable outcomes
Can range from 0 to infinity
Odds(rolling a 6) = 1:5 (1 to 5 against)
| Event | Probability | Odds (for) | Context |
|---|---|---|---|
| Coin flip (heads) | 50% | 1:1 (even) | Classic 50/50 |
| Rolling a 6 on a die | 16.7% | 1:5 against | Casino dice games |
| Drawing an ace from deck | 7.7% | 1:12 against | Card games |
| Winning a coin toss 3× straight | 12.5% | 1:7 against | Tournament bracket |
| Rain forecast (70% chance) | 70% | 7:3 in favor | Weather prediction |
Converting: Probability → Odds: Odds = P / (1 − P). A 75% probability = 0.75 / 0.25 = 3:1 odds in favor. Odds → Probability: P = favorable / (favorable + unfavorable). 3:1 odds = 3/4 = 75%.
Real-World Probability Examples
Probability calculations appear everywhere in daily life — from medical testing to weather forecasts to birthday statistics. Here are some instructive real-world scenarios:
Birthday Problem
How many people do you need in a room for a 50%+ chance that two share a birthday? Answer: just 23. With 50 people, the probability jumps to 97%. This counterintuitive result occurs because you're counting all possible pairs, not just matches with one specific person.
Medical Testing: False Positives
A cancer test is 99% accurate. The disease affects 1% of the population. If you test positive, what's the probability you actually have cancer? Using Bayes' theorem: only ~50%. Among 10,000 people: 100 have cancer (99 test positive), 9,900 are healthy (99 test positive by mistake). So 99/(99+99) = 50%. Sensitivity alone is misleading — base rate matters.
Monty Hall Problem
You pick 1 of 3 doors. The host opens a losing door. Should you switch? Yes! Switching wins 2/3 of the time. Initially, your door has P = 1/3 and the other two combined have P = 2/3. When one losing door is revealed, the remaining unopened door carries the full 2/3 probability.
Password Probability
An 8-character password using uppercase, lowercase, numbers, and symbols (95 possible characters): 95⁸ ≈ 6.6 quadrillion combinations. At 1 billion guesses per second, cracking takes ~76 days on average. Adding just 2 more characters (10 total) raises that to 12,000 years.