Probability Calculator
Probability Calculator
Calculate single-event probability, relationships between two events, binomial outcomes and Bayes’ theorem with step-by-step formulas.
Result
- Formula
Calculations use full precision; rounding affects only the displayed result.
A probability calculator converts assumptions about possible outcomes into numerical probabilities. This tool supports a single event, two-event relationships, binomial outcomes and Bayes’ theorem, while showing the formulas used for each result.
A correct calculation does not automatically make the underlying model realistic. The events must be defined clearly, probability inputs must refer to the same population or experiment, and assumptions such as independence or a constant success rate must be justified.
What the calculator measures
The calculator contains four modes:
- Single event from favourable and total equally likely outcomes;
- Two events with independent events or a known intersection;
- Binomial probability for exactly, at most, at least or between a selected number of successes;
- Bayes’ theorem for updating a prior probability after new evidence.
Depending on the mode, the results may include probability, percentage, complement, odds, intersection, union, conditional probabilities, expected successes, variance, standard deviation and posterior probability.
How to use the Probability Calculator
- Select the mode that matches the problem.
- Choose decimal or percentage input when that option is available.
- Enter the required probabilities or outcome counts.
- For two events, identify whether the events are independent or whether the intersection is already known.
- For a binomial calculation, select exactly, at most, at least or between.
- Choose the displayed precision.
- Press Calculate.
- Review the formula and assumptions before using the result.
The example button fills the active mode with sample values. It is useful for learning the field layout, but those values should be replaced with the data from the real problem.
Probability scale and input formats
A probability must lie between 0 and 1:
0 ≤ P(A) ≤ 1
The same range can be expressed from 0% to 100%.
- 0 or 0% means the event is impossible within the model;
- 1 or 100% means the event is certain within the model;
- 0.5 and 50% represent the same probability.
Choose the input format deliberately. Entering 25 in decimal mode is invalid, while entering 0.25 in percentage mode means 0.25%, not 25%.
Single-event probability
When all elementary outcomes are equally likely, the probability of event A is:
P(A) = favourable outcomes ÷ total outcomes
The equally likely condition matters. Counting three favourable outcomes out of eight is not sufficient when some outcomes are more likely than others.
Complement probability
The complement of event A means that A does not occur:
P(not A) = 1 − P(A)
For the token example:
P(not blue) = 1 − 0.375 = 0.625 = 62.5%
The complement rule is especially useful for “at least one” questions. It is often easier to calculate the probability of no successes and subtract it from 1.
Odds in favour and odds against
Odds compare favourable probability with unfavourable probability.
Odds in favour = P(A) : P(not A)
Odds against = P(not A) : P(A)
With three favourable and five unfavourable outcomes, the odds in favour are 3:5 and the odds against are 5:3.
Odds are not the same as probability. Odds of 3:5 correspond to a probability of 3 ÷ (3 + 5) = 3/8.
Probability of two events
For events A and B, the calculator distinguishes between the intersection and the union.
- P(A ∩ B) is the probability that A and B both occur;
- P(A ∪ B) is the probability that A, B or both occur.
The general addition rule is:
P(A ∪ B) = P(A) + P(B) − P(A ∩ B)
The intersection is subtracted once because it was included in both P(A) and P(B).
Independent events
Events are independent when the occurrence of one does not change the probability of the other. For independent events:
P(A ∩ B) = P(A) × P(B)
Independence is an assumption about the process, not a conclusion that should be selected merely because no other information is available.
Independent and mutually exclusive are different
Mutually exclusive events cannot occur together, so their intersection is zero. Independent events may occur together, and one event does not affect the probability of the other.
If A and B both have positive probability and are mutually exclusive, observing A makes B impossible. They are therefore not independent.
Known intersection and feasibility checks
When the events are dependent or their joint probability is known, select the known-intersection option and enter P(A ∩ B).
Every valid intersection must satisfy the Fréchet bounds:
max(0, P(A) + P(B) − 1) ≤ P(A ∩ B) ≤ min(P(A), P(B))
The calculator rejects an intersection outside this range because no pair of events can produce it.
Only A, only B and neither event
Once the intersection is known:
P(only A) = P(A) − P(A ∩ B)
P(only B) = P(B) − P(A ∩ B)
P(neither) = 1 − P(A ∪ B)
These values divide the sample space into non-overlapping regions and are useful for checking whether the inputs are internally consistent.
Conditional probability
Conditional probability asks for the probability of one event given that another event has occurred.
P(A | B) = P(A ∩ B) ÷ P(B)
P(B | A) = P(A ∩ B) ÷ P(A)
The denominator must be greater than zero. A conditional probability given an impossible event is not defined in this elementary calculation.
Binomial probability
The binomial model counts successes in a fixed number of trials. It is appropriate when all of the following conditions hold:
- the number of trials n is fixed;
- each trial has two defined outcomes, labelled success and failure;
- the trials are independent;
- the probability of success p is the same for every trial.
NIST and OpenStax describe these fixed-probability, independent-trial conditions as central to the binomial model.
Probability of exactly k successes
For X following a binomial distribution:
P(X = k) = C(n, k) × pk × (1 − p)n − k
Here, C(n, k) counts the possible arrangements of k successes among n trials.
At most, at least and between
The calculator adds the appropriate exact probabilities:
- at most k: P(X ≤ k) = P(0) + … + P(k);
- at least k: P(X ≥ k) = P(k) + … + P(n);
- between a and b: P(a ≤ X ≤ b) = P(a) + … + P(b).
“At least” and “at most” include the stated boundary. This is a frequent source of input mistakes.
Expected value, variance and standard deviation
For a binomial random variable:
Expected successes = n × p
Variance = n × p × (1 − p)
Standard deviation = √[n × p × (1 − p)]
The expected value is a long-run average, not a promise that a single experiment will produce that number. With n = 10 and p = 0.30, the expected number is 3, even though an individual set of ten trials must produce a whole-number count that may differ from 3.
Bayes’ theorem
Bayes’ theorem updates the probability of A after evidence B is observed:
P(A | B) = P(B | A) × P(A) ÷ P(B)
For the calculator’s two-category form:
P(B) = P(B | A)P(A) + P(B | not A)P(not A)
Therefore:
P(A | B) = P(B | A)P(A) ÷ [P(B | A)P(A) + P(B | not A)P(not A)]
Bayes example using quality control
Suppose 2% of components come from a production condition associated with defects. An inspection flags 90% of components from that condition and also flags 4% of components from other conditions.
- P(A) = 0.02;
- P(B | A) = 0.90;
- P(B | not A) = 0.04.
The total probability of a flag is:
P(B) = 0.90 × 0.02 + 0.04 × 0.98 = 0.0572
The updated probability is:
P(A | B) = 0.018 ÷ 0.0572 ≈ 0.3147 = 31.47%
The example shows why a high detection rate alone does not determine the posterior probability. The prior rate and false-positive rate also matter.
Why base rates matter
A rare event can still have a modest posterior probability after positive evidence when false positives are not extremely rare. Ignoring the prior probability is commonly called base-rate neglect.
Bayes’ theorem does not decide whether the entered prior or likelihood values are credible. Those values must come from relevant and appropriately collected data.
Decimals, percentages and rounding
The calculator accepts decimal or percentage probability input in the modes where the format selector is shown.
- 0.2 in decimal mode equals 20%;
- 20 in percentage mode equals 20%;
- 0.2 in percentage mode equals 0.2%.
Local decimal separators are supported. The precision option changes the displayed result, while calculations continue with the full available numeric value.
What the result cannot establish
A probability result cannot establish that:
- the chosen outcomes are equally likely;
- two events are independent;
- a binomial success rate stays constant;
- a prior probability is representative;
- historical data will remain valid in a changed process;
- one future outcome is guaranteed.
The calculator evaluates the mathematical consequences of the inputs; it does not validate the data-generating process.
A reliable workflow
- Define the event and sample space in plain language.
- Confirm whether elementary outcomes are equally likely before using simple outcome counts.
- Choose decimal or percentage format and use it consistently.
- For two events, justify independence or provide a valid intersection.
- For binomial calculations, verify all four binomial conditions.
- For Bayes’ theorem, use probabilities from the same population and time period.
- Check that every probability lies between 0 and 1.
- Review the complement, union or total evidence as a consistency check.
- Keep full precision until the final display.
- State the model assumptions when communicating the result.
Common mistakes
- entering 30 in decimal mode instead of percentage mode;
- treating dependent events as independent;
- confusing mutually exclusive events with independent events;
- adding P(A) and P(B) without subtracting their intersection;
- using the binomial model when p changes between trials;
- excluding k from “at least k” or “at most k”;
- interpreting expected successes as a guaranteed count;
- using a Bayes likelihood from one population with a prior from another;
- rounding small probabilities too early;
- presenting a model output as a certain prediction.
Frequently asked questions
Should I enter probability as a decimal or a percentage?
Choose the matching input format. Enter 0.25 in decimal mode or 25 in percentage mode; both represent the same probability.
What is the difference between independent and mutually exclusive events?
Independent events do not change each other’s probability. Mutually exclusive events cannot occur together. Events with positive probability cannot generally be both independent and mutually exclusive.
When can I use the binomial mode?
Use it for a fixed number of independent trials, two outcomes per trial, and the same probability of success on every trial.
Why can an intersection value be rejected?
For any two events, P(A ∩ B) must lie between max(0, P(A) + P(B) − 1) and min(P(A), P(B)). Values outside that range are impossible.
What does the Bayes result mean?
It is the updated probability of A after observing B, based on the prior probability and the likelihood of observing B when A is true or false.
Does the calculator predict what will happen?
No. It evaluates a mathematical model from the inputs. The result is only as appropriate as the assumptions and probability estimates used.
Mathematical and technical sources
- Penn State STAT 414: Properties of Probability
- OpenStax: Two Basic Rules of Probability
- Penn State STAT 414: Conditional Probability
- NIST/SEMATECH: Binomial Distribution
- OpenStax: Binomial Distribution
- Penn State STAT 414: Bayes’ Theorem
- Schema.org: FAQPage structured-data type
Sources reviewed: 23 June 2026.