Geometric PMF Calculator
The probability that the first success arrives on trial k, for a geometric distribution with success probability p.
What this page computes
Evaluates P(X = k) = (1 − p)^(k − 1)·p: the chance that the first success in a run of independent trials happens on exactly trial k.
How to use it
Type the Success probability p, Trial number k and press Run. p is the success probability on every trial, 0 < p < 1, and k ≥ 1 counts trials from the first. The support starts at 1: there is no trial 0. With p = 0.2, first success on trial 3, the page prints P(X = 3) = 0.128.
Running it
Closed form (1 − p)^(k − 1)·p, with log1p used so a small success probability keeps its digits. Every figure is computed in this browser tab: nothing is uploaded and nothing is stored.
Evaluates P(X = k) = (1 − p)^(k − 1)·p: the chance that the first success in a run of independent trials happens on exactly trial k. With p = 0.2, first success on trial 3, the page prints P(X = 3) = 0.128.
Closed form (1 − p)^(k − 1)·p, with log1p used so a small success probability keeps its digits. The printed result is accurate to closed form, evaluated in double precision; no table is read and nothing is simulated.
How to use this geometric distribution calculator
Type each value below and press Run. The page prints the point probability and the parameter line it used, so the answer can be checked against the formula rather than taken on trust.
The inputs this page reads are Success probability p (strictly between 0 and 1); Trial number k (whole number, at least 1).
The parameterisation
p is the success probability on every trial, 0 < p < 1, and k ≥ 1 counts trials from the first. The support starts at 1: there is no trial 0.
The numeric method
Closed form (1 − p)^(k − 1)·p, with log1p used so a small success probability keeps its digits.
The printed value is accurate to closed form, evaluated in double precision. The page returns the point probability only; it does not also print a test statistic, a p-value or a decision.
What to Expect
Best for
- the chance a first success lands on one named trial
- modelling a run of failures before a success
Not ideal for
- a cumulative probability, which is the geometric CDF page
- a count of successes in a fixed number of trials, which is binomial
What this tool keeps
- Double-precision arithmetic in your own browser
- The same inputs always produce the same output
Common errors
- p must be strictly between 0 and 1, and k must be a whole number of at least 1. A p of 0 or 1 is a certain failure or a certain success, not a geometric experiment.
Example use cases
- quality testing until the first defect
- queue and retry modelling
Sample input
p = 0.2, first success on trial 3.
Sample output
P(X = 3) = 0.128.
Who this is for
- students
- reliability analysts
Frequently asked questions
Which parameterisation does this page use?
p is the success probability on every trial, 0 < p < 1, and k ≥ 1 counts trials from the first. The support starts at 1: there is no trial 0.
How is the result computed?
Closed form (1 − p)^(k − 1)·p, with log1p used so a small success probability keeps its digits. The result is accurate to closed form, evaluated in double precision.
What inputs are refused?
p must be strictly between 0 and 1, and k must be a whole number of at least 1. A p of 0 or 1 is a certain failure or a certain success, not a geometric experiment.
Is anything uploaded?
No. Every number is computed by JavaScript in this page from the values you typed; nothing is posted, stored or logged.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.