Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Geometric distribution calculator

Find the chance that the first success comes on try k, or within k tries, when each try has the same chance p. Choose whether k counts trials or failures.

Private: calculated on your device. Nothing you type is sent anywhere.

Next: Counting events over a stretch of time instead? Use the Poisson calculator. Drawing without replacement? Try the hypergeometric calculator.

Geometric distribution formulas

There are two common ways to count, and textbooks use both. The calculator lets you choose.

Trials until the first success: P(X = k) = (1 − p)^(k − 1) × p, k = 1, 2, 3…
P(X ≤ k) = 1 − (1 − p)^k · P(X > k) = (1 − p)^k · mean = 1 ÷ p
Failures before the first success: P(Y = k) = (1 − p)^k × p, k = 0, 1, 2…
mean = (1 − p) ÷ p · variance (both) = (1 − p) ÷ p²

Worked example

Roll a die until you get a 6, so p = 1/6. The chance the first 6 comes on the 3rd roll is (5/6)² × 1/6 = 25/216 = 0.115741, about 11.6%: two misses, then a hit.

The chance of getting a 6 within the first 3 rolls is 1 − (5/6)³ = 1 − 125/216 = 91/216 = 0.421296. The chance of no 6 in 3 rolls is 0.5787. On average it takes 1 ÷ (1/6) = 6 rolls.

Getting a realistic number

  • Each try must be independent, with the same chance of success every time. A free-throw shooter who gets tired doesn't fit.
  • The distribution is memoryless. After 10 misses, the chance of success on the next try is still p. You're never "due" a success.
  • Check which convention your class or software uses. Mean 1 ÷ p counts the successful trial; mean (1 − p) ÷ p doesn't.

Sources

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • First 6 on the 3rd roll of a die: 25/216 = 0.115741 ✓
  • At least one 6 within 3 rolls: 91/216 = 0.421296 ✓
  • Average rolls to get a 6: 6 ✓
  • Failures convention, p = 20%: P(0 failures) = 0.200000 ✓
  • Edge: p = 0 is rejected ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking cookies, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

What is the geometric distribution?

It gives the chance that the first success comes on a particular try, when every try has the same chance p of success.

What is the probability of the first success on the kth trial?

(1 − p)^(k − 1) × p. For a die and a 6 on the 3rd roll: (5/6)² × 1/6 = 25/216 ≈ 0.1157.

What is the expected value of a geometric distribution?

1 ÷ p trials, counting the success. With p = 1/6 it's 6 rolls. Counting only the failures, it's (1 − p) ÷ p = 5.

How do I find the chance of success within k tries?

1 − (1 − p)^k. The chance of at least one 6 in 3 rolls is 1 − (5/6)³ ≈ 0.4213.

Is the geometric distribution memoryless?

Yes. The number of tries still to go doesn't depend on how many you've already failed.

Related calculators