Probability Calculator (Events A and B)

Calculate union, intersection, conditional probability, complements, exactly one event, and neither.

Union & Intersection Conditional Probability Venn Diagram
Share this tool

Event Relationship

Input Format

P(A)

P(B)

P(A ∩ B), the overlapping region

Intersection is derived

For independent events, P(A ∩ B) = P(A) × P(B).

Quick Load:

Calculating probabilities...

Enter probabilities for events A and B to calculate their union, intersection, conditionals, and Venn regions.

What Is a Probability Calculator for Events A and B?

A Probability Calculator for Events A and B describes how two events share a sample space. Enter the probability of event A, event B, and their overlap to find the probability of either event, both events, conditional outcomes, exactly one event, complements, and neither event.

The calculator accepts decimal probabilities from 0 to 1 or percentages from 0% to 100%. General mode works with any feasible overlap. Independent mode is appropriate only when knowing that one event occurred does not change the probability of the other.

How Events A and B Divide the Sample Space

The sample space S contains every possible outcome. The two circles split it into A only, the intersection, B only, and the region outside their union.

Instructional Venn diagram for two eventsSample space containing events A and B, their intersection, their union, and the complement outside both events. Sample space S A only A ∩ B B only (A ∪ B)ᶜ Neither event A ∪ B covers both circles Intersection: both occur
QuantityFormula
UnionP(A ∪ B) = P(A) + P(B) - P(A ∩ B)
Conditional A given BP(A | B) = P(A ∩ B) / P(B)
Conditional B given AP(B | A) = P(A ∩ B) / P(A)
Independent intersectionP(A ∩ B) = P(A)P(B)
Exactly oneP(A) + P(B) - 2P(A ∩ B)
Neither1 - P(A ∪ B)

How to Calculate the Union of Two Events

The union is the probability that A occurs, B occurs, or both occur. Add the two event probabilities and subtract the intersection once because outcomes in the overlap were counted in both P(A) and P(B).

P(A) = 0.6, P(B) = 0.5, P(A ∩ B) = 0.3

P(A ∪ B) = 0.6 + 0.5 - 0.3

P(A ∪ B) = 0.8 = 80%

How to Find the Intersection of Events A and B

The intersection contains outcomes where A and B both occur. For general events, it must be supplied or derived from other information. For independent events, multiply the marginal probabilities: P(A ∩ B) = P(A) × P(B).

If two events are mutually exclusive, their intersection is zero. Mutually exclusive nonzero events are not independent, because observing one makes the other impossible.

How Conditional Probability Works

Conditional probability restricts the sample space to outcomes where the conditioning event occurred. P(A | B) divides the overlap by P(B), while P(B | A) divides the same overlap by P(A). The two values are generally different because their denominators are different.

In the worked example, P(A | B) = 0.3 / 0.5 = 0.6, but P(B | A) = 0.3 / 0.6 = 0.5. If the conditioning event has probability zero, the conditional probability is undefined because division by zero has no probability interpretation.

Independent vs Mutually Exclusive Events

Independent events do not change one another's probability. Their intersection is the product P(A)P(B), and both may occur together.

Mutually exclusive events cannot occur together, so P(A ∩ B) = 0. Unless one event has probability zero, mutual exclusivity creates dependence rather than independence.

Complements, Exactly One Event, and Neither

The complement P(Aᶜ) is 1 - P(A). Exactly one event combines A only and B only, excluding their overlap.

Neither event is the complement of the union: P(neither) = 1 - P(A ∪ B). The four exclusive Venn regions always add to 1.

How to Check Whether Two-Event Probabilities Are Possible

An intersection cannot exceed the smaller event probability. It also cannot be so small that the union exceeds 1. These requirements are summarized by the Fréchet bounds: max(0, P(A) + P(B) - 1) ≤ P(A ∩ B) ≤ min(P(A), P(B)).

For example, if P(A) = 0.8 and P(B) = 0.7, their overlap must be at least 0.5. Entering 0.2 would imply a union of 1.3, which is impossible. The calculator checks both bounds before displaying results.

Probability Calculator FAQ

What is the formula for P(A union B)?

Use P(A ∪ B) = P(A) + P(B) - P(A ∩ B). The overlap is subtracted because adding P(A) and P(B) counts it twice.

What is the formula for P(A intersection B)?

For independent events, multiply P(A) by P(B). For general events, the intersection must be known or derived from conditional probability or other supplied information.

How do I calculate P(A given B)?

Divide the intersection by the probability of B: P(A | B) = P(A ∩ B) / P(B). This is defined only when P(B) is greater than zero.

What is the difference between independent and mutually exclusive events?

Independent events can occur together and do not alter each other's probabilities. Mutually exclusive events cannot occur together, so their intersection is zero.

Can P(A given B) be greater than P(A)?

Yes. Observing B can make A more likely, less likely, or leave its probability unchanged. Equality P(A | B) = P(A) is a defining condition of independence when P(B) is positive.

What does neither A nor B mean?

Neither means the outcome falls outside both circles in the Venn diagram. Its probability is 1 minus the union of A and B.

How do I know whether probability inputs are valid?

Every probability must be between 0 and 1, and the intersection must satisfy the Fréchet bounds. These limits ensure no Venn region becomes negative and the four regions sum to one.

What happens when P(B) is zero in P(A given B)?

P(A | B) is undefined because its formula divides by P(B). A zero-probability conditioning event cannot be handled by ordinary event-level conditional probability.

Related Calculators