Probability of Events Calculator: And, Or, Conditional
Enter two probabilities and how the events relate to get intersection, union, conditionals, only-A, only-B and neither, with the rule used for each step.
Runs in your browser. Your files never leave your device. See how to check
…
How to do it
- 1Name the events
Type short names for A and B, such as Rain and Late bus, so the diagrams are easy to read.
- 2Enter the probabilities
Choose probabilities or a two-way table of counts and enter P(A), P(B) or the four counts.
- 3Say how they relate
Choose independent, mutually exclusive, or give the intersection, union or a conditional probability.
- 4Read the working
Open Results and working for every probability with the rule and substitution.
- 5See the diagrams
Open Venn and tree to check the regions and branches, then try Repeated trials.
- 6Practise and save
Answer generated questions in Practice, then save or print your result.
About this tool
Two-event probability questions follow a small set of rules, but students lose marks by applying the wrong one. Adding probabilities works only for mutually exclusive events, multiplying works only for independent events, and conditional probability needs the intersection first. This calculator asks how the events are related: independent, mutually exclusive, or linked through a known intersection, union or conditional probability. It then finds every quantity: P(A ∩ B), P(A ∪ B), P(A | B), P(B | A), the complements, only A, only B and neither. Each line names the rule and shows the substitution. A Venn diagram labels the four regions, a tree diagram shows the branches, and the probability table lays out the joint and marginal values. You can also start from a two-way table of counts.
Who this is for
High school and college students meeting probability for the first time, AP Statistics and A-level candidates, nursing and business students in introductory statistics, and teachers who want diagrams that match the numbers.
The rules used
The complement rule gives P(A′) = 1 − P(A). The addition rule gives P(A ∪ B) = P(A) + P(B) − P(A ∩ B), which reduces to a plain sum for mutually exclusive events. The multiplication rule gives P(A ∩ B) = P(A) × P(B | A), which reduces to P(A) × P(B) for independent events. Conditional probability is P(A | B) = P(A ∩ B) ÷ P(B). Only A is P(A) − P(A ∩ B), only B is P(B) − P(A ∩ B), and neither is 1 − P(A ∪ B) by De Morgan's law. After the calculation the tool tests whether the events turn out independent (P(A ∩ B) equals P(A) × P(B)) and whether they are mutually exclusive.
Impossible inputs
Some combinations cannot happen together, for example P(A) = 0.3, P(B) = 0.4 and P(A ∩ B) = 0.5, because the intersection cannot exceed either event. When any region would be negative or greater than 1 the tool explains which constraint fails instead of printing nonsense.
Two-way tables and repeated trials
Enter four counts (A and B, A not B, B not A, neither) and the probabilities are computed from the totals, the usual route for survey and medical test questions. The repeated trials tab finds the chance of at least one success in n independent trials, 1 − (1 − p)ⁿ, and the number of trials needed to reach a target probability.
Worked example
The chance of rain is 0.6 and of a late bus 0.3, and the two are taken as independent. Then P(rain and late bus) = 0.6 × 0.3 = 0.18, P(rain or late bus) = 0.6 + 0.3 − 0.18 = 0.72 and P(neither) = 0.28. For repeated trials, an event with p = 0.1 has a 1 − 0.9¹⁰ = 0.651 chance of happening at least once in 10 tries, and 29 tries are needed to pass 95 %.
Limits
The calculator handles two events at a time. Three or more events, Bayes' theorem with several hypotheses and full distributions are not covered here. Independence is an assumption you choose; the tool cannot know whether it is true for real-world events.
Worked example
P(A) = 0.6, P(B) = 0.3, independent: P(A ∩ B) = 0.18, P(A ∪ B) = 0.72, neither 0.28.
Quick facts
- Category: Math & Science
- Works in your browser, no sign-up, no upload.
- Your input stays on your device.
- Available in English.
- Content last reviewed:
- Official source: OpenStax Introductory Statistics 2e, chapter 3 Probability Topics (addition and multiplication rules, independence, conditional probability)
Frequently asked questions
What is the difference between independent and mutually exclusive?
Independent events do not affect each other, so P(A ∩ B) = P(A) × P(B). Mutually exclusive events cannot both happen, so P(A ∩ B) = 0. Two events with non-zero probabilities cannot be both.
How do I find P(A | B) from P(B | A)?
Choose the conditional input, enter P(A), P(B) and P(B | A). The tool multiplies to get the intersection and divides by P(B), which is Bayes' rule for two events.
Can I enter percentages?
Enter probabilities as decimals between 0 and 1. Switch the display to percent if you prefer the answers shown as percentages.
Why does the tool say my numbers are impossible?
A region of the Venn diagram would need a probability below 0 or above 1. Usually the intersection is larger than one of the events, or the union exceeds 1.
Can I use counts from a survey?
Yes. Choose the two-way table input and type the four counts; probabilities, conditionals and the independence check are computed from the table.
How does the practice mode work?
It generates questions on unions, intersections and conditionals, checks answers typed as decimals, fractions or percentages and shows the rule-by-rule working.
