What Is a Probability Calculator?
A probability calculator is a statistical tool that computes the likelihood of one or more events occurring, based on the individual probabilities you provide. It handles the full range of core probability operations — union (either event occurring), intersection (both events occurring together), complement (an event NOT occurring), and conditional probability (the chance of one event given that another has already happened).
Probability is the branch of mathematics that quantifies uncertainty — assigning a precise numerical value, always between 0 and 1 (or 0% and 100%), to how likely an event is to occur. It underlies everything from weather forecasting and insurance pricing to genetics, machine learning, quality control, gambling odds, and clinical trial design.
CalcAccurate's free probability calculator handles two fundamental event relationships:
- Independent Events: The outcome of one event has no effect on the outcome of the other. (e.g., flipping a coin twice, rolling two separate dice)
- Dependent Events (Custom Intersection / Conditional): The outcome of one event affects the probability of the other. You provide the intersection probability P(A ∩ B) directly, and the calculator derives the conditional probabilities and union from it. (e.g., drawing cards without replacement, correlated real-world events)
Use this calculator to compute:
- P(A ∪ B) — the probability that Event A or Event B occurs (union)
- P(A ∩ B) — the probability that Event A and Event B both occur (intersection)
- P(A') and P(B') — the probability that an event does not occur (complement)
- P(A | B) — the probability of A occurring given that B has already occurred (conditional probability)
- P(B | A) — the probability of B occurring given that A has already occurred
- Whether two events are statistically independent based on your inputs
Probability Fundamentals — Key Concepts Explained
Before diving into formulas, it's essential to understand the core vocabulary of probability theory. Every calculation in this tool rests on these foundational definitions.
What Is Probability?
P(Event) = Number of Favorable Outcomes / Total Number of Possible Outcomes
Probability is always a number between 0 (impossible — will never happen) and 1 (certain — will always happen). It can be expressed as a decimal (0.25), a fraction (1/4), or a percentage (25%). This calculator accepts any of these formats.
Sample Space and Events
- Sample Space (S): The complete set of all possible outcomes of an experiment. Example: rolling a die → S = {1, 2, 3, 4, 5, 6}.
- Event (A): A specific subset of the sample space that we are interested in. Example: rolling an even number → A = {2, 4, 6}.
- Simple Event: An event with only one possible outcome, e.g., rolling exactly a 4.
- Compound Event: An event composed of two or more simple events, e.g., rolling an even number.
Independent vs. Dependent Events
| Type | Definition | Test | Real-World Example |
|---|---|---|---|
| Independent Events | The occurrence of Event A has no influence on the probability of Event B | P(A ∩ B) = P(A) × P(B) | Flipping a coin, then rolling a die — the coin result doesn't affect the die |
| Dependent Events | The occurrence of Event A changes the probability of Event B | P(A ∩ B) ≠ P(A) × P(B) | Drawing two cards from a deck without replacement — removing the first card changes the odds for the second |
| Mutually Exclusive Events | Events A and B cannot both occur at the same time | P(A ∩ B) = 0 | Rolling a die and getting both a 2 and a 5 on the same roll — impossible |
Important distinction: Mutually exclusive events are always dependent (in a specific sense) — if A occurs, B absolutely cannot occur, so their occurrence is directly linked. Independent events, by contrast, can co-occur; their probabilities simply don't influence each other.
Probability Formulas — Complete Mathematical Breakdown
Here is the complete formula set this calculator uses, with every variable defined and a worked example for each.
1. Complement Rule — P(A') and P(B')
The complement of an event is the probability that the event does not occur. Since an event must either happen or not happen, the probabilities always sum to 1.
P(A') = 1 − P(A)
P(B') = 1 − P(B)
- P(A) = Probability that Event A occurs
- P(A') = Probability that Event A does NOT occur (read as "A complement" or "not A")
Example: P(A) = 0.35 (35% chance of rain)
P(A') = 1 − 0.35 = 0.65 (65% chance of no rain)
2. Intersection for Independent Events — P(A ∩ B)
When two events are independent, the probability that both occur simultaneously is simply the product of their individual probabilities.
P(A ∩ B) = P(A) × P(B) [independent events only]
- P(A ∩ B) = Probability that both A and B occur (read as "A intersect B" or "A and B")
Example: P(A) = 0.5 (flipping heads) | P(B) = 1/6 ≈ 0.1667 (rolling a 4)
P(A ∩ B) = 0.5 × 0.1667 = 0.0833 (8.33% chance of both heads AND rolling a 4)
3. Union Rule — P(A ∪ B)
The union is the probability that at least one of the two events occurs (A, or B, or both). The general addition rule subtracts the intersection to avoid double-counting the overlap.
P(A ∪ B) = P(A) + P(B) − P(A ∩ B) [general rule — works for both independent and dependent events]
For mutually exclusive events: P(A ∪ B) = P(A) + P(B) (since P(A ∩ B) = 0)
Example (independent events, continuing above):
P(A ∪ B) = 0.5 + 0.1667 − 0.0833 = 0.5834 (58.34% chance of heads OR rolling a 4, or both)
Why subtract the intersection? Without subtracting P(A ∩ B), the outcomes where both A and B occur would be counted twice — once within P(A) and once within P(B). Subtracting the overlap corrects for this double-counting.
4. Conditional Probability — P(A|B) and P(B|A)
Conditional probability answers: "Given that event B has already happened, what is the probability that event A also happens?" This is fundamental to dependent event analysis, medical testing, and Bayesian reasoning.
P(A | B) = P(A ∩ B) / P(B) [read as "probability of A given B"]
P(B | A) = P(A ∩ B) / P(A) [read as "probability of B given A"]
- P(A|B) = Probability of A occurring, given that B has already occurred
- P(A ∩ B) = Probability that both A and B occur
- P(B) = Probability that B occurs (must be greater than 0)
Example (dependent events): P(A) = 0.4 | P(B) = 0.3 | P(A ∩ B) = 0.15 (given, since events are dependent)
P(A | B) = 0.15 / 0.3 = 0.50 (50% chance of A occurring, given B has occurred)
P(B | A) = 0.15 / 0.4 = 0.375 (37.5% chance of B occurring, given A has occurred)
Verification of independence: If events were independent, we would expect P(A|B) = P(A) = 0.4. Since P(A|B) = 0.50 ≠ 0.4, this confirms the events are indeed dependent — knowing B occurred changed the probability of A.
5. Testing for Independence
Given P(A), P(B), and P(A ∩ B), you can mathematically verify whether two events are truly independent:
If P(A ∩ B) = P(A) × P(B), the events ARE independent
If P(A ∩ B) ≠ P(A) × P(B), the events ARE dependent
Example: P(A) = 0.4 | P(B) = 0.3 | P(A ∩ B) = 0.12
Expected if independent: 0.4 × 0.3 = 0.12
Actual given: 0.12 → Match! Events are independent.
Compare with: P(A) = 0.4 | P(B) = 0.3 | P(A ∩ B) = 0.15 (as in the earlier example)
Expected if independent: 0.4 × 0.3 = 0.12
Actual given: 0.15 → Mismatch! Events are dependent (positively correlated).
6. Mutually Exclusive Events — Special Case
When two events cannot possibly occur together (e.g., a single coin flip landing on both heads and tails), they are mutually exclusive:
P(A ∩ B) = 0
P(A ∪ B) = P(A) + P(B)
P(A | B) = 0 and P(B | A) = 0
Example: Drawing a single card: P(King) = 4/52 | P(Queen) = 4/52
These are mutually exclusive (a card cannot be both a King and a Queen).
P(King ∪ Queen) = 4/52 + 4/52 = 8/52 = 0.1538 (15.38%)
7. Bayes' Theorem — Reversing Conditional Probability
Bayes' Theorem allows you to compute P(A|B) when you know P(B|A) instead — extremely powerful for medical testing, spam filtering, and diagnostic reasoning.
P(A | B) = [P(B | A) × P(A)] / P(B)
- P(A) = Prior probability of A (before observing B)
- P(B|A) = Probability of observing B, given A is true
- P(B) = Total (marginal) probability of B occurring
- P(A|B) = Posterior probability of A, after observing B
Classic example (medical testing): A disease affects 1% of a population (P(A) = 0.01).
A test is 95% accurate for true positives (P(B|A) = 0.95) and has a 5% false positive
rate on healthy people (P(B|A') = 0.05).
P(B) = P(B|A)×P(A) + P(B|A')×P(A') = (0.95×0.01) + (0.05×0.99) = 0.0095 + 0.0495 = 0.059
P(A|B) = (0.95 × 0.01) / 0.059 = 0.0095 / 0.059 ≈ 0.161 or 16.1%
Surprisingly, even with a 95%-accurate test, a positive result only means a 16.1% actual chance of having the disease — because the disease is rare and false positives accumulate across the much larger healthy population. This counterintuitive result is one of the most important lessons in applied probability and statistics.
How Our Probability Calculator Works
CalcAccurate's probability calculator adapts its computation path based on the event relationship you select. Here is exactly what happens:
- Input Collection: The calculator reads P(A) and P(B) as decimals, fractions, or percentages, and normalizes them to decimal form (values between 0 and 1) for computation.
- Event Relationship Selection: You choose either "Independent Events" or "Dependent (Custom Intersection/Conditional)." This determines which formula path the calculator follows.
- Independent Events Path: If independent is selected, the calculator computes P(A ∩ B) = P(A) × P(B) automatically — no additional input needed.
- Dependent Events Path: If dependent is selected, you directly enter the known intersection probability P(A ∩ B). The calculator uses this value (rather than assuming independence) for all subsequent calculations.
- Union Computation: Regardless of path, the calculator applies the general addition rule: P(A ∪ B) = P(A) + P(B) − P(A ∩ B).
- Complement Computation: P(A') = 1 − P(A) and P(B') = 1 − P(B) are computed directly from your inputs.
- Conditional Probability Computation: Using P(A ∩ B), the calculator computes P(A|B) = P(A∩B)/P(B) and P(B|A) = P(A∩B)/P(A), giving you both conditional directions.
- Independence Verification: The calculator compares your P(A ∩ B) against the theoretical independent value P(A) × P(B) and reports whether the events are statistically independent, positively correlated, or negatively correlated.
- Validation & Error Checking: The calculator checks that all probabilities fall between 0 and 1, that P(A ∩ B) does not exceed min(P(A), P(B)) (a mathematical impossibility if violated), and flags any invalid inputs.
- Results Display: All computed values — union, intersection, complements, both conditional probabilities, and the independence verdict — are displayed together for complete probabilistic insight.
Input Fields Explained
Understanding what each field represents ensures your probability calculations are set up correctly from the start.
Probability of Event A — P(A)
The likelihood that your first event of interest occurs, expressed as a decimal between 0 and 1 (e.g., 0.5), a percentage (e.g., 50%), or a simplified fraction. This represents the standalone, unconditional probability of Event A — before considering any relationship with Event B.
Examples: Probability of rain tomorrow (0.30), probability a manufactured part is defective (0.02), probability a coin lands heads (0.5), probability a customer makes a purchase (0.15).
Probability of Event B — P(B)
The likelihood that your second event of interest occurs, expressed in the same format as P(A). This is the standalone probability of Event B.
Examples: Probability of a traffic delay (0.25), probability a product ships on time (0.90), probability a student passes an exam (0.75).
Event Relationship — Independent vs. Dependent
This selector determines how the calculator computes the intersection P(A ∩ B):
| Selection | What the Calculator Assumes | When to Use It |
|---|---|---|
| Independent Events | P(A ∩ B) = P(A) × P(B) — automatically calculated | The two events genuinely have no causal or statistical relationship — e.g., two separate coin flips, two unrelated dice rolls, two unconnected random draws with replacement. |
| Dependent (Custom Intersection/Conditional) | You provide P(A ∩ B) directly — no automatic assumption is made | The events are related, correlated, or you already know the joint probability from data — e.g., drawing cards without replacement, medical test results and actual disease status, correlated market events, survey data with known overlaps. |
Choosing incorrectly leads to wrong answers. If you select "Independent" for events that are actually dependent (like drawing cards without replacement), the calculator will compute an intersection that doesn't reflect reality. Always verify the true relationship between your events before selecting.
Intersection: P(A ∩ B) — [Dependent Events Only]
This field only appears (or is only used) when you select "Dependent" event relationship. Enter the known or measured probability that both Event A and Event B occur together. This value must be a valid probability (between 0 and 1) and cannot exceed the smaller of P(A) or P(B) — since the intersection can never be larger than either individual event.
Where does this number come from? In real-world dependent scenarios, P(A ∩ B) typically comes from:
- Historical data (e.g., "of all patients who tested positive, X% actually had the disease")
- Direct counting in a finite sample space (e.g., cards in a deck, marbles in a bag)
- Survey or experimental results (e.g., "30% of respondents who like coffee also like tea")
- Known statistical correlations from research literature
How to Calculate Probability Manually — Step-by-Step
Follow these fully worked examples to compute union, intersection, complement, and conditional probability by hand.
Example 1: Independent Events — Rolling Two Dice
Problem: What is the probability of rolling a 6 on the first die OR rolling a 6 on the second die?
- Define events: A = rolling a 6 on die 1, B = rolling a 6 on die 2
- P(A) = 1/6 ≈ 0.1667 | P(B) = 1/6 ≈ 0.1667
-
Since the two dice rolls are independent:
P(A ∩ B) = P(A) × P(B) = (1/6) × (1/6) = 1/36 ≈ 0.0278 -
Apply the union formula:
P(A ∪ B) = P(A) + P(B) − P(A ∩ B) = 1/6 + 1/6 − 1/36 = 6/36 + 6/36 − 1/36 = 11/36 ≈ 0.3056 - Result: There is a 30.56% chance of rolling at least one 6 across both dice.
Example 2: Dependent Events — Drawing Cards Without Replacement
Problem: From a standard 52-card deck, what is the probability of drawing a King on the first draw AND a Queen on the second draw (without replacement)?
- Define events: A = first card is a King, B = second card is a Queen
- P(A) = 4/52 ≈ 0.0769
-
Given A occurred (a King was removed), 51 cards remain, 4 of which are Queens:
P(B|A) = 4/51 ≈ 0.0784 -
Calculate the intersection using the multiplication rule for dependent events:
P(A ∩ B) = P(A) × P(B|A) = (4/52) × (4/51) = 16/2652 ≈ 0.00603 - Result: There is approximately a 0.603% chance of drawing a King then a Queen in sequence.
-
Verify dependence: If we (incorrectly) assumed independence:
P(A) × P(B) = (4/52) × (4/52) = 16/2704 ≈ 0.00592 — close, but NOT equal to the true 0.00603, confirming these events are indeed dependent (removing a card changes the sample space for the second draw).
Example 3: Conditional Probability from Survey Data
Problem: In a survey of 200 people: 90 like coffee (Event A), 70 like tea (Event B), and 35 like both coffee and tea. If a randomly selected person likes coffee, what is the probability they also like tea?
-
Calculate the individual and joint probabilities:
P(A) = 90/200 = 0.45
P(B) = 70/200 = 0.35
P(A ∩ B) = 35/200 = 0.175 -
Apply the conditional probability formula:
P(B | A) = P(A ∩ B) / P(A) = 0.175 / 0.45 ≈ 0.389 or 38.9% - Result: Given that a person likes coffee, there is a 38.9% chance they also like tea — compared to the baseline 35% chance of liking tea in the general population. This tells us coffee drinkers are slightly more likely to also like tea than the general population.
-
Calculate the reverse conditional too:
P(A | B) = P(A ∩ B) / P(B) = 0.175 / 0.35 = 0.50 or 50%
Given that a person likes tea, there is a 50% chance they also like coffee.
Example 4: Complement Rule — At Least One Success
Problem: A factory has 3 independent quality-control checkpoints, each with a 95% chance of catching a defect. What is the probability that at least one checkpoint catches a specific defect?
-
Define the complement: it's easier to calculate "no checkpoint catches it" and
subtract from 1.
P(checkpoint misses defect) = 1 − 0.95 = 0.05 for each checkpoint -
Since checkpoints are independent, the probability ALL THREE miss it:
P(all miss) = 0.05 × 0.05 × 0.05 = 0.000125 -
Apply the complement rule:
P(at least one catches it) = 1 − P(all miss) = 1 − 0.000125 = 0.999875 or 99.99% - Result: Even though each individual checkpoint only has a 95% detection rate, having three independent checkpoints raises the overall detection probability to 99.99% — demonstrating why redundant, independent safety checks are so powerful in quality control and safety-critical systems.
Real-World Applications of Probability Calculations
Probability theory is one of the most widely applied branches of mathematics. Here is how this calculator's core operations show up across industries and everyday life:
Insurance & Risk Assessment
Insurance companies calculate the probability of claims (car accidents, house fires, health events) to set premiums. Union and intersection calculations help assess compound risks — e.g., the probability of both a car accident AND a resulting injury claim occurring together.
Medical Testing & Diagnosis
Conditional probability and Bayes' Theorem are central to interpreting diagnostic test results. As shown in the medical testing example above, a positive test result does not mean certainty of disease — the true probability depends heavily on the disease's prevalence (prior probability) and the test's false positive rate.
Gambling & Games of Chance
Card games, dice games, and lottery calculations rely entirely on probability theory. Calculating the odds of specific hands in poker, the chance of winning a lottery, or the house edge in casino games all use union, intersection, and conditional probability formulas.
Quality Control & Manufacturing
As shown in Example 4, manufacturers use independent event probability to calculate the reliability of redundant safety systems, multi-stage inspection processes, and overall defect detection rates across a production line.
Marketing & A/B Testing
Marketers use conditional probability to understand customer behavior — e.g., "given that a customer opened an email, what is the probability they made a purchase?" This directly informs email marketing strategy and conversion funnel optimization.
Weather Forecasting
"70% chance of rain" is a probability estimate based on historical data and current atmospheric conditions. Combined probability calculations help forecast compound events, like the probability of both rain AND high wind on the same day.
Genetics & Biology
Punnett squares and genetic inheritance calculations are direct applications of independent event probability — the probability of inheriting specific traits from each parent, and the combined probability of inheriting a particular combination of traits.
Machine Learning & Data Science
Naive Bayes classifiers, spam filters, and many machine learning algorithms are built directly on Bayes' Theorem and conditional probability — calculating the probability of a classification given observed features.
Common Probability Mistakes to Avoid
- Assuming independence when events are actually dependent. This is the single most common error in probability. Drawing cards without replacement, correlated market events, and many real-world scenarios are NOT independent. Always verify before applying P(A ∩ B) = P(A) × P(B).
- Forgetting to subtract the intersection in the union formula. P(A ∪ B) = P(A) + P(B) is only correct for mutually exclusive events. For all other cases, you must subtract P(A ∩ B) to avoid double-counting.
- Confusing P(A|B) with P(B|A). These are generally NOT equal. "The probability it's raining, given the ground is wet" is very different from "the probability the ground is wet, given it's raining." This confusion is sometimes called the "prosecutor's fallacy" in legal contexts.
- The Gambler's Fallacy. Believing that past independent events influence future independent events — e.g., "the coin has landed heads 5 times in a row, so tails is due." Each flip remains exactly 50/50 regardless of history, because the flips are independent.
- Ignoring base rates (prior probability) in conditional reasoning. As shown in the medical testing example, a 95%-accurate test on a rare disease (1% prevalence) still produces mostly false positives among those who test positive. Ignoring the low base rate leads to dramatically overestimating the true probability.
- Adding probabilities that exceed 1. If P(A) + P(B) > 1 for events that are NOT mutually exclusive, you must use the full union formula with subtraction — a raw sum exceeding 1 is not a valid final probability and signals a calculation is incomplete.
- Treating "and" and "or" carelessly in word problems. "Probability of A and B" means intersection (both must happen); "probability of A or B" means union (at least one must happen). Misreading these connectives is one of the most common sources of error in translating word problems into formulas.
Frequently Asked Questions (FAQ)
What is the formula for probability of A and B?
The probability of both A and B occurring is called the intersection, P(A ∩ B). For independent events: P(A ∩ B) = P(A) × P(B). For dependent events, you need the conditional probability: P(A ∩ B) = P(A) × P(B|A), or the intersection must be measured directly from data.
What is the formula for probability of A or B?
The probability of A or B occurring (at least one) is called the union, calculated as: P(A ∪ B) = P(A) + P(B) − P(A ∩ B). If A and B are mutually exclusive (cannot both happen), the formula simplifies to P(A ∪ B) = P(A) + P(B).
What is the difference between independent and dependent events?
Independent events are those where the outcome of one has no effect on the probability of the other (e.g., two separate coin flips). Dependent events are those where the outcome of one changes the probability of the other (e.g., drawing cards from a deck without replacement). The mathematical test: events are independent if and only if P(A ∩ B) = P(A) × P(B).
What is conditional probability?
Conditional probability, written P(A|B), is the probability that event A occurs given that event B has already occurred or is known to be true. It is calculated as P(A|B) = P(A ∩ B) / P(B). Conditional probability is fundamental to Bayesian reasoning, medical diagnosis, and understanding how new information updates our beliefs about uncertain events.
What is the complement of an event in probability?
The complement of event A, written A' (or Aᶜ), is the event that A does NOT occur. Since an event must either happen or not happen, P(A) + P(A') always equals 1. Therefore, P(A') = 1 − P(A). This is useful when it's easier to calculate the probability something does NOT happen than the probability it does.
Can the intersection P(A ∩ B) ever be larger than P(A) or P(B)?
No — mathematically, this is impossible. The intersection represents the overlap between two events, and an overlap can never be larger than either individual set. P(A ∩ B) must always be less than or equal to the smaller of P(A) and P(B). If a calculation produces an intersection larger than either individual probability, there is an error in the inputs or the calculation.
What is Bayes' Theorem used for?
Bayes' Theorem allows you to "reverse" a conditional probability — calculating P(A|B) when you know P(B|A), P(A), and P(B). It is widely used in medical diagnosis (interpreting test results), spam email filtering, machine learning classification, legal reasoning, and any scenario where you need to update a prior belief based on new evidence.
How do you know if two events are mutually exclusive?
Two events are mutually exclusive if they cannot both occur at the same time — their intersection is zero: P(A ∩ B) = 0. For example, when flipping a single coin, the events "heads" and "tails" are mutually exclusive because only one outcome can occur per flip.
How do I calculate the probability of at least one event occurring out of several?
The easiest method is the complement rule: calculate the probability that NONE of the events occur, then subtract from 1. P(at least one) = 1 − P(none occur). For independent events, P(none occur) = P(A') × P(B') × P(C') × … This is far simpler than directly calculating all the ways "at least one" could happen.
Is this probability calculator free?
Yes — completely free, with no sign-up required, no usage limits, and no data sent to any server. All calculations run instantly in your browser and work on any device.
Conclusion
Probability is the mathematical language of uncertainty — and mastering its core operations (union, intersection, complement, and conditional probability) unlocks the ability to reason clearly about risk, chance, and decision-making in almost every field imaginable. From a simple coin flip to interpreting a medical test result correctly using Bayes' Theorem, the same fundamental rules apply.
CalcAccurate's free probability calculator handles both independent and dependent event relationships, computing unions, intersections, complements, and conditional probabilities instantly and accurately — while also verifying whether your events are truly statistically independent. Whether you are a student working through a statistics course, a professional assessing risk, or simply curious about the odds of an everyday event, this tool gives you precise, reliable answers.
Bookmark this page for your next probability problem, and explore our related calculators below for every other mathematical calculation you need.