Expected Number of Trials Calculator

Enter the per-trial success probability to find the expected number of trials.

Result

50.00 trials
35 trials
49.50
114 trials

How it is calculated

Each trial is independent with the same success probability p. The tool reads p as a percentage by default (2 means 2%) and divides by 100; if the unit is set to a fraction, p is used as given (0.02). It then computes: expected trials 1 / p; standard deviation sqrt((1 - p) / p2); median ceil(ln 0.5 / ln(1 - p)); and trials for a 90% chance of at least one success ceil(ln 0.1 / ln(1 - p)). Medians and 90% counts are rounded up to whole trials. The probability must be above 0 and at most 100% (or 1); 0 or anything larger gives no result. At p = 100% every figure is 1 trial.

Worked example

A drop has a 2% chance per attempt, so p = 0.02. Expected trials = 1 / 0.02 = 50.00 trials. Standard deviation = sqrt(0.98 / 0.0004) = 49.50. Median = ln 0.5 / ln 0.98 = 34.3, rounded up to 35 trials. For 90% certainty: ln 0.1 / ln 0.98 = 113.97, rounded up to 114 trials. So the average is 50 attempts, but about half of players need 35 or fewer and you need 114 to be 90% sure.

Try this example →

Common mistakes

  • Typing 0.02 while the unit is percent. That means 0.02%, giving an expected 5,000 trials instead of 50.
  • Typing 2 while the unit is fraction. A value above 1 is not a probability and returns no result.
  • Believing that after the expected number of trials success is guaranteed. At 50 expected trials there is still about a 36% chance of no success yet.
  • Using the mean as the typical experience. The distribution is skewed, so the median (35 here) is below the mean (50).
  • Applying it when the chance changes between attempts, such as pity timers or drawing without replacement. The tool assumes a fixed p.

Sources

About this calculator

When each independent trial has a fixed success probability p, the number of trials needed until the first success follows the geometric distribution. Its expected value is E[X] = 1/p, its median is the smallest integer m satisfying (1−p)^m ≤ 0.5, and the number of trials needed to reach 90% confidence of at least one success is the smallest n satisfying (1−p)^n ≤ 0.10.

Statisticians and quality control engineers use these figures to plan sampling or inspection processes, game designers use them to tune random item drop rates so players get a fair sense of how many attempts a rare drop should take, and anyone reasoning about repeated independent attempts — from A/B test iterations to games of chance — uses the geometric distribution to separate an average outcome from a reasonably confident upper bound.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    The average and the confident figure can be far apart, which matters for sampling plans. If a defect turns up in 0.1% of items, you expect to inspect 1,000 before the first one, but to be 90% sure of catching at least one you need 2,302. Plan around the second number when missing a defect is costly. What kind of repeated attempt are you modelling: inspections, drops, or something else?

Popular calculators

All Calculators