Probability Calculator (P(A), P(A∩B), P(A|B))
Basic event probabilities + union + intersection + conditional + Bayes' theorem from two-event inputs.
Result
- P(A)30.000%
- P(B)40.000%
- P(¬A)70.000%
- P(¬B)60.000%
- P(A∩B) — intersection (joint)12.0000%
- P(A∪B) — union58.0000%
- P(A|B) — A given B (conditional)Bayes-like: P(A|B) = P(A∩B) / P(B).30.0000%
- P(B|A) — B given AP(B|A) = P(A∩B) / P(A).40.0000%
- P(A∩¬B)18.0000%
- P(¬A∩B)28.0000%
- P(¬A∩¬B)42.0000%
- Independence checkAsserted independent ⇒ P(A∩B) = P(A)·P(B).
Step-by-step
- Independence assumed: P(A∩B) = P(A)·P(B) = 30.00% · 40.00% = 12.0000%.
- P(A∪B) = P(A) + P(B) − P(A∩B) = 30.00% + 40.00% − 12.0000% = 58.0000%.
- P(A|B) = P(A∩B) / P(B) = 12.0000% / 40.00% = 30.0000%.
How to use this calculator
- Enter P(A) and P(B) as percentages.
- Pick the relationship: independent (default for fair coins, dice, separate trials), mutex (cannot both happen), or custom joint (enter P(A∩B) directly for known correlation).
- The tool shows all 2×2 contingency cells plus both conditional probabilities (A|B and B|A).
About this calculator
Three classical probability quantities from two-event inputs. P(A∩B) is the joint probability — both events occur. P(A∪B) is the union — at least one occurs, via the inclusion-exclusion principle P(A∪B) = P(A) + P(B) − P(A∩B). P(A|B) is the conditional probability of A given B, defined as P(A∩B)/P(B) (the proportion of A within B). Independence is a special case where P(A∩B) = P(A)·P(B), equivalent to P(A|B) = P(A) — B tells you nothing about A. Mutually exclusive events have P(A∩B) = 0 (they cannot co-occur). The tool also surfaces the 2×2 contingency-table cells: P(A∩B), P(A∩¬B), P(¬A∩B), P(¬A∩¬B), which always sum to 1. Bayes' theorem is implicit in the conditional outputs: P(B|A) = P(A∩B)/P(A) — useful when the conditional direction matters (e.g. updating from prior to posterior).