Geometric Distribution Calculator

Written by Thierno Sadou Diallo, formula verified per our methodology • Last checked on 9/10/2026

The geometric distribution gives P(X=k) = (1−p)^(k−1) × p, the probability that the first success occurs exactly on the kth trial. For a success probability of 20% per trial, the probability that the first success occurs exactly on the 3rd trial is about 12.8%.

Explanation

The geometric distribution models the number of trials needed before obtaining the first success, in a series of independent trials where the success probability p stays constant at each attempt (flipping a coin until the first heads, attempting a penalty kick until the first goal, testing parts until the first defective one). It thus answers a different question from the binomial distribution (already covered by our binomial distribution calculator), which counts the number of successes over a number of trials fixed in advance: the geometric distribution leaves the number of trials free and stops as soon as the first success is obtained. The probability that this first success occurs exactly on the kth trial decreases as k increases (you must first fail k−1 times, each failure having a probability 1−p, before succeeding), which gives an exponentially decreasing distribution. The expected value, 1/p, gives the average number of trials needed before the first success: the rarer a success (small p), the more trials on average to obtain it, an intuitive relationship verified directly in the formula. This distribution shares a memorylessness property with the continuous exponential distribution (already covered by our exponential distribution calculator), of which it is in fact the discrete-time equivalent.

Example: p = 0.2, first success exactly on the 3rd trial

Inputs

Success probability per trial: 20%. Target trial: 3rd.

Calculation

P(X=3) = (1 − 0.2)^(3−1) × 0.2 = 0.8² × 0.2 = 0.64 × 0.2 = 0.128, that is 12.8%. Expected value = 1 ÷ 0.2 = 5 trials on average.

Result

The probability that the first success occurs exactly on the 3rd trial is 12.8%, for an average of 5 trials before success.

Frequently asked questions

Why does the probability decrease as k increases?

Because obtaining the first success exactly on the kth trial requires first failing k−1 times in a row, each failure having a probability (1−p) strictly less than 1. The larger k is, the more consecutive failures must be strung together to get there, which makes that sequence increasingly improbable — hence the decrease in probability as k increases.

What is the difference between P(X=k) and P(X≤k)?

P(X=k), calculated here, gives the probability that the first success occurs exactly on the kth trial, neither before nor after. P(X≤k) would give the cumulative probability that the first success occurs no later than the kth trial (so on trial 1, 2, 3... or k), a different question that would require summing the probabilities of all these cases.

Does this distribution assume each trial is independent of the previous ones?

Yes, it is an essential condition: the success probability p must stay exactly the same at each trial, without being influenced by previous results (unlike, for example, drawing without replacement, where the probability changes at each draw). A repeated die or coin toss under identical conditions does satisfy this independence assumption.

Related resources

Similar calculators