Probability Calculator

Choose what you want to calculate below, enter your values, and click Calculate.

Single Event: probability equals favorable outcomes divided by total possible outcomes.

Both values should be whole numbers. Favorable Outcomes cannot be greater than Total Possible Outcomes.

Result

What Is Probability?

Probability is a way of putting a number on uncertainty. It answers the question "how likely is this?" with a value between 0 and 1, where 0 means an event is impossible and 1 means it is certain. Everything in between describes a shade of likelihood: a probability of 0.5 means an event is exactly as likely to happen as not, a probability of 0.9 means it will almost always happen, and a probability of 0.1 means it will happen only rarely. Probability can also be written as a percentage (a probability of 0.5 is the same thing as 50%) or as a fraction (the same event might be described as a 1 in 2 chance). All three descriptions carry identical information; they are just different notations for the same underlying number, which is exactly why this calculator accepts decimals, percentages, and fractions interchangeably for every input.

Formally, the probability of an event A is defined as the number of outcomes that count as A happening, divided by the total number of equally likely outcomes that could happen. This ratio, favorable outcomes over total outcomes, is the foundation that almost every other rule in probability is built from. Once you understand that single idea, the complement rule, the AND rule, the OR rule, conditional probability, and even Bayes' theorem all become variations on the same theme: counting how much of the "universe" of possibilities a particular event covers.

The Probability Scale: 0 to 1
0 0.5 1 Impossible Unlikely Even Chance Likely Certain
Every probability, no matter how it was calculated, lands somewhere on this same 0-to-1 line. A result below 0 or above 1 always signals a mistake, never a valid answer.

Sample Spaces and Single Events

The set of every possible outcome of an action is called the sample space. Roll one six-sided die and the sample space has six equally likely outcomes: 1, 2, 3, 4, 5, and 6. If you want the probability of rolling an even number, three of those six outcomes count as "favorable" (2, 4, and 6), so P(even) = 3/6 = 0.5. This favorable-over-total pattern is exactly what the Single Event mode of this calculator computes, and it is the same reasoning you would use for drawing a card, spinning a wheel, or picking a name out of a hat, as long as every outcome in the sample space is equally likely.

Sample Space: One Die, Six Outcomes
3 favorable (purple) out of 6 total → P(even) = 3/6 = 0.5
Sample Space: Two Coins, Four Outcomes
H H H T T H T T
Flip two coins and there are 4 equally likely outcomes. Only 1 of them is two heads, so P(two heads) = 1/4 = 0.25. Notice that HT and TH are counted separately, since which coin lands heads matters when you list every outcome.

The Favorable-Outcomes Mode: Working Backward

Sometimes a problem gives you a probability and asks you to find the count instead. Suppose a raffle says your odds of winning are 0.15, and you know there are 40 tickets total; how many of those tickets are winners? Rearranging P = favorable ÷ total gives favorable = P × total = 0.15 × 40 = 6. The Favorable Outcomes mode above performs exactly this algebra in both directions, letting you solve for the favorable count when you know the total, or solve for the total when you know the favorable count.

The Complement Rule

The complement of an event A, written ¬A or "not A," is everything in the sample space that is not A. Because A and ¬A together account for the entire sample space, their probabilities must add up to exactly 1. That gives the complement rule: P(¬A) = 1 − P(A). This is one of the most useful shortcuts in probability, because some questions are far easier to answer by calculating the opposite event and subtracting from 1 than by calculating the event directly. "What is the probability of rolling at least one six in four rolls of a die?" is awkward to compute directly, because there are many ways to get at least one six. It is much easier to compute the probability of getting zero sixes in four rolls, then subtract that from 1, which is precisely the logic behind the At Least One mode described later in this article.

The Complement Bar: P and 1 − P
P(A) = 0.76 1−P(A) 0 1
The whole bar always equals 1. Whatever share A does not occupy belongs entirely to ¬A.

Combining Events: The AND Rule

When you need the probability that two events both happen, you are looking for P(A and B), also written P(A∩B). If A and B are independent, meaning the outcome of one has no bearing whatsoever on the other, the AND rule is simply P(A and B) = P(A) × P(B). Flipping a coin and rolling a die are independent: the coin has no idea what the die is going to do. P(heads and a six) = 0.5 × 1/6 = 1/12.

If A and B are dependent, the multiplication rule still applies, but the second probability must be replaced with the conditional probability of B given that A has already happened: P(A and B) = P(A) × P(B|A). Drawing two cards from a deck without putting the first one back is a dependent situation, because removing a card changes the composition of the remaining deck, which changes the odds for the second draw. The AND mode of this calculator lets you switch between these two cases explicitly, so you are never accidentally applying the simpler independent formula to a dependent situation.

AND: The Overlap of A and B
A B A∩B
The darker lens where the two circles overlap is A∩B: outcomes belonging to both events. That darker region is exactly the probability the AND rule calculates.

Combining Events: The OR Rule

P(A or B), written P(A∪B), is the probability that at least one of the two events happens. It is tempting to just add P(A) + P(B), but that double-counts any outcome where both events happen at once. The correct OR rule subtracts that overlap back out: P(A or B) = P(A) + P(B) − P(A∩B). If A and B are mutually exclusive, meaning they share no outcomes at all and can never both happen, then P(A∩B) = 0 and the formula simplifies to the simple sum P(A or B) = P(A) + P(B). The OR mode above includes a mutually-exclusive toggle for exactly this simplification, and it also reports "Exactly One," the probability that precisely one of the two events happens but not both, which equals P(A) + P(B) − 2P(A∩B).

OR: The Union of A and B
A B
Every shaded outcome, in either circle, counts toward A∪B. The overlap is included once, not twice, which is why the OR rule subtracts P(A∩B) after adding the two probabilities.

Independence vs. Mutual Exclusivity: Not the Same Idea

These two terms sound similar and get confused constantly, but they describe opposite relationships. Two events are mutually exclusive when they cannot both happen: if one occurs, the other is automatically ruled out. Rolling a 2 and rolling a 5 on the same single die roll are mutually exclusive, because the die shows exactly one number. Two events are independent when knowing that one happened tells you nothing about whether the other happened. Flipping heads on one coin and flipping heads on a completely separate coin are independent, because the coins do not influence each other.

Here is the key insight that trips people up: two events that are mutually exclusive are, except in a trivial edge case, never independent, and two events that are independent are, except in a trivial edge case, never mutually exclusive. If A and B are mutually exclusive with both having a nonzero probability, then A happening guarantees B did not happen, which is about as far from "no effect on B" as you can get, so they cannot be independent. This is not just a technicality: plugging mutually-exclusive events into the independent AND formula, or plugging independent events into the mutually-exclusive OR formula, produces wrong answers, which is exactly why this calculator asks explicitly which situation applies rather than assuming one.

Mutually Exclusive vs. Independent
A B

Mutually Exclusive

No overlap. If A happens, B cannot. P(A∩B) = 0.

H ?

Independent

Separate processes. B's outcome does not depend on A at all.

A mutually exclusive pair is highly dependent, since one outcome rules out the other. An independent pair is almost never mutually exclusive, since both can usually happen together.

Conditional Probability

Conditional probability asks: given that we already know B happened, what is the probability that A also happened? It is written P(A|B) and read "the probability of A given B." Learning that B occurred effectively shrinks the sample space down to just the outcomes inside B, so the formula becomes P(A|B) = P(A∩B) ÷ P(B): the share of B that also belongs to A. If 30% of visitors to a website make any purchase, and 18% of all visitors specifically buy the featured product, then among purchasers, the featured product's share is P(featured|purchase) = 0.18 ÷ 0.30 = 0.60, or 60%.

Because you cannot divide by zero, P(A|B) is undefined whenever P(B) = 0: if B never happens, the question "given that B happened, what is A's probability" has no data behind it at all, so it is meaningless rather than infinite. This calculator checks for that case explicitly in both Conditional Probability mode and Bayes' Theorem mode, and reports a clear "undefined" message instead of showing an error code or a nonsensical infinite value.

Conditional Probability: Zooming Into B
B A
Once B is treated as the entire universe, P(A|B) only asks what fraction of B (the large circle) is also covered by A. Everything outside B, including the part of A outside B, no longer counts.

Bayes' Theorem

Bayes' theorem answers a subtle but extremely common question: you know P(B|A), the probability of evidence B given a cause A, but what you actually want is the reverse, P(A|B), the probability of the cause given the evidence. Bayes' theorem flips the conditional around: P(A|B) = [P(B|A) × P(A)] ÷ P(B). The classic illustration is medical testing. Suppose a disease affects 1% of a population (P(A) = 0.01), and a test correctly flags the disease 90% of the time when someone has it (P(B|A) = 0.90), but also produces a false positive 2% of the time on healthy people (P(B|¬A) = 0.02). Given a positive test, what is the actual probability the person has the disease?

First, find the overall probability of testing positive, P(B), using the law of total probability, which sums the positive-test probability across both branches of the population: P(B) = P(B|A)P(A) + P(B|¬A)P(¬A) = (0.90)(0.01) + (0.02)(0.99) = 0.009 + 0.0198 = 0.0288. Then apply Bayes' theorem: P(A|B) = (0.90 × 0.01) ÷ 0.0288 ≈ 0.3125, or about 31%. Even with a fairly accurate test, a positive result only means roughly a 31% chance of actually having a rare disease, because false positives from the much larger healthy population outnumber true positives from the small affected population. This counterintuitive result is precisely why Bayes' theorem matters in medicine, spam filtering, and forensic evidence, and it is why the Bayes' Theorem mode above offers to calculate P(B) automatically from P(B|A), P(A), and P(B|¬A) using this same law of total probability.

Probability Tree: Two Stages of Branching
P(A) P(¬A) A ¬A P(B|A) P(¬B|A) P(B|¬A) P(¬B|¬A) A∩B A∩¬B ¬A∩B ¬A∩¬B
Multiply the probabilities along a branch to get that branch's joint probability. Add every branch that ends in B (both A∩B and ¬A∩B) to get the total probability of B, which is the denominator in Bayes' theorem.

Repeated Trials and the Binomial Distribution

Many real situations repeat the same random process several times: flipping a coin five times, testing ten manufactured parts, or sending fifty marketing emails. If every trial is independent and has the same success probability p, two useful questions arise. First, what is the probability the event happens on every single trial? Since the trials are independent, you multiply p by itself n times: P = pⁿ. This is the Repeated Independent Events mode above.

Second, and far more commonly useful, what is the probability of getting exactly k successes out of n trials, in any order? This is the binomial distribution. The number of different orderings that produce exactly k successes is given by the combination formula, "n choose k," and each of those orderings has probability pᵏ(1−p)ⁿ⁻ᵏ. Multiplying the count of orderings by the probability of each ordering gives the binomial probability mass function: P(X=k) = C(n,k) × pᵏ × (1−p)ⁿ⁻ᵏ. The Binomial Probability mode above computes this exact value, and can also sum it across a range of k values to answer "at most," "at least," or "between" questions, which come up constantly in quality control and clinical trials.

Building a Binomial Distribution
p p p p p n trials how many of the n trials succeed? 0 1 2 3 4 5
Each bar is the probability of getting exactly that many successes out of n trials. The purple bars illustrate a highlighted range, such as "at least 2 successes."

The Normal Distribution: A Continuous Approximation

The binomial distribution deals with a countable number of discrete outcomes: 0, 1, 2, 3 successes and so on. Many real-world quantities, though, such as height, test scores, reaction times, or measurement error, vary continuously and cluster symmetrically around an average, forming the familiar bell-shaped curve known as the normal distribution. A normal distribution is completely described by two numbers: its mean μ (where the peak sits) and its standard deviation σ (how spread out it is). Because the exact area under a bell curve cannot be found with basic algebra, probability questions about a normal distribution are answered by first converting a raw value x into a z-score, z = (x − μ) ÷ σ, which measures how many standard deviations x sits from the mean, and then looking up the area to the left of that z-score using the standard normal cumulative distribution function.

For example, if test scores are normally distributed with a mean of 100 and a standard deviation of 15, and you want P(X < 115), first compute z = (115 − 100) ÷ 15 = 1. A z-score of 1 corresponds to a cumulative probability of about 0.8413, meaning roughly 84% of scores fall below 115. This calculator computes that cumulative probability using an accurate closed-form approximation of the error function, rather than a large hard-coded table of values, so it can evaluate any z-score, not just the handful that happen to appear in a printed table, and it can shade P(X < x), P(X > x), or P(a < X < b) depending on which comparison you need. Because the binomial distribution starts to look more and more like a normal curve as the number of trials grows large, the normal distribution is also frequently used as a convenient continuous approximation to binomial probabilities when n is large, which is part of why both distributions live inside the same calculator.

The Normal Curve: Shading Changes With the Question
x P(X<x)
The same bell curve is reused for all three normal-distribution questions; only the shaded region moves: to the left of x for P(X<x), to the right for P(X>x), or between two boundaries for P(a<X<b).

Odds vs. Probability

Odds and probability both describe likelihood, but they are not the same number and it is easy to mix them up. Probability compares favorable outcomes to all outcomes: P = favorable ÷ total. Odds in favor compare favorable outcomes directly to unfavorable outcomes: odds = favorable : unfavorable. If a probability is 0.25, that means 1 outcome out of every 4 is favorable, so 1 is favorable and the other 3 are unfavorable, giving odds of 1:3, not 1:4. This calculator displays odds alongside probability wherever it makes sense, using this exact for-versus-against convention, so you can read a result either way depending on which format your context calls for; sportsbooks and racetracks, for instance, almost always quote odds rather than raw probability.

Odds Display: For vs. Against
1 3 For Against Odds 1 : 3 (P = 0.25)

Real-World Applications

Weather forecasting. A "30% chance of rain" is a probability built from historical pattern-matching: meteorologists compare today's atmospheric conditions to thousands of similar historical days and report the fraction of those days that produced rain. It is a genuine probability, not a guess dressed up as a number, and the complement rule tells you directly that there is a 70% chance it will not rain.

Medical testing. As the Bayes' theorem example above showed, the probability that a positive test result actually reflects disease depends heavily on how rare the disease is, not just on how accurate the test sounds. Doctors, epidemiologists, and public health officials rely on exactly this kind of conditional and Bayesian reasoning to interpret screening programs correctly and avoid overreacting to a single positive result.

Games of chance. Dice, cards, roulette wheels, and lottery drawings are, from a mathematical standpoint, sample-space problems: count the favorable outcomes, count the total outcomes, and divide. Casinos and lottery commissions design games around probabilities that favor the house by a small, carefully calculated margin, which is why understanding sample spaces, combinations, and the binomial distribution is directly useful for evaluating whether any given bet is fair.

Quality control. A factory that expects a 2% defect rate on a production line can use the binomial distribution to calculate the probability of finding, say, more than 3 defective units in a sample batch of 50, which lets quality engineers set sensible thresholds for when a batch should be flagged for inspection rather than shipped. For a broader introduction that covers these same foundational ideas from a different angle, the probability lesson and examples from BYJU'S is a solid outside reference alongside this page.

Probability Examples With Answers

Example 1: Single Event. A bag has 12 marbles, 5 of which are red.
P(red) = 5 ÷ 12
Answer: ≈ 0.4167, or about 41.67%
Example 2: Complement. P(rain today) = 0.30.
P(no rain) = 1 − 0.30
Answer: 0.70, or 70%
Example 3: AND, independent. P(heads) = 0.5, P(rolling a 6) = 1/6.
P(heads and 6) = 0.5 × 1/6
Answer: 1/12 ≈ 0.0833
Example 4: OR, not mutually exclusive. P(A) = 0.5, P(B) = 0.4, P(A∩B) = 0.2.
P(A or B) = 0.5 + 0.4 − 0.2
Answer: 0.70, or 70%
Example 5: Conditional. P(A∩B) = 0.18, P(B) = 0.30.
P(A|B) = 0.18 ÷ 0.30
Answer: 0.60, or 60%
Example 6: Bayes' Theorem. P(B|A) = 0.90, P(A) = 0.01, P(B|¬A) = 0.02.
P(B) = (0.90)(0.01) + (0.02)(0.99) = 0.0288
P(A|B) = (0.90 × 0.01) ÷ 0.0288
Answer: ≈ 0.3125, or about 31.25%
Example 7: Repeated Independent Events. p = 0.8 for each of 3 trials.
P = 0.8³
Answer: 0.512, or 51.2%
Example 8: Binomial Exact. n = 5 trials, p = 0.4, exactly k = 2 successes.
P(X=2) = C(5,2) × 0.4² × 0.6³
Answer: 0.3456, or about 34.56%
Example 9: Normal Distribution. μ = 100, σ = 15, find P(X < 115).
z = (115 − 100) ÷ 15 = 1
Answer: ≈ 0.8413, or about 84.13%

Try It Yourself

A standard deck has 52 cards, 4 of which are aces. What is P(drawing an ace) as a decimal?

Probability Formulas at a Glance

RuleFormula
ComplementP(¬A) = 1 − P(A)
AND, independentP(A∩B) = P(A) × P(B)
AND, dependentP(A∩B) = P(A) × P(B|A)
ORP(A∪B) = P(A) + P(B) − P(A∩B)
OR, mutually exclusiveP(A∪B) = P(A) + P(B)
ConditionalP(A|B) = P(A∩B) ÷ P(B)
Bayes' TheoremP(A|B) = [P(B|A) × P(A)] ÷ P(B)
Repeated eventsP = pⁿ
At least oneP = 1 − (1−p)ⁿ
BinomialP(X=k) = C(n,k) × pᵏ × (1−p)ⁿ⁻ᵏ
Normal z-scorez = (x − μ) ÷ σ

Which Calculator Do I Need?

Probability Calculator

I need the likelihood of an event, a combination of events, a conditional or Bayesian result, or a binomial or normal distribution probability.

You are here

Standard Deviation Calculator

I need to measure how spread out a data set is, which is the σ used in normal-distribution probability.

Open Standard Deviation Calculator →

Statistics Calculator

I need broader descriptive statistics for a data set, such as mean, median, and range, not just one probability.

Open Statistics Calculator →

Percentage Calculator

I already have a percentage question that is not really about combining random events.

Open Percentage Calculator →

Fraction Calculator

I need to add, simplify, or convert fractions directly, separate from a probability context.

Open Fraction Calculator →

Random Number Generator

I need to actually generate random numbers or simulate a draw, not calculate a theoretical probability.

Open Random Number Generator →

Questions People Actually Ask

What is probability?

Probability is a number from 0 to 1 that measures how likely an event is, calculated as favorable outcomes divided by total possible outcomes.

Can probability be negative or greater than 1?

No. A valid probability always falls between 0 and 1 inclusive. A result outside that range always signals an input or calculation error.

What is the difference between probability and odds?

Probability compares favorable outcomes to all outcomes (favorable ÷ total). Odds compare favorable outcomes to unfavorable outcomes directly (favorable : unfavorable).

Can I enter probability as a percentage?

Yes. Type a value like 35% and the calculator converts it to 0.35 automatically.

Can I enter probability as a fraction?

Yes. Type a value like 3/4 and the calculator converts it to 0.75 automatically.

What happens if I enter a probability greater than 1?

The calculator rejects it with a clear validation message instead of silently clamping it to 1, since that would hide a data-entry mistake.

What is the complement rule?

P(not A) = 1 minus P(A). The event and its complement always add up to 1.

What is the difference between independent and mutually exclusive events?

Independent events do not affect each other's probability. Mutually exclusive events cannot both happen. They describe opposite relationships and are almost never true of the same pair of events at once.

When do I use P(A) times P(B) instead of P(A) times P(B given A)?

Use P(A) times P(B) only when A and B are independent. If one event changes the odds of the other, use the dependent version with P(B|A).

Why does the OR rule subtract P(A and B)?

Adding P(A) and P(B) directly counts any outcome where both happen twice. Subtracting P(A and B) removes that double-count.

What does mutually exclusive mean for the OR rule?

If A and B can never both happen, P(A and B) is 0, so P(A or B) simplifies to just P(A) plus P(B).

What is conditional probability?

Conditional probability, P(A given B), is the probability of A after you already know B happened. It equals P(A and B) divided by P(B).

Why is conditional probability undefined when P(B) is 0?

Dividing by zero has no defined value. If B never happens, there is no data to condition on, so the calculator reports "undefined" rather than an error or infinity.

What is Bayes' theorem used for?

Bayes' theorem reverses a conditional probability, letting you calculate P(A given B) when you actually know P(B given A), such as finding the true probability of a disease given a positive test.

What is the law of total probability?

It is a way to compute the overall probability of an event B by adding up its probability across every possible cause, weighted by how likely each cause is.

Why can a positive medical test still mean a low chance of disease?

If the disease is rare, false positives from the much larger healthy population can outnumber true positives, which is exactly what Bayes' theorem reveals.

What is the binomial distribution?

It describes the probability of getting exactly k successes in n independent trials, each with the same success probability p.

What is the difference between "at most," "at least," and "exactly" in binomial mode?

Exactly asks for one specific count of successes. At most sums the probabilities for that count and every count below it. At least sums the probabilities for that count and every count above it.

Why does this calculator cap n for binomial calculations?

Extremely large trial counts can cause standard factorial-based formulas to overflow or become imprecise. The calculator instead computes in log-space using a gamma-function approximation and caps n at 100,000 for reliability.

What is a z-score?

A z-score measures how many standard deviations a value is from the mean: z = (x minus mean) divided by standard deviation.

How accurate is the normal distribution calculation?

It uses a closed-form approximation of the cumulative standard normal distribution accurate to within about 0.00001, not a limited lookup table, so any z-score can be evaluated precisely.

Why do the binomial and normal distributions both appear in a probability calculator?

The binomial distribution handles discrete repeated trials. The normal distribution handles continuous data and is also the shape the binomial distribution approaches as the number of trials grows large.

What are "at least one" problems?

They ask for the probability that an event happens at least once across several independent trials, most easily solved with the complement rule: 1 minus the probability it never happens.

Can probability ever equal exactly 0 or exactly 1?

Yes. A probability of 0 describes an impossible event and a probability of 1 describes a certain event; both are valid endpoints of the probability scale.

How is odds "1 to 3" different from probability "1/3"?

Odds of 1 to 3 mean 1 favorable outcome for every 3 unfavorable ones, out of 4 total, which is a probability of 1/4, not 1/3. Odds and probability use different denominators.

Does this calculator show my work?

Yes. Every mode displays the formula, your values substituted into it, and a step-by-step breakdown alongside a relevant diagram.

Sources & Further Reading

Probability Formulas and Methodology

How This Calculator Solves Probability Problems

Single EventP = favorable ÷ total
ComplementP(¬A) = 1 − P(A)
AND, independentP(A∩B) = P(A)P(B)
AND, dependentP(A∩B) = P(A)P(B|A)
ORP(A∪B) = P(A)+P(B)−P(A∩B)
Exactly oneP(A)+P(B)−2P(A∩B)
ConditionalP(A|B) = P(A∩B)÷P(B)
Bayes' TheoremP(A|B) = P(B|A)P(A)÷P(B)
Total probabilityP(B) = P(B|A)P(A)+P(B|¬A)P(¬A)
Repeated eventsP = pⁿ
At least oneP = 1−(1−p)ⁿ
Binomial PMFC(n,k)pᵏ(1−p)ⁿ⁻ᵏ
Normal z-scorez = (x−μ)÷σ

Every probability input is parsed as a decimal, a percentage, or a fraction, then strictly validated to fall between 0 and 1; an out-of-range value is rejected with an explanation rather than clamped to the nearest valid endpoint. Odds and the approximate-fraction display are derived from a shared decimal-to-fraction routine so both stay consistent with the displayed probability. Binomial probabilities are computed with a log-space combination formula built on a Lanczos approximation of the gamma function, which stays numerically stable even for large trial counts, and n is capped at 100,000 as a computational safeguard. Normal distribution probabilities are computed from the z-score using a closed-form Abramowitz-and-Stegun-style approximation of the standard normal cumulative distribution function, accurate to roughly five decimal places, rather than a fixed lookup table. Conditional probability and Bayes' theorem both explicitly detect a zero denominator and report a plain-language "undefined" result instead of an error code or an infinite value. Internal calculations keep full floating-point precision; only the displayed result is rounded, by default to four decimal places, with an option to show more or fewer decimals.

This calculator is provided for educational and general reference purposes. While every effort has been made to ensure accuracy, always double-check results for high-stakes academic, statistical, medical, or financial decisions, and consult a qualified professional or your course materials when precision is critical.