Probability Calculator
Enter the probabilities of two events A and B and their joint probability P(A ∩ B). The calculator returns the complements, the union, both conditional probabilities and tells you whether the events are independent.
Why the joint probability must be given
Two events and the chance they both occur are enough to determine everything else about their relationship. From those three numbers come the complements, the chance that at least one happens, both conditional probabilities, and the answer to whether the events influence each other at all.
This calculator derives all of them. The joint probability is the input that does the work — without it, knowing how likely each event is says nothing about how they interact.
The probabilities of two events do not determine the probability of both. The same pair of events could overlap completely, not at all, or anywhere between, and each case gives a different union and different conditionals. That is precisely the information the third input supplies.
It also makes independence a question with an answer rather than an assumption. Multiplying the two probabilities predicts what the joint would be if the events were independent; comparing that against the actual value settles it.
How to use this calculator
- Enter the probability of each event Both between 0 and 1 inclusive. Percentages must be converted first — 40 per cent is entered as 0.4.
- Enter the probability of both occurring The overlap between the two events. It cannot exceed either individual probability, and a value that does is rejected with the offending limit named.
- Read the union and the conditionals The union is the chance at least one occurs. The two conditionals are generally different from each other, and neither is the joint probability.
- Check the independence verdict It compares the product of the two probabilities against the joint value you supplied, and states which relationship holds.
The formula, and where it comes from
P(A ∪ B) = P(A) + P(B) − P(A ∩ B) P(A | B) = P(A ∩ B) / P(B) independent ⟺ P(A ∩ B) = P(A)·P(B)
The union formula subtracts the overlap because adding the two probabilities counts it twice — once in each event. That correction is the whole of inclusion-exclusion at this size, and forgetting it is what produces impossible unions above 1.
A conditional probability rescales rather than reduces. Given that one event occurred, the space of possibilities shrinks to that event alone, so the joint probability is divided by it to express the overlap as a fraction of the new whole. That is why a conditional is always at least as large as the joint.
The two conditionals have the same numerator and different denominators, so they are equal only when the two events are equally likely. Reading one for the other is a common and consequential slip.
Independence means one event tells you nothing about the other, which is equivalent to the joint probability being the product of the two. The check compares those two numbers within a small tolerance and reports the verdict rather than leaving it to be inferred.
What each input means
- P(A) Probability of A — form field “P(A)”
- Between 0 and 1 inclusive. Entered as a decimal, not a percentage.
- P(B) Probability of B — form field “P(B)”
- The same, for the second event.
- P(A ∩ B) Joint probability — form field “P(A ∩ B)”
- The chance both occur. It cannot exceed either individual probability, since both must happen for the pair to.
Worked examples
Every number below is produced by the same calculation engine the tool above runs. Nothing here is typed by hand, so the walkthrough cannot drift from what you get when you enter the same values yourself.
Independent events
Two events of probability 0.5 and 0.4 whose joint probability is 0.2 — exactly the product of the two.
Inputs P(A) = 0.5, P(B) = 0.4, P(A ∩ B) = 0.2
- Given P(A) = 0.5, P(B) = 0.4, P(A ∩ B) = 0.2
- Complements P(A') = 1 − P(A) = 0.5, P(B') = 1 − P(B) = 0.6
- Union P(A ∪ B) = P(A) + P(B) − P(A ∩ B) = 0.7
- Conditional P(A | B) = P(A ∩ B)/P(B) = 0.5, P(B | A) = 0.4
- Independence check P(A)·P(B) = 0.2 = P(A ∩ B) = 0.2 → events are independent
Result P(A ∪ B) = 0.7, P(A | B) = 0.5, P(B | A) = 0.4, independent
The independence check confirms it: the product matches the given joint value. Each conditional then equals the corresponding unconditional probability, which is what independence means in practice — knowing one event occurred changes nothing about the other.
The union is 0.7, less than the 0.9 that adding the two would give. The 0.2 overlap was counted twice and subtracted once.
Dependent events
Probabilities of 0.6 and 0.3 with a joint probability of 0.1, well below the 0.18 independence would predict.
Inputs P(A) = 0.6, P(B) = 0.3, P(A ∩ B) = 0.1
- Given P(A) = 0.6, P(B) = 0.3, P(A ∩ B) = 0.1
- Complements P(A') = 1 − P(A) = 0.4, P(B') = 1 − P(B) = 0.7
- Union P(A ∪ B) = P(A) + P(B) − P(A ∩ B) = 0.8
- Conditional P(A | B) = P(A ∩ B)/P(B) = 0.333333, P(B | A) = 0.166667
- Independence check P(A)·P(B) = 0.18 ≠ P(A ∩ B) = 0.1 → events are dependent
Result P(A ∪ B) = 0.8, P(A | B) = 0.333333, P(B | A) = 0.166667, dependent
The joint value falls short of the product, so the events are dependent and negatively so: each makes the other less likely than it would otherwise be. The verdict line names the relationship rather than only reporting the two figures.
The two conditionals differ noticeably, since the denominators are 0.3 and 0.6. That asymmetry is the ordinary case, and it is why the two are reported separately.
Mutually exclusive events
Probabilities of 0.4 and 0.3 that cannot both occur, so the joint probability is zero.
Inputs P(A) = 0.4, P(B) = 0.3, P(A ∩ B) = 0
- Given P(A) = 0.4, P(B) = 0.3, P(A ∩ B) = 0
- Complements P(A') = 1 − P(A) = 0.6, P(B') = 1 − P(B) = 0.7
- Union P(A ∪ B) = P(A) + P(B) − P(A ∩ B) = 0.7
- Conditional P(A | B) = P(A ∩ B)/P(B) = 0, P(B | A) = 0
- Independence check P(A)·P(B) = 0.12 ≠ P(A ∩ B) = 0 → events are dependent
Result P(A ∪ B) = 0.7, P(A | B) = 0, P(B | A) = 0, dependent
The union is simply the sum, since there is no overlap to subtract. Both conditionals are zero: knowing one event occurred rules the other out entirely.
Mutually exclusive is the opposite of independent, not a version of it. Two events that exclude each other are maximally informative about one another, which is why the check reports dependence here.
Reading the result
Exclusive and independent are opposites
Mutually exclusive events cannot both occur, so learning that one happened tells you the other did not — the strongest possible dependence. Two events with non-zero probabilities cannot be both exclusive and independent.
A conditional is not a joint probability
The joint is the chance both occur out of all possibilities; the conditional is the chance one occurs given the other already has. The conditional is always the larger of the two, sometimes by a great deal.
Dependence has a direction of sign
A joint probability above the product means each event makes the other more likely; below it means less likely. The size of the gap says how strongly, though the verdict line reports only whether it exists.
When you would use this
Testing an independence assumption
Many calculations assume two events are independent and multiply their probabilities. Comparing that product against an observed joint frequency is the direct test of whether the assumption was warranted.
Working with at least one
Questions asking for the chance that at least one of two things happens are union questions, and the overlap has to be subtracted. This is the shape of most reliability and risk calculations involving two components.
Assumptions and limitations
What this calculator assumes
- All three inputs lie between 0 and 1 inclusive, entered as decimals rather than percentages.
- The joint probability does not exceed either individual probability.
- Independence is judged by comparing the product against the joint value within a small tolerance.
- A conditional probability is undefined when the conditioning event has probability zero, and is reported as such.
Where it stops being the right tool
- Two events only: three-event unions and conditionals need the general inclusion-exclusion formula.
- The joint probability must be known rather than derived from other information.
- No Bayesian updating from a prior and a likelihood, which the dedicated Bayes tool covers.
- No distinction between sampling with and without replacement — the probabilities are taken as given.
Common mistakes
Adding the two probabilities to get the union
Why it happens. It is the intuitive move and it is right for mutually exclusive events, which are the first case usually taught. For overlapping events it double-counts the intersection.
How to avoid it. Subtract the joint probability. If your union exceeds 1, the overlap was certainly counted twice.
Assuming independence to supply the third input
Why it happens. Multiplying the two probabilities gives a plausible joint value, and it is often the only figure to hand.
How to avoid it. Use an observed or given joint probability instead. Entering the product guarantees the independence check will confirm it, which makes the check meaningless.
Swapping the two conditionals
Why it happens. They look symmetric in notation and share a numerator, so it is easy to read the wrong one. The denominators differ, and so do the answers.
How to avoid it. The event after the bar is the one assumed to have occurred, and it is the denominator. Match it against what the question tells you is known.
Frequently asked questions
How is the union computed?
By inclusion-exclusion: add the two probabilities and subtract the joint probability. The subtraction is needed because the overlap is contained in both events and would otherwise be counted twice.
What does the independence check do?
It compares the product of the two individual probabilities against the joint probability you supplied. Equality means the events are independent; a mismatch means one carries information about the other, and the direction of the gap says whether that influence is positive or negative.
How is conditional probability defined?
P(A | B) is the joint probability divided by the probability of B — the overlap expressed as a fraction of B rather than of everything. It is undefined when B has probability zero, since there is nothing to condition on.
Can mutually exclusive events be independent?
Not if both have non-zero probability. Exclusivity means one occurring rules the other out, which is a very strong dependence. The two ideas are frequently confused and are close to opposites.