Probability Calculator (At Least Once, Binomial, Permutations & Combinations)

Find the chance of at least one success in n tries, how many tries you need for a target chance, binomial probabilities and nPr/nCr — with the working shown.

Examples
%

Enter a percent like 0.6, or a fraction like 1/200. → p = 0.006

Chance of at least one hit in 100 tries 45.2179%
Chance of no hit at all54.7821%
Average tries needed166.671 ÷ chance (expected value)
Working
  1. Chance of missing every time = (1 − 0.006)100 = 0.5478207
  2. At least once = 1 − 0.5478207 = 0.4521793 (45.2179%)
How many tries for a given chance?
Target chanceTries needed
50%116
80%268
90%383
95%498
99%766

n = ⌈ ln(1 − target) ÷ ln(1 − p) ⌉

Assumes every try is independent with the same chance. Gacha games with a pity system pay out more often than this. Large values are computed exactly with BigInt.

The chance of at least one success

If something has probability p each time, the chance of at least one success in n independent tries is 1 − (1 − p)ⁿ: work out the chance of missing every time, then subtract it from 1. Enter p as a percent (0.6) or a fraction (1/200).

A 1% chance tried 100 times feels like a sure thing, but it only comes out to 63.4%. A 0.6% drop over 100 tries is 45.22%, and rolling at least one six in four rolls of a die is 51.77% — the classic bet that made the 17th-century gambler Chevalier de Méré rich.

How many tries do I need?

The number of tries for a target chance T is n = ln(1 − T) ÷ ln(1 − p), rounded up. For a 0.6% gacha pull you need 116 pulls for a 50% chance, 383 for 90% and 766 for 99%, even though the average is about 167. Games with a pity system pay out sooner than this.

Exactly k times (binomial distribution)

The Exactly k times tab uses C(n, k) × pᵏ × (1 − p)ⁿ⁻ᵏ and also gives k or more, k or fewer, fewer than k, the mean and the standard deviation. Ten coin flips land exactly three heads 11.72% of the time and three or more heads 94.53% of the time. Up to 100,000 tries are supported.

Permutations and combinations

Enter n and r to get all four counts at once: permutations nPr (order matters), combinations nCr (order does not), arrangements with repetition nʳ, and multisets nHr. Choosing 3 of 5 gives 5P3 = 60, 5C3 = 10, 5³ = 125 and 5H3 = 35. A 6-of-45 lottery has 45C6 = 8,145,060 combinations. Results are exact integers (BigInt), with scientific notation and the full digits for very large values. To actually draw numbers, try the random number generator.