Probability Calculator
Calculate P(A and B), P(A or B), P(not A), P(not B), and P(A|B) for independent or mutually exclusive events. Includes SVG Venn diagram and educational explanations.
Probability
Results update instantly as you type
Enter Values
P(A|B) — Conditional Probability of A given B
0.5
P(A) as %
50.0%
P(B) as %
30.0%
Event Type
Independent
Embed Code
Copy and paste this HTML snippet into any web page to embed this calculator directly.
<iframe src="http://127.0.0.1:54963/embed/math/probability-calculator?ref=embed" title="Probability Calculator" width="100%" style="max-width:600px; border:none; height:500px;" loading="lazy"></iframe>
Direct Link
Share this link to let others open the calculator in their browser.
P(A)
0.5
50.0%
P(B)
0.3
30.0%
P(A ∩ B)
0.15
15.0%
P(A ∪ B)
0.65
65.0%
P(¬A) — Not A
0.5 (50.0%)
P(¬B) — Not B
0.7 (70.0%)
P(A|B) — A given B
0.5 (50.0%)
Independent: P(A|B) = P(A)
Relationship
Independent
Events do not affect each other
Venn Diagram
Why Independent Events?
Independent events have no influence on each other. The occurrence of B does not change the probability of A, so P(A|B) = P(A). The joint probability is the product: P(A ∩ B) = P(A) × P(B).
Examples: Flipping a coin and rolling a die; drawing two cards with replacement; weather in two different cities on the same day (approximately).
The addition rule for independent events: P(A ∪ B) = P(A) + P(B) − P(A)P(B). The overlap P(A ∩ B) is subtracted to avoid double-counting.
Calculation Breakdown
P(A ∩ B) — Intersection
P(A∩B) = P(A) × P(B) = 0.5 × 0.3 = 0.15
P(A ∪ B) — Union
P(A∪B) = P(A) + P(B) − P(A∩B) = 0.5 + 0.3 − 0.15 = 0.65
Complements
P(¬A) = 1 − 0.5 = 0.5
P(¬B) = 1 − 0.3 = 0.7
P(A|B) — Conditional
Independent: P(A|B) = P(A) = 0.5
Key Rules Summary
Addition Rule
P(A∪B) = P(A) + P(B) − P(A∩B)
Multiplication Rule
P(A∩B) = P(A) × P(B) (independent)
Complement Rule
P(¬A) = 1 − P(A)
Conditional Probability
P(A|B) = P(A∩B) ÷ P(B)
The Formula
Probability quantifies the likelihood of events occurring. The addition rule finds the probability of A or B happening. The conditional probability formula calculates the probability of A given that B has occurred. For independent events, P(A∩B) = P(A) × P(B). For mutually exclusive events, P(A∩B) = 0.
Variable Definitions
Probability of A
The likelihood of event A occurring, ranging from 0 (impossible) to 1 (certain). Represented as a decimal or percentage.
Probability of B
The likelihood of event B occurring, ranging from 0 to 1.
Joint Probability
The probability that both A and B occur simultaneously. For independent events: P(A) × P(B). For mutually exclusive events: 0.
Union Probability
The probability that A or B (or both) occur. Uses the addition rule: P(A) + P(B) − P(A∩B).
Conditional Probability
The probability of A occurring given that B has already occurred. For independent events: P(A). For mutually exclusive: 0.
How to Use This Calculator
- 1
Enter P(A), the probability of event A (0 to 1, where 0.5 = 50%).
- 2
Enter P(B), the probability of event B (0 to 1).
- 3
Select whether the events are Independent or Mutually Exclusive.
- 4
Review all computed probabilities: P(A∩B), P(A∪B), P(¬A), P(¬B), and P(A|B).
- 5
Probabilities are also displayed as percentages for easier interpretation.
Venn diagrams visualize sample spaces and event probabilities
Understanding the Concept
Probability theory is the foundation of statistics, data science, risk assessment, and decision-making under uncertainty. Two key concepts are independence and mutual exclusivity. Independent events have no influence on each other — flipping a coin twice yields independent outcomes; knowing the first flip was heads tells you nothing about the second. Mutually exclusive events cannot happen simultaneously — drawing a single card cannot be both a heart and a spade. The addition rule P(A∪B) = P(A) + P(B) − P(A∩B) accounts for double-counting the overlap; the subtraction is needed because the intersection is included in both P(A) and P(B). Conditional probability P(A|B) measures how the occurrence of B changes the likelihood of A — this is the foundation of Bayes' theorem, which underlies modern machine learning and spam filtering. When events are independent, P(A|B) = P(A) — B's occurrence does not change A's probability. These concepts are essential in medical testing (sensitivity and specificity), quality control (defect rates), financial risk modeling, and scientific hypothesis testing.
Frequently Asked Questions
Sources & References
Related Guides
Related Calculators
Reviews
No reviews yet. Be the first to share your experience with Probability Calculator.
Write a Review
