Calculators
Geometric Distribution Calculator
Calculate geometric distribution probabilities for trials until the first success, plus mean and variance, locally in your browser.
Model the wait until the first success.
The geometric distribution models independent trials with a constant success probability p. X is the number of trials including the first success, so X starts at 1. P(X = k) = p × (1 − p)^(k − 1), P(X ≤ k) = 1 − (1 − p)^k, and P(X > k) = (1 − p)^k. The mean is 1/p and the variance is (1 − p)/p². For p = 0.25 and k = 3, the exact probability is 0.140625, cumulative probability is 0.578125, and probability of needing more than three trials is 0.421875. Enter decimal p from 0.000000000001 to 1 and integer k from 1 to 1000000000. A probability of zero has no finite waiting time and is excluded. This uses the trials convention rather than the failures-before-success convention, whose count starts at zero. Results use browser floating-point arithmetic rounded to 12 significant digits; tiny probabilities may underflow to zero. Calculations stay in your browser.
Frequently Asked Questions
Everything you need to know about this tool, how it works, and privacy.
What does X count?
X counts all trials up to and including the first success. Its smallest value is 1. To model failures before success, add 1 to the failure count before entering k.
When is this model suitable?
Use independent trials with the same success probability on each trial, such as repeated rolls until a chosen face appears. Changing probabilities or dependent trials do not follow this model.
What if success is certain?
When p = 1, the first trial succeeds: the mean is 1 and variance is 0. P(X = 1) is 1; exact probabilities for later trials are 0.
Are the results exact?
Results use floating-point arithmetic rounded to 12 significant digits. Very small probabilities can round to zero. Inputs and calculations stay in your browser.