Study and Productivity

How to Calculate AND, OR and Conditional Probability for Two Events

The addition and multiplication rules, independence, mutually exclusive events and conditional probability, with Venn diagrams, tree diagrams and examples.

Saizul Amin
Saizul Amin3 Nov 2026 · 4 min read
How to Calculate AND, OR and Conditional Probability for Two Events

How to Calculate AND, OR and Conditional Probability for Two Events

Most probability homework with two events comes down to four quantities: P(A), P(B), P(A and B) and P(A or B). Know any three and the fourth follows; know whether the events are independent or mutually exclusive and you often need only two. This guide sets out the rules, shows how Venn and tree diagrams make them visible, and works the standard question types. The probability of events calculator for AND, OR and conditional probability shows the same working line by line for your own numbers.

The rules

Complement: P(A′) = 1 − P(A).

Addition rule: P(A ∪ B) = P(A) + P(B) − P(A ∩ B). The subtraction removes the overlap you counted twice.

Multiplication rule: P(A ∩ B) = P(A) × P(B | A) = P(B) × P(A | B).

Conditional probability: P(A | B) = P(A ∩ B) / P(B), as long as P(B) > 0.

Independence: A and B are independent when P(A ∩ B) = P(A) × P(B), or equivalently P(A | B) = P(A).

Mutually exclusive: A and B cannot both happen, so P(A ∩ B) = 0 and P(A ∪ B) = P(A) + P(B).

A frequent exam trap: mutually exclusive events with non-zero probabilities are never independent. If A happens, B cannot, so knowing A changes the chance of B to zero.

Example 1: independent events

A coin lands heads with probability 0.5 and a spinner lands on red with probability 0.4, and neither affects the other.

  • P(heads and red) = 0.5 × 0.4 = 0.2.
  • P(heads or red) = 0.5 + 0.4 − 0.2 = 0.7.
  • P(neither) = 1 − 0.7 = 0.3.
  • P(heads | red) = 0.2 / 0.4 = 0.5, the same as P(heads), as independence requires.

Example 2: working back from the union

In a class, 60 % of students study French (A), 50 % study Spanish (B) and 80 % study at least one of them.

  • Rearranging the addition rule: P(A ∩ B) = 0.6 + 0.5 − 0.8 = 0.3.
  • P(French | Spanish) = 0.3 / 0.5 = 0.6.
  • P(Spanish | French) = 0.3 / 0.6 = 0.5.
  • Only French: 0.6 − 0.3 = 0.3; only Spanish: 0.5 − 0.3 = 0.2; neither: 0.2.

Is there a link between the two? P(A) × P(B) = 0.6 × 0.5 = 0.3, exactly the overlap, so in this class the two choices happen to be independent. Always test independence with numbers rather than intuition.

Example 3: a two-way table

A survey of 100 people gives:

Bnot B
A3020
not A1040

Then P(A) = 50/100 = 0.5, P(B) = 40/100 = 0.4 and P(A ∩ B) = 0.3. P(A | B) = 30 / 40 = 0.75: among people in B, three quarters are also in A. Since 0.3 is not 0.5 × 0.4 = 0.2, A and B are not independent.

Impossible inputs

Not every set of numbers is possible. If P(A) = 0.3, P(B) = 0.4 and someone claims P(A ∩ B) = 0.5, the overlap is larger than A itself. The calculator checks every region of the Venn diagram and warns when any would fall below 0 or above 1.

Diagrams

A Venn diagram shows four regions: only A, only B, both and neither. Their probabilities always add up to 1, which is a quick check of your arithmetic. A tree diagram splits first on A and then on B given A; multiplying along a branch gives an AND probability, and adding the branches that lead to an outcome gives its total probability.

Repeated trials

The chance of at least one success in n independent trials is 1 − (1 − p)^n. With a fair die, the chance of at least one six in four rolls is 1 − (5/6)^4 ≈ 0.518. To reach a target chance, solve for n: four rolls are the fewest that give a better than even chance of a six.

Practising

The practice tab generates new problems of each type and checks your answer, typed as a decimal, a fraction or a percentage. The history keeps any set of inputs you want to revisit.

Limits

The calculator handles two events and their combinations. It does not handle three or more overlapping events, Bayes' theorem with several hypotheses or continuous random variables. It also cannot tell you whether two real-world events are independent; that judgement comes from how the data were produced, not from the formula.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages