Probability Calculator
Compute probabilities for single events, combined events, and conditional probabilities with instant results.
Reviewed by the ToolNestr Editorial Team — July 2026
How probability calculations work
Probability quantifies uncertainty on a scale from 0 (impossible) to 1 (certain). The simplest case is a single event: P(A) = number of favorable outcomes / total number of possible outcomes. For example, the probability of rolling a 4 on a fair six-sided die is 1/6 ≈ 0.167. This basic formula assumes all outcomes are equally likely.
When combining two events, the relationship between them determines the correct formula. The probability of A OR B (the union) accounts for potential overlap: P(A OR B) = P(A) + P(B) - P(A AND B). Without subtracting the intersection, the overlapping outcomes would be counted twice. When A and B are mutually exclusive (cannot both occur), P(A AND B) = 0 and the formula simplifies to P(A OR B) = P(A) + P(B).
Conditional probability measures how the probability of one event changes when we know another has occurred. P(A|B) = P(A AND B) / P(B). Events are independent when P(A|B) = P(A) — knowing B occurred does not change the probability of A. For independent events, P(A AND B) = P(A) × P(B), which provides a way to check the independence assumption using the calculator.
The formula explained
Union (OR)
P(A ∪ B) = P(A) + P(B) − P(A ∩ B)
The addition rule. Subtract the intersection to avoid double-counting overlapping outcomes.
Conditional
P(A|B) = P(A ∩ B) / P(B)
The probability of A given that B has occurred. Only defined when P(B) > 0.
Worked example: Drawing from a deck of cards
A = drawing a heart (13/52 = 0.25), B = drawing a face card (12/52 ≈ 0.231)
P(A AND B) = drawing a heart that is also a face card = 3/52 ≈ 0.058
P(A OR B) = 0.25 + 0.231 - 0.058 = 0.423 (42.3%)
P(A|B) = 0.058 / 0.231 = 0.25 (if you have a face card, 25% chance it is a heart)
Since P(A|B) = P(A) = 0.25, suit and face card are independent events.
Gamblers & Game Designers
Probability is the foundation of all games of chance. Understanding P(A OR B) and P(A AND B) helps calculate winning odds in card games, dice games, roulette, and lottery systems. Game designers use these formulas to balance mechanics.
Data Scientists
Probability theory underpins machine learning: Naive Bayes classifiers use conditional probability, random forests use probability thresholds, and hypothesis testing relies on p-values. Bayesian inference updates probabilities as new evidence arrives.
Risk Analysts
Insurance, finance, and safety professionals use probability to quantify risk. The probability of multiple independent failures (P AND P AND ...) decreases exponentially, which is why redundant safety systems are effective.
Students
Probability is a core topic in statistics and mathematics curricula. Understanding the OR/AND distinction, conditional probability, and Bayes' theorem is essential for exams and real-world statistical reasoning.
How to use the probability calculator
Enter probabilities
Type P(A) and P(B) as decimals between 0 and 1. Optionally enter P(A AND B) if known, or leave blank to use the independence assumption.
Review all results
The calculator automatically computes P(A AND B), P(A OR B), and both conditional probabilities P(A|B) and P(B|A), displayed as decimals and percentages.
Check independence
The calculator shows whether A and B are independent, mutually exclusive, or neither, based on the values you entered.
Tips for working with probability
Always check bounds
Probabilities must be between 0 and 1 inclusive. If P(A) + P(B) exceeds 1 but P(A AND B) is small, P(A OR B) will still be ≤ 1 because the intersection subtraction corrects the sum. Never report a probability outside [0, 1].
Complement rule
The probability that an event does NOT occur is P(not A) = 1 - P(A). This is often easier to calculate than P(A) directly. For example, the probability of rolling at least one 6 in three dice rolls is 1 - (5/6)³ ≈ 0.421.
Bayes' theorem connects conditionals
Bayes' theorem states P(A|B) = P(B|A) × P(A) / P(B). This powerful formula allows you to reverse conditional probabilities and is the foundation of Bayesian statistics, spam filters, and diagnostic testing.
Law of total probability
If events B₁, B₂, ..., Bₙ form a partition of the sample space, then P(A) = Σ P(A|Bᵢ) × P(Bᵢ). This law allows breaking complex probability calculations into simpler conditional pieces and is commonly used in decision trees.
Related tools
Frequently asked questions
What is probability?
Probability measures the likelihood of an event occurring on a scale from 0 (impossible) to 1 (certain). It is calculated as the number of favorable outcomes divided by the total number of possible outcomes.
How does P(A AND B) differ from P(A OR B)?
P(A AND B) is the probability that both events occur simultaneously (intersection). P(A OR B) is the probability that at least one event occurs (union). For mutually exclusive events, P(A AND B) = 0 and P(A OR B) = P(A) + P(B).
What is conditional probability?
Conditional probability P(A|B) is the probability of event A occurring given that event B has already occurred. It is calculated as P(A AND B) / P(B).
What are independent events?
Events A and B are independent if the occurrence of one does not affect the probability of the other. For independent events, P(A AND B) = P(A) × P(B) and P(A|B) = P(A).
What is the range of probability values?
Probabilities always range from 0 to 1 (or 0% to 100%). A probability of 0 means the event is impossible, 0.5 means equally likely as not, and 1 means certain to occur.