Skip to main content
ponderloop

Probability Calculator

For two events A and B with P(A) = 1/3 and P(B) = 1/4, independent, P(A and B) = 1/12 (that is ≈ 0.0833, or ≈ 8.3333%), P(A or B) = 1/2, P(not A) = 2/3 and P(A xor B) = 5/12. For repeated trials, P(exactly 2 successes in 10 trials) = 1953125/6718464: the chance of exactly 2 sixes in 10 rolls of a die. In the odds panel, 25% converts as: Probability 1/4 = odds of 1:3 for (3:1 against). The calculator gives and, or, not, xor and conditional probabilities for independent or dependent events, binomial exactly, at least and at most for up to 1,000 trials with exact BigInt counts, and converts odds, decimal odds and probability both ways. Inputs can be fractions, decimals or percentages, and every answer is an exact fraction with its working shown.

Updated Runs in your browser: nothing you enter is uploadedHow this tool works

Two events: and, or, not, xor, given

Type a fraction (1/3), a decimal (0.25) or a percentage (25%).

How are A and B related?

P(A and B) = 1/12

A and B both happen with probability 1/12 (≈ 0.0833, ≈ 8.3333%); at least one happens with probability 1/2 (0.5, 50%).

P(A and B)
1/12 (≈ 0.0833, ≈ 8.3333%)
P(A or B)
1/2 (0.5, 50%)
P(not A)
2/3 (≈ 0.6667, ≈ 66.6667%)
P(not B)
3/4 (0.75, 75%)
P(A xor B), exactly one
5/12 (≈ 0.4167, ≈ 41.6667%)
P(neither)
1/2 (0.5, 50%)
P(A | B)
1/3 (≈ 0.3333, ≈ 33.3333%)
P(B | A)
1/4 (0.25, 25%)

Working for two events

P(A and B) = P(A) × P(B) = 1/3 × 1/4 = 1/12

P(A or B) = P(A) + P(B) − P(A and B) = 1/3 + 1/4 − 1/12 = 1/2

P(not A) = 1 − P(A) = 1 − 1/3 = 2/3

P(not B) = 1 − P(B) = 1 − 1/4 = 3/4

P(A xor B) = P(A) + P(B) − 2 × P(A and B) = 1/3 + 1/4 − 2 × 1/12 = 5/12

P(neither) = 1 − P(A or B) = 1 − 1/2 = 1/2

P(A | B) = P(A and B) ÷ P(B) = 1/12 ÷ 1/4 = 1/3

P(B | A) = P(A and B) ÷ P(A) = 1/12 ÷ 1/3 = 1/4

Repeated trials: exactly, at least, at most

Trials are independent and p stays the same. Up to 1,000 trials; k from 0 to n.

P(exactly 2 successes in 10 trials) = 1953125/6718464

Each trial succeeds with probability 1/6 (≈ 0.1667, ≈ 16.6667%). P(at least 2) is 10389767/20155392 (≈ 0.5155, ≈ 51.5483%), and P(at least one success) is 50700551/60466176 (≈ 0.8385, ≈ 83.8494%).

Exactly 2 successes
1953125/6718464 (≈ 0.2907, ≈ 29.071%)
At most 2
1953125/2519424 (≈ 0.7752, ≈ 77.5227%)
At least 2
10389767/20155392 (≈ 0.5155, ≈ 51.5483%)
Fewer than 2
9765625/20155392 (≈ 0.4845, ≈ 48.4517%)
More than 2
566299/2519424 (≈ 0.2248, ≈ 22.4773%)
At least one success
50700551/60466176 (≈ 0.8385, ≈ 83.8494%)
No success at all
9765625/60466176 (≈ 0.1615, ≈ 16.1506%)
Expected successes (n × p)
5/3 (≈ 1.6667)
Trials for a 50% chance of a success
4
Trials for a 90% chance of a success
13
Trials for a 99% chance of a success
26

Working for repeated trials

P(X = k) = C(n, k) × p^k × (1 − p)^(n − k)

P(X = 2) = C(10, 2) × (1/6)² × (5/6)⁸

= 45 × 1/36 × 390625/1679616

= 17578125/60466176 = 1953125/6718464

P(X ≤ 2) = P(X = 0) + P(X = 1) + … + P(X = 2) = 1953125/2519424

P(X ≥ 2) = 1 − P(X ≤ 1) = 1 − 9765625/20155392 = 10389767/20155392

P(at least one success) = 1 − (1 − p)^n = 1 − (5/6)¹⁰ = 1 − 9765625/60466176 = 50700551/60466176

Every number of successes

Every possible number of successes in 10 trials; the row for k = 2 is marked.

Probability of each number of successes
Successes, kExactly kAt most kAt least k
09765625/60466176 ≈ 0.16159765625/60466176 ≈ 0.16151
19765625/30233088 ≈ 0.3239765625/20155392 ≈ 0.484550700551/60466176 ≈ 0.8385
2 (asked)1953125/6718464 ≈ 0.29071953125/2519424 ≈ 0.775210389767/20155392 ≈ 0.5155
3390625/2519424 ≈ 0.155390625/419904 ≈ 0.9303566299/2519424 ≈ 0.2248
4546875/10077696 ≈ 0.05439921875/10077696 ≈ 0.984529279/419904 ≈ 0.0697
521875/1679616 ≈ 0.01310053125/10077696 ≈ 0.9976155821/10077696 ≈ 0.0155
621875/10077696 ≈ 0.00221259375/1259712 ≈ 0.999724571/10077696 ≈ 0.0024
7625/2519424 ≈ 0.00022519375/2519424 ≈ 1337/1259712 ≈ 0.0003
8125/6718464 ≈ 0.000018620155375/20155392 ≈ 1 − 8.43447 × 10⁻⁷49/2519424 ≈ 0.0000194
925/30233088 ≈ 8.26909 × 10⁻⁷60466175/60466176 ≈ 1 − 1.65382 × 10⁻⁸17/20155392 ≈ 8.43447 × 10⁻⁷
101/60466176 ≈ 1.65382 × 10⁻⁸11/60466176 ≈ 1.65382 × 10⁻⁸

Odds and probability

Convert

Probability 1/4 = odds of 1:3 for (3:1 against)

A probability of 1/4 (0.25, 25%) is the same as odds of 1:3 for, or 3:1 against.

Probability
1/4 (0.25, 25%)
Odds for
1:3
Odds against
3:1
Decimal odds
4
As “1 in N”
1 in 4

Working for odds

odds for = p : (1 − p) = 1/4 : 3/4 = 1:3

odds against = (1 − p) : p = 3/4 : 1/4 = 3:1

decimal odds = 1 ÷ p = 1 ÷ 1/4 = 4

Probability formulas for two events

Each result is computed by the calculator above for P(A) = 1/3 and P(B) = 1/4, independent.
QuestionFormulaWith 1/3 and 1/4
A and B both happenP(A) × P(B) if independent, otherwise given1/12
A or B (or both)P(A) + P(B) − P(A and B)1/2
A does not happen1 − P(A)2/3
Exactly one of A, B (xor)P(A) + P(B) − 2 × P(A and B)5/12
Neither happens1 − P(A or B)1/2
A given BP(A and B) ÷ P(B)1/3
B given AP(A and B) ÷ P(A)1/4

Probability, odds and decimal odds

Each row is converted by the calculator above. Odds for are favourable : unfavourable; odds against are the reverse.
ProbabilityPercentageOdds forOdds againstDecimal odds
1/250%1:11:12
1/3≈ 33.3333%1:22:13
1/425%1:33:14
1/520%1:44:15
1/6≈ 16.6667%1:55:16
1/1010%1:99:110
1/52≈ 1.9231%1:5151:152
1/1001%1:9999:1100

Heads in 10 fair coin flips

Binomial probabilities with p = 1/2 and n = 10, from the calculator’s repeated-trials panel.
Heads, kExactly kAt most k
01/1024 = 0.00097656251/1024 = 0.0009765625
15/512 = 0.00976562511/1024 = 0.0107421875
245/1024 = 0.04394531257/128 = 0.0546875
315/128 = 0.117187511/64 = 0.171875
4105/512 = 0.205078125193/512 = 0.376953125
563/256 = 0.24609375319/512 = 0.623046875
6105/512 = 0.20507812553/64 = 0.828125
715/128 = 0.1171875121/128 = 0.9453125
845/1024 = 0.04394531251013/1024 = 0.9892578125
95/512 = 0.0097656251023/1024 = 0.9990234375
101/1024 = 0.00097656251

How to calculate probability

  1. Pick the panel that matches your question. Use “Two events” for the chance that A and B both happen, either happens, or one happens given the other. Use “Repeated trials” for the number of successes in several tries. Use “Odds and probability” to convert between the two.
  2. Enter probabilities as fractions, decimals or percentages. Type 1/3, 0.25 or 25%; “1 in 6” also works. For two events, 1/3 and 1/4 give P(A and B) = 1/12.
  3. Say whether the events are independent. Independent events do not affect each other, so P(A and B) = P(A) × P(B). If they do affect each other, choose “Not necessarily” and enter P(A and B): for example P(king) = 1/13, P(heart) = 1/4 and P(king of hearts) = 1/52 give P(king or heart) = 4/13.
  4. For repeated trials, enter p, n and k. p is the chance of success on one trial, n the number of trials and k the successes you want. With p = 1/6, n = 10 and k = 2 the chance of exactly 2 is 1953125/6718464, which is ≈ 0.2907.
  5. Read the working. Every panel shows the formula with your numbers substituted and the exact fraction, along with the decimal and percentage forms. Rounded values are marked with ≈.

Frequently asked questions

How do you calculate the probability of A and B?
If A and B are independent, multiply: P(A and B) = P(A) × P(B). For 1/3 and 1/4 that is 1/12. If they are not independent, you need P(A and B) itself or P(B | A), because then P(A and B) = P(A) × P(B | A).
How do you calculate the probability of A or B?
Add and subtract the overlap: P(A or B) = P(A) + P(B) − P(A and B). Without subtracting, the overlap would be counted twice. For 1/3 and 1/4 (independent), P(A or B) = 1/2. For events that cannot both happen, P(A and B) = 0 and you simply add.
What is conditional probability, P(A | B)?
It is the chance of A once you know B happened: P(A | B) = P(A and B) ÷ P(B). For independent events it equals P(A), so here P(A | B) = 1/3. It has no value when P(B) = 0.
What does A xor B mean?
Exactly one of A and B happens, not both: P(A xor B) = P(A) + P(B) − 2 × P(A and B). For 1/3 and 1/4 (independent) it is 5/12, which is P(A or B) = 1/2 minus P(A and B) = 1/12.
How do I know if two events are independent?
They are independent exactly when P(A and B) = P(A) × P(B). In the dependent mode the calculator checks it for you: with P(A) = 0.5, P(B) = 40% and P(A and B) = 1/5 it reports Yes: P(A and B) = P(A) × P(B) = 1/5. Equivalently, P(A | B) = P(A).
What are mutually exclusive events?
Events that cannot happen together, so P(A and B) = 0. Two different faces of one die roll are an example. They are not independent unless one of them is impossible: entering P(A) = P(B) = 1/6 and P(A and B) = 0 gives P(A or B) = 1/3 and the calculator reports “No: P(A) × P(B) = 1/36, not 0” for independence.
What is the binomial probability formula?
P(X = k) = C(n, k) × p^k × (1 − p)^(n − k): choose which k of the n trials succeed, then multiply the chance of that pattern. For 3 heads in 5 fair flips it is C(5, 3) × (1/2)³ × (1/2)² = 10/32 = 5/16. The counts C(n, k) come from the same exact BigInt code as the permutation and combination calculator.
How do I find the chance of at least one success in n tries?
Use the complement: 1 − (1 − p)^n. The chance of rolling at least one six in 4 rolls is 1 − (5/6)⁴ = 671/1296, which is ≈ 51.7747%. The calculator’s “trials needed” rows invert this to find how many tries give a 50%, 90% or 99% chance.
What is the difference between “at least”, “at most” and “exactly”?
“Exactly k” is one term of the distribution; “at most k” adds the terms for 0 to k; “at least k” adds the terms for k to n. For 5 fair flips and k = 3 they are 5/16, 13/16 and 1/2.
How many heads are most likely in 10 coin flips?
Five, with probability 63/256 (24.609375%). Even so, 5 heads happens in only about one 10-flip run in four; the table above shows every outcome.
How do I convert odds to probability?
For odds for a:b, probability = a ÷ (a + b). Odds of 3:1 for give 3/4 (75%). For odds against a:b, probability = b ÷ (a + b), so 5 to 2 against is 2/7. Fractions like 3/1 and words like “3 to 1” are read the same way.
How do I convert probability to odds?
Odds for = p : (1 − p), reduced to whole numbers; odds against are the reverse. A probability of 25% is 1:3 for and 3:1 against. A probability of 0 has no odds for and a probability of 1 has no odds against.
What are decimal odds?
Decimal odds are the total return per unit staked, so the implied probability is 1 ÷ decimal odds. Decimal odds of 2.50 imply a probability of 2/5 (40%). Real betting prices also include a margin, which this calculator does not remove.
Why does a result show ≈?
Every result is an exact fraction; the decimal and percentage forms are rounded for display when they do not end, and the “≈” marks it. For example 1/12 ≈ 0.0833. Very small or very large numbers of trials switch to scientific notation, such as ≈ 9.33264 × 10⁻³⁰² (≈ 9.33264 × 10⁻³⁰⁰%) for no heads in 1,000 fair flips.
How large can the numbers be?
Up to 1,000 trials, with each typed number up to 18 digits. A table of every outcome is shown for up to 25 trials. The cap only keeps the page fast; the arithmetic is exact.

How it works

Probabilities are exact fractions of two BigInts, so nothing is rounded until it is displayed. A typed percentage is divided by 100, a decimal becomes a fraction over a power of ten, and “1 in 6” is 1/6. Two events: P(A and B) is P(A) × P(B) for independent events or the value you give, which must lie between max(0, P(A) + P(B) − 1) and min(P(A), P(B)); P(A or B) = P(A) + P(B) − P(A and B); P(A xor B) = P(A or B) − P(A and B); P(A | B) = P(A and B) ÷ P(B). Repeated trials: with p = a/b in lowest terms, P(X = j) = C(n, j) × a^j × (b − a)^(n − j) ÷ b^n, so all terms share the denominator b^n and sums are added as integers before one division; C(n, j) is the exact combination count. “Trials needed” uses logarithms for an estimate and then checks it with exact arithmetic when the numbers stay small. Odds for a:b mean a/(a + b); decimal odds x mean 1/x. Trials are assumed independent with the same p every time. Everything runs in your browser and nothing you type is sent anywhere.

Sources

More: Statistics, probability and gradesAll math & numbersAll toolsHome & DIY calculators