Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Probability of Two Events (And, Or, Neither)

From the probabilities of two events that do not affect each other (independent events), this finds the probability that both happen, that at least one happens, and more. Enter each probability as a number from 0 to 1 (for example, 30% is 0.3).

Enter each probability as a number from 0 to 1 (for example, 30% is 0.3).
Result and figure
Enter the two probabilities in the fields on the left and press "Calculate". The result will appear here.

What you can do on this page

  • Enter the probability of each of two events, and you get the probability that both happen, \(P(A \cap B)\), and that at least one happens, \(P(A \cup B)\), on the spot
  • It also calculates the probability that exactly one happens, \(P(A \Delta B)\), that neither happens, that only A happens, and more, all at once
  • Questions like "There is a 50% chance of sun on day 1 of my trip and a 30% chance on day 2. What is the chance of sun on both days?" are solved in one step
  • A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
This works only when the two events do not affect each other (they are independent). A die and a coin, where one result has nothing to do with the other, are fine. It does not work when one result changes the probability of the other, as in "drawing two tickets without putting the first one back".

What is this calculation used for?

Estimating the chance of good weather on both days of a trip or event

If there is a 50% chance of sun on day 1 and a 30% chance on day 2, the chance of sun on both days is only \(0.5 \times 0.3 = 0.15\) (15%). (This is a rough estimate that treats the two days' weather as independent.)
Because you multiply the probabilities, the chance that "both go well" is often much smaller than you expect. Having a feel for this number changes how you make plans.

The chance of getting into at least one of two schools (college admissions, jobs, lotteries)

If you apply to your first-choice college with a 50% chance of admission and to a second college with a 30% chance, the chance of getting into at least one is \(0.5 + 0.3 - 0.15 = 0.65\) (65%). (This assumes the two decisions are independent.)
For a big life choice, you can check with numbers, not just gut feeling, how much adding another option raises your overall chance of success.

Checking how safe your backups are (data and emergency preparedness)

If you store the same data on two disks that each have a 1% chance of failing in a year, the chance of losing both at once drops to \(0.01 \times 0.01 = 0.0001\) (1 in 10,000), as long as the failures are independent.
"Double your safeguards and the risk shrinks by multiplication." This idea is the basis of every kind of preparation, from backing up your photos to storing emergency supplies in more than one place.

Understanding medical information correctly (combined risks of surgery and treatment)

If you are told "the surgery has a 90% success rate, and there is a 95% chance of no complications afterward", the chance that both go well is \(0.9 \times 0.95 = 0.855\) (85.5%). (This is a guide that treats the two as independent.)
For critical life decisions such as choosing a treatment, being able to calculate the overall outlook when several probabilities combine helps you make a decision you are comfortable with.

Quality control (the probability that all parts are good)

In a product that uses two parts, each good 99% of the time, the probability that both parts are good is \(0.99 \times 0.99 = 0.9801\) (98.01%).
Quality control staff in manufacturing repeat this calculation for every part to estimate the pass rate of the whole product, and work backward to find the defect rate allowed for each part.

Formulas and figures

Complement (probability that A does not happen)
Figure
Standard notation (the usual math form)
\(P(A')\) \(=\) \(1\) \(-\) \(P(A)\)
In words (symbols replaced with words)
③ \(P(A')\): probability that A does not happen \(=\) ① \(1\): total probability \(-\) ② \(P(A)\): probability that A happens
The formula in words
① Take the \(1\): total probability
② subtract the \(P(A)\): probability that A happens
③ and you get the \(P(A')\): probability that A does not happen
Quick example
If the chance of winning a raffle is 0.2, the chance of not winning is
\(P(A')\): not winning \(=\) \(1\): total probability \(-\) winning (0.2)
\(1 - 0.2 = 0.8\ \ (80\%)\)
Key idea
The probability that something happens and the probability that it does not always add up to the total probability, 1. So subtracting the probability that it happens from 1 gives the probability that it does not. The symbol \(A'\) (read "A prime") stands for the event "A does not happen", called the complement of A. Some books write it as \(A^c\) or \(\overline{A}\) instead.
Intersection (probability that both A and B happen)
Figure
Standard notation (the usual math form)
\(P(A \cap B)\) \(=\) \(P(A)\) \(\times\) \(P(B)\)
In words (symbols replaced with words)
③ \(P(A \cap B)\): probability that both A and B happen \(=\) ① \(P(A)\): probability that A happens \(\times\) ② \(P(B)\): probability that B happens
The formula in words
① Take the \(P(A)\): probability that A happens
② multiply it by the \(P(B)\): probability that B happens
③ and you get the \(P(A \cap B)\): probability that both A and B happen
Quick example
If the chance of sun is 0.5 on day 1 of a trip and 0.3 on day 2, the chance of sun on both days is
\(P(A \cap B)\): sun on both days \(=\) sun on day 1 (0.5) \(\times\) sun on day 2 (0.3)
\(0.5 \times 0.3 = 0.15\ \ (15\%)\)
Key idea
Why is "and" a multiplication? A happens in a share \(P(A)\) of all cases, and within that share, B also happens in a share \(P(B)\). It is "a share of a share", so you multiply. 30% of 50% is \(0.5 \times 0.3 = 0.15\) (15%). The square on the right of the figure above treats the whole as a square with area 1, with width \(P(A)\) and height \(P(B)\). The case "both A and B happen" is the rectangle in the lower left, and its area is \(P(A) \times P(B)\). The Venn diagram on the left only shows which part is which; the areas of its circles do not match the sizes of the probabilities. This formula works only when A and B do not affect each other (they are independent). It does not work when one result changes the probability of the other, as in "drawing two tickets without putting the first one back".
Union (probability that at least one of A and B happens)
Figure
Standard notation (the usual math form)
\(P(A \cup B)\) \(=\) \(P(A)\) \(+\) \(P(B)\) \(-\) \(P(A \cap B)\)
In words (symbols replaced with words)
④ \(P(A \cup B)\): probability that at least one happens \(=\) ① \(P(A)\): probability that A happens \(+\) ② \(P(B)\): probability that B happens \(-\) ③ \(P(A \cap B)\): probability that both happen
The formula in words
① Take the \(P(A)\): probability that A happens
② add the \(P(B)\): probability that B happens
③ subtract the \(P(A \cap B)\): probability that both happen once
④ and you get the \(P(A \cup B)\): probability that at least one happens
Quick example
If the chance of sun is 0.5 on day 1 and 0.3 on day 2 (so the chance of sun on both days is 0.5 × 0.3 = 0.15), the chance of sun on at least one of the days is
\(P(A \cup B)\): sun on at least one day \(=\) sun on day 1 (0.5) \(+\) sun on day 2 (0.3) \(-\) sun on both days (0.15)
\(0.5 + 0.3 - 0.15 = 0.65\ \ (65\%)\)
Key idea
Why subtract \(P(A \cap B)\)? If you simply add \(P(A) + P(B)\), the case "both happen" is counted twice, once as part of A and once as part of B. Subtracting the overlap \(P(A \cap B)\) once fixes the double count. This counting rule is called the inclusion-exclusion principle.
Symmetric difference (probability that exactly one happens)
Figure
Standard notation (the usual math form)
\(P(A \Delta B)\) \(=\) \(P(A)\) \(+\) \(P(B)\) \(-\) \(2P(A \cap B)\)
In words (symbols replaced with words)
④ \(P(A \Delta B)\): probability that exactly one happens \(=\) ① \(P(A)\): probability that A happens \(+\) ② \(P(B)\): probability that B happens \(-\) ③ \(2P(A \cap B)\): twice the probability that both happen
The formula in words
① Take the \(P(A)\): probability that A happens
② add the \(P(B)\): probability that B happens
③ subtract \(2P(A \cap B)\): twice the probability that both happen
④ and you get the \(P(A \Delta B)\): probability that exactly one happens
Quick example
If event A has probability 0.5 and event B has probability 0.4 (so the probability that both happen is 0.5 × 0.4 = 0.2), the probability that exactly one happens is
\(P(A \Delta B)\): exactly one happens \(=\) A happens (0.5) \(+\) B happens (0.4) \(-\) both happen (0.2), counted twice
\(0.5 + 0.4 - 2 \times 0.2 = 0.5\ \ (50\%)\)
Key idea
For the union (at least one), you subtracted the overlap only once, so the case "both happen" stayed in. For the symmetric difference you want to remove the case "both happen" completely, so you subtract the double-counted overlap twice.
For two independent events, the basic rules are: "and" (both) is a multiplication, and "or" (at least one) is an addition minus the overlap.

Symbols and terms

Symbols

\(P(A)\) P of A The probability that event A happens. P is the first letter of "probability".
\(A'\) A prime (complement) The event "A does not happen", called the complement of A. Also written \(A^c\) or \(\overline{A}\). It is found with \(P(A') = 1 - P(A)\).
\(\cap\) cap (intersection) The symbol for "and". \(A \cap B\) is the event "both A and B happen". In a Venn diagram it is the part where the two circles overlap.
\(\cup\) cup (union) The symbol for "or". \(A \cup B\) is the event "at least one of A and B happens". In a Venn diagram it is everything inside the two circles.
\(\Delta\) delta (symmetric difference) The symbol for "exactly one". \(A \Delta B\) is the event "exactly one of A and B happens (not both)".

Terms

event Something that either happens or does not, such as "rolling a 6" or "rain tomorrow". In probability, such outcomes are called events and are given names like A and B.
independent When the result of one event does not change how likely the other is. A die roll and a coin toss are independent. Drawing a second ticket without putting the first one back is not, because the first result changes the probability of the second. This calculator is only for independent events.
complement The opposite event, that the event does not happen. If the probability of happening is 0.2, the probability of not happening (the probability of the complement) is \(1 - 0.2 = 0.8\).
intersection Both of two events happen. The symbol is \(A \cap B\) (read "A and B"). For independent events, the probability is the product \(P(A) \times P(B)\).
union At least one of two events happens. The symbol is \(A \cup B\) (read "A or B"). Its probability is the sum minus the overlap \(P(A \cap B)\), subtracted once.
symmetric difference Exactly one of two events happens (not both). The symbol is \(A \Delta B\). In logic it is called "exclusive or" (XOR).
mutually exclusive Two events that cannot happen at the same time. Example - on a single die roll, "an even number" and "an odd number" are mutually exclusive. Be careful - this is a different idea from "independent".
inclusion-exclusion principle A counting rule for "or" probabilities. Simply adding counts the "both happen" case twice, so you subtract the overlap once. It is the basis of the union formula \(P(A \cup B) = P(A) + P(B) - P(A \cap B)\).

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back over the topics in this list is the fastest way forward.

Basic probability (Grade 7)
  • Knowing that when all outcomes are equally likely, probability = (number of favorable outcomes) ÷ (total number of outcomes)
  • Knowing that a probability is a number from 0 to 1, and the probabilities of all possible outcomes add up to 1
Percents and decimals (Grade 6)
  • Being able to switch between percents and decimals, such as 30% = 0.3
  • Knowing that "a share of a share", such as 0.3 of 0.5, is found by multiplying
Multiplying fractions (Grade 5)
  • Being able to multiply fractions, as in \(\frac{1}{6} \times \frac{1}{6} = \frac{1}{36}\)
Sets and Venn diagrams (high school)
  • Being able to tell apart, in a diagram of two overlapping circles (a Venn diagram), "and = the overlapping part" and "or = everything inside the two circles"

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to find the probability that A does not happen (complement)
Probability of A, P(A) 0.2
A does not happen, P(A') =1-B1
Table to find the probability that both A and B happen
Probability of A, P(A) 0.5
Probability of B, P(B) 0.3
Both happen, P(A∩B) =B1*B2
Table to find the probability that at least one of A and B happens
Probability of A, P(A) 0.5
Probability of B, P(B) 0.3
At least one happens, P(A∪B) =B1+B2-B1*B2
Table to find the probability that exactly one happens (symmetric difference)
Probability of A, P(A) 0.5
Probability of B, P(B) 0.3
Exactly one happens, P(AΔB) =B1+B2-2*B1*B2
After pasting, column A holds the labels and column B holds the numbers. The upper rows are your inputs, and the formula in the last row calculates the result from them.
In a formula, "B1" and "B2" mean "use the number in that cell", and "*" is multiplication. Just replace the input numbers with your own probabilities.
In the second table, for example, B3 shows 0.5 × 0.3 = 0.15. Only the first table (the complement) has a single input in B1, with the result in B2.

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to find the probability that A does not happen (complement)
Probability of A, P(A) 0.2
A does not happen, P(A') =1-B1
Table to find the probability that both A and B happen
Probability of A, P(A) 0.5
Probability of B, P(B) 0.3
Both happen, P(A∩B) =B1*B2
Table to find the probability that at least one of A and B happens
Probability of A, P(A) 0.5
Probability of B, P(B) 0.3
At least one happens, P(A∪B) =B1+B2-B1*B2
Table to find the probability that exactly one happens (symmetric difference)
Probability of A, P(A) 0.5
Probability of B, P(B) 0.3
Exactly one happens, P(AΔB) =B1+B2-2*B1*B2
The same formulas as in Excel work as is. Copy the whole table and paste it into cell A1. The upper rows are your inputs and the last row is the calculated result.
Just replace the input numbers with your own probabilities.

How to calculate it in Python

p_a = 0.5   # probability that event A happens
p_b = 0.3   # probability that event B happens

p_both = p_a * p_b                       # both happen, P(A∩B)
p_at_least_one = p_a + p_b - p_both      # at least one, P(A∪B)
p_exactly_one = p_a + p_b - 2 * p_both   # exactly one, P(AΔB)
p_neither = 1 - p_at_least_one           # neither happens

print(f"Both happen: {p_both}")
print(f"At least one happens: {p_at_least_one}")
print(f"Exactly one happens: {p_exactly_one}")
print(f"Neither happens: {p_neither}")
Runs with the standard library only. Change the values of p_a and p_b at the top to the probabilities you want, and run it.

How to write it in LaTeX and other math languages (copy and paste)

Complement (probability that A does not happen)
P(A′) = 1 − P(A)
P(A') = 1 - P(A)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>P</mi><mo>(</mo>
    <msup><mi>A</mi><mo>&#x2032;</mo></msup>
    <mo>)</mo>
    <mo>=</mo>
    <mn>1</mn>
    <mo>&#x2212;</mo>
    <mi>P</mi><mo>(</mo><mi>A</mi><mo>)</mo>
  </mrow>
</math>
P(A') = 1 - P(A)
1 - pA
pNotA := 1 - pA;
p_not_a = 1 - p_a;
P(A′) = 1 - P(A)
Intersection (probability that both A and B happen)
P(A∩B) = P(A) × P(B)
P(A \cap B) = P(A) \times P(B)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>P</mi><mo>(</mo><mi>A</mi><mo>&#x2229;</mo><mi>B</mi><mo>)</mo>
    <mo>=</mo>
    <mi>P</mi><mo>(</mo><mi>A</mi><mo>)</mo>
    <mo>&#xD7;</mo>
    <mi>P</mi><mo>(</mo><mi>B</mi><mo>)</mo>
  </mrow>
</math>
P(A nn B) = P(A) xx P(B)
pA*pB
pAandB := pA*pB;
p_a_and_b = p_a*p_b;
P(A∩B) = P(A) × P(B)
Union (probability that at least one of A and B happens)
P(A∪B) = P(A) + P(B) − P(A∩B)
P(A \cup B) = P(A) + P(B) - P(A \cap B)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>P</mi><mo>(</mo><mi>A</mi><mo>&#x222A;</mo><mi>B</mi><mo>)</mo>
    <mo>=</mo>
    <mi>P</mi><mo>(</mo><mi>A</mi><mo>)</mo>
    <mo>+</mo>
    <mi>P</mi><mo>(</mo><mi>B</mi><mo>)</mo>
    <mo>&#x2212;</mo>
    <mi>P</mi><mo>(</mo><mi>A</mi><mo>&#x2229;</mo><mi>B</mi><mo>)</mo>
  </mrow>
</math>
P(A uu B) = P(A) + P(B) - P(A nn B)
pA + pB - pA*pB
pAorB := pA + pB - pA*pB;
p_a_or_b = p_a + p_b - p_a*p_b;
P(A∪B) = P(A) + P(B) - P(A∩B)
Symmetric difference (probability that exactly one happens)
P(AΔB) = P(A) + P(B) − 2P(A∩B)
P(A \Delta B) = P(A) + P(B) - 2P(A \cap B)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>P</mi><mo>(</mo><mi>A</mi><mo>&#x394;</mo><mi>B</mi><mo>)</mo>
    <mo>=</mo>
    <mi>P</mi><mo>(</mo><mi>A</mi><mo>)</mo>
    <mo>+</mo>
    <mi>P</mi><mo>(</mo><mi>B</mi><mo>)</mo>
    <mo>&#x2212;</mo>
    <mn>2</mn>
    <mi>P</mi><mo>(</mo><mi>A</mi><mo>&#x2229;</mo><mi>B</mi><mo>)</mo>
  </mrow>
</math>
P(A Delta B) = P(A) + P(B) - 2 P(A nn B)
pA + pB - 2*pA*pB
pAxorB := pA + pB - 2*pA*pB;
p_a_xor_b = p_a + p_b - 2*p_a*p_b;
P(AΔB) = P(A) + P(B) - 2P(A∩B)

How to have ChatGPT  do the calculation

You are a probability calculation assistant. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

Event A has probability 0.5 and event B has probability 0.3. A and B are independent.
Find each of the following:
1. The probability that both A and B happen, P(A∩B)
2. The probability that A or B (at least one) happens, P(A∪B)
3. The probability that exactly one of them happens, P(AΔB)
4. The probability that neither happens

Show the formulas you used and the numbers from the execution result in a table.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.