Expected Trials to Success Calculator
How many attempts will it take to get a result that happens with a known probability per try? For independent, identical trials the answer follows the geometric distribution: the expected number of trials to the first success is one divided by the success probability. This calculator reports that expectation, its variance and standard deviation, the probability of succeeding within a chosen number of trials, and the expected trials needed for several successes using the negative binomial distribution. It is useful for planning attempts in games, testing, sampling and reliability work.
Expected trials formula
Expected trials to first success = 1 / p
Expected trials for r successes = r / p
Variance (first success) = (1 - p) / p^2
Std deviation = sqrt((1 - p) / p^2)
P(at least one success in n trials) = 1 - (1 - p)^n
The probability p must be strictly between 0 and 1; r and n must be positive.
Waiting-time context
- The geometric distribution models the number of independent trials to the first success.
- The expected wait is the reciprocal of the per-trial probability.
- Rare events have large variance, so individual waiting times are highly unpredictable.
- The negative binomial extends this to the wait for r successes.
- All results assume independent trials with the same success probability.
Expected trials to success: frequently asked questions
How many trials does it take to get a success?
For independent trials each with success probability p, the expected number of trials until the first success is 1 divided by p. For example, at p equal to 0.1 you expect 10 trials on average. This is the mean of the geometric distribution.
What is the variance of the number of trials?
The variance of the number of trials to the first success is (1 minus p) divided by p squared. The standard deviation is the square root of that. Both grow rapidly as p shrinks, which is why rare successes have very unpredictable waiting times.
How do I find the chance of success within n trials?
The probability of at least one success in n independent trials is 1 minus (1 minus p) to the power n. The calculator reports this so you can see how likely you are to succeed within a fixed budget of attempts.
What if I need r successes, not just one?
For r independent successes the expected number of trials is r divided by p, by the negative binomial distribution. Enter the number of required successes and the calculator scales the expected trials accordingly while still reporting the first-success statistics.
What assumptions does this calculator make?
It assumes Bernoulli trials: each attempt is independent and has the same success probability p. If the probability changes between attempts or attempts are not independent, the geometric model does not apply and the results will not be accurate.
Official sources
- U.S. NIST/SEMATECH e-Handbook of Statistical Methods: Engineering Statistics Handbook, geometric and negative binomial distributions.
- U.S. National Institute of Standards and Technology: NIST home, statistical references.
Reviewed by the CalculatorHub team, edited by James Graham, 17 June 2026. See our methodology.