Probability Calculator
Calculate the probability of single events, complements, and combined events — P(A and B) and P(A or B) — for independent and mutually exclusive events, with a Venn diagram and step-by-step solution.
Event A
Event B
Example: rolling a 4 on a 6-sided die has 1 favorable outcome out of 6 total outcomes.
Venn Diagram
The sample space and events are shown visually below, with every probability labeled directly on the diagram.
Step-by-Step Solution
Here's exactly how this answer was calculated, one step at a time.
- 1
Find the probability of Event A
P(A) = favorable / total = 3 / 6 = 0.5
Probability is the number of favorable outcomes divided by the total number of possible outcomes.
- 2
Find the probability of Event B
P(B) = favorable / total = 2 / 6 = 0.3333
Do the same calculation for Event B using its own favorable and total outcome counts.
- 3
Find the overlap P(A and B)
P(A and B) = P(A) × P(B) = 0.5 × 0.3333 = 0.1667
Since A and B can happen together, first find the probability of the overlap using the independent-events rule.
- 4
Apply the inclusion-exclusion rule
P(A or B) = P(A) + P(B) - P(A and B) = 0.5 + 0.3333 - 0.1667 = 0.6667
Adding P(A) and P(B) double-counts the overlap, so it must be subtracted once to get the correct combined probability.
✓ Final Answer: P(A or B) = 0.6667 (66.67%)
Free Online Probability Calculator
This probability calculator helps you instantly find the probability of a single event, its complement, and combined events — including P(A and B) for independent events, and P(A or B) for both mutually exclusive and independent events. Just enter the favorable and total outcomes for each event, choose the type of calculation you need, and the calculator solves it automatically, complete with a labeled Venn diagram and a full step-by-step solution.
Whether you're a student learning probability theory for the first time, a teacher preparing worked examples, a data analyst estimating chances in an experiment, or simply someone searching for a fast and accurate probability calculator, probability of A and B calculator, or probability of A or B calculator, this tool covers every common probability calculation you're likely to need.
Probability measures how likely an event is to happen, expressed as a number between 0 (impossible) and 1 (certain), or equivalently as a percentage between 0% and 100%. This calculator handles both single events and the two most common ways of combining two events — 'and' (both events happening) and 'or' (at least one event happening) — automatically applying the correct formula based on whether the events are independent or mutually exclusive.
Probability Formulas Used
Every calculation in this tool is built on the following standard probability formulas:
- Basic probability: P(A) = favorable outcomes / total outcomes
- Complement rule: P(not A) = 1 - P(A)
- Independent events (AND): P(A and B) = P(A) × P(B)
- Mutually exclusive events (OR): P(A or B) = P(A) + P(B)
- General / independent events (OR): P(A or B) = P(A) + P(B) - P(A and B) (the inclusion-exclusion rule)
How to Use This Probability Calculator
Using this calculator only takes a few simple steps. First, choose the type of calculation you need from the dropdown — a single event, a complement, or a combined event using 'and' or 'or' logic. Second, enter the number of favorable outcomes and total possible outcomes for Event A (for example, rolling a 4 on a six-sided die is 1 favorable outcome out of 6 total outcomes). If your calculation involves a second event, enter the same information for Event B. Third, read off the results: the calculator instantly displays every relevant probability as both a decimal and a percentage, along with a Venn diagram and a detailed breakdown of the math behind every number.
This approach removes the guesswork of figuring out which formula to use — the calculator automatically applies the complement rule, the multiplication rule for independent events, or the inclusion-exclusion rule for 'or' probabilities, depending on which option you select.
Worked Example
Suppose you draw one card from a standard 52-card deck and want to know the probability of drawing a heart or a face card. Event A (hearts) has 13 favorable outcomes out of 52 total, so P(A) = 13/52 = 0.25. Event B (face cards: jack, queen, king) has 12 favorable outcomes out of 52 total, so P(B) = 12/52 ≈ 0.2308. Since these events overlap — there are 3 face cards that are also hearts — you'd choose the independent 'A or B' option: the calculator finds P(A and B) = P(A) × P(B) ≈ 0.0577, then applies P(A or B) = P(A) + P(B) - P(A and B) ≈ 0.4231, or about 42.3%.
This same step-by-step logic works for any combination of events, making the tool equally useful for dice rolls, card draws, coin flips, or any scenario where you know the favorable and total outcome counts for one or two events.
Understanding the Venn Diagram
The diagram above draws the sample space as a labeled rectangle (S), representing every possible outcome. For a single event, Event A is shown as a shaded circle inside the rectangle, with P(A) labeled inside the circle and P(not A) labeled in the space outside it — visually showing how the two always add up to the full sample space. For two events, Event A and Event B are drawn as overlapping or separate circles depending on whether they're independent or mutually exclusive: overlapping circles show the shared probability P(A and B) directly in the middle region, while separate, non-overlapping circles make it visually clear why mutually exclusive events can simply be added together with no double-counting.
Independent vs. Mutually Exclusive Events: What's the Difference?
Independent events are events where the outcome of one has no effect on the outcome of the other — like flipping a coin and rolling a die at the same time. Because they don't influence each other, their probabilities are combined by multiplication for 'and' and by inclusion-exclusion for 'or'. Mutually exclusive events, on the other hand, can never happen at the same time — like rolling a 2 and a 5 on the same single die roll. Because there's zero overlap between them, their 'or' probability is found by simple addition, and P(A and B) is always 0. Choosing the correct relationship between your events is essential for getting an accurate combined probability, which is why this calculator offers separate options for each case.
Where Probability Calculations Are Used
Probability theory and these core formulas show up constantly in real life and across many fields of study and industry:
- Students and teachers use it for probability and statistics homework, competitive exams, and lesson planning.
- Data scientists and analysts use probability calculations to estimate the likelihood of events in experiments, A/B tests, and predictive models.
- Insurance and finance professionals rely on probability to assess risk and calculate premiums or expected returns.
- Game designers and gamblers use probability to understand odds in card games, dice games, and lotteries.
- Quality control engineers use probability to estimate defect rates and the chance of multiple independent failures occurring together.
Frequently Asked Questions
What is the formula for basic probability?
Basic probability is calculated as P(A) = favorable outcomes / total possible outcomes. For example, drawing an ace from a 52-card deck is 4/52 ≈ 0.077, or about 7.7%.
What is the difference between P(A and B) and P(A or B)?
P(A and B) is the probability that both events happen, calculated by multiplying their probabilities for independent events. P(A or B) is the probability that at least one of the events happens, calculated by adding their probabilities and subtracting any overlap (P(A and B)) to avoid double-counting.
How do I know if two events are independent or mutually exclusive?
Independent events don't affect each other's outcome and can happen together (like a coin flip and a die roll). Mutually exclusive events can never happen at the same time (like rolling a 2 and a 3 on a single die roll). If events can occur together but don't influence one another, treat them as independent; if they're impossible to occur simultaneously, treat them as mutually exclusive.
What is the complement of an event in probability?
The complement of event A, written P(not A), is the probability that A does NOT happen. It's always calculated as P(not A) = 1 - P(A), since an event and its complement together cover every possible outcome.
Can probability be greater than 1 or negative?
No. A valid probability is always between 0 and 1 (or 0% and 100%). If a calculation for mutually exclusive events produces a sum greater than 1, it means the events aren't actually mutually exclusive, and the independent 'or' formula should be used instead.