Waiting time for the k-th event, and the event count it is equivalent to.
Waiting time, and its event count
Buses arrive at random, 5 minutes apart on average. This is the wait for the third one — and it equals a Poisson question exactly.
Gamma(k = 3.000000, θ = 5.000000)
P(X ≤ 15.000000) = 0.57680992
The same number from the Poisson side: P(at least 3 events in 3.00000 mean-intervals) = 0.57680992. The difference is 0.00 — the two are the same question.
Mean
15.000000
kθ
Variance
75.000000
kθ²
Mode
10.000000
(k−1)θ
Skewness
1.154701
2/√k — falls as k grows
Gamma CDF
0.576809919
waiting-time side
Poisson tail
0.576809919
event-count side
Difference
0.00
machine precision
Mean events by x
3.000000
the Poisson parameter
At k = 1 the curve is the exponential, falling from its highest point at zero. As k rises the peak moves right and the shape becomes symmetric — a skewness of 1.1547here, heading for zero as 2/√k.
“How long until the third event?” and “how many events by time 15.0000?” are the same question. The waiting time is at most x exactly when at least 3 eventshave occurred by x, so the gamma CDF and the Poisson upper tail must agree — and they do, to 0.00. The tool computes them by two entirely different series, so the agreement is a check rather than a restatement.
Shape and scale, or shape and rate? This tool uses scale θ, where the mean is kθ. Many texts and most statistical software use the rate β = 1/θ, where the mean is k/β. The two parameterisations give different answers from the same numbers, and it is the commonest reason a gamma result fails to reproduce. Your rate here is 0.200000.
Adding gammas with the same scale adds their shapes. Gamma(2, θ) plus Gamma(3, θ) is Gamma(5, θ), which is why a sum of k independent exponentials is a gamma with shape k and why the chi-square distribution is a gamma with shape ν/2 and scale 2. Most of the distributions in a statistics course are this one with the parameters renamed.
What this tool shows
For an integer shape, the gamma CDF equals a Poisson tail exactly. “How long until the third bus?” and “how many buses by 15 minutes?” are the same question, and the tool computes both by entirely different series so the agreement is a check rather than a restatement — verified to 5.6 × 10⁻¹⁷ across 126 combinations.
PDF, CDF, mean, variance, mode and skewness for any shape and scale
The Erlang identity: the same probability computed from the Poisson side
The shape-and-scale versus shape-and-rate trap, with your rate printed
What happens below shape 1, where the density diverges at zero
How the shape parameter drives the skewness toward zero as 2/√k
The relationships to the exponential and chi-square distributions
Waiting times Poisson identity Any shape Rate shown
Shape and scale, not shape and rate. Check which your source uses.
Updated 12 September 2026 · Works in any browser, no installation
A gamma distribution is the waiting time until the k-th event when events arrive at random at a constant average rate. It is a sum of k independent exponential waits, which is why its shape parameter adds: Gamma(2, θ) plus Gamma(3, θ) is Gamma(5, θ). Non-integer shapes are allowed and simply interpolate between those.
At a glance
Formula shown
The density is f(x) = x^(k−1) e^(−x/θ) / (Γ(k) θ^k) for x > 0, with mean kθ, variance kθ², mode (k−1)θ for k ≥ 1 and skewness 2/√k. The CDF is the regularised lower incomplete gamma function P(k, x/θ). For integer k it satisfies the Erlang identity P(Gamma(k, θ) ≤ x) = P(Poisson(x/θ) ≥ k) = 1 − P(Poisson ≤ k−1), exactly. Shape 1 gives the exponential; shape ν/2 with scale 2 gives the chi-square on ν degrees of freedom.
Scenario support
Time until the k-th arrival, failure and repair times, insurance claim sizes, rainfall totals, queueing service times, Bayesian priors for a rate parameter, and anything built by summing exponential waits.
Educational estimate
Planning support from the values you enter — not professional advice.
Waiting time and event count are one question
The identity is simple to state and it is the reason the gamma distribution turns up wherever the Poisson does.
The wait for the k-th event is at most x exactly when at least k events have occurred by x. Those are the same event, described from two sides. So the gamma CDF must equal the upper tail of a Poisson with parameter x/θ.
The tool computes both and prints the difference. One is a regularised incomplete gamma function; the other is a finite sum of Poisson terms. Entirely different code paths, and the difference comes out at machine precision — 5.6 × 10⁻¹⁷ across 126 combinations in the verification suite.
It only holds for whole-number shapes. There is no such thing as waiting for the 2.5th event, so a non-integer k has no Poisson counterpart and the tool says so rather than printing a number that means nothing.
The integer case has its own name. A gamma with integer shape is an Erlang distribution, which is the form used in queueing theory and telephone traffic engineering for exactly this reason.
And it gives you a free cross-check. Any gamma probability with an integer shape can be verified against a Poisson calculation by hand, which is a useful habit when a result looks surprising.
Shape and scale, or shape and rate
The single most common reason a gamma result fails to reproduce between two tools has nothing to do with the arithmetic.
This tool uses scale θ, where the mean is kθ. A shape of 3 and a scale of 5 gives a mean of 15.
Much statistical software uses rate β = 1/θ, where the mean is k/β. The same two numbers entered there give a mean of 0.6 — the same distribution under a different convention, and a very different answer if you mix them.
The tool prints your rate alongside so the translation is available without arithmetic, and so the convention being used is never in doubt.
The giveaway is the direction the distribution moves. Raise the second parameter: if the mean goes up you are in scale, if it goes down you are in rate. That check takes a second and settles it.
What the shape parameter actually changes
Scale only stretches the horizontal axis. Everything interesting is in k.
At k = 1 the gamma IS the exponential. The density is highest at zero and falls monotonically — the memoryless waiting time for a single event.
Below k = 1 the density diverges at zero. It is still a proper distribution — the area is 1 — but the mode is at the boundary and there is no interior peak. This is the shape fitted to rainfall totals, where most periods contribute almost nothing.
Above k = 1 a peak appears at (k − 1)θ, always to the left of the mean kθ. The gap between mode and mean is exactly one scale, at every k, which is a compact way to see that the distribution is always right-skewed.
And the skewness is 2/√k exactly. At k = 1 it is 2; at k = 30 it is 0.365; it approaches zero from above and never reaches it. That is the central limit theorem visible in one parameter, since a large-k gamma is a sum of many exponentials.
Most of the distributions in a course are this one renamed
The gamma family absorbs several distributions that are usually taught as separate objects.
Shape 1 is the exponential. Shape k with integer k is the Erlang. Shape ν/2 with scale 2 is the chi-square on ν degrees of freedom, which is why a chi-square is really a sum of squared normals dressed as a waiting time.
Shapes add when the scale matches. Gamma(a, θ) plus Gamma(b, θ) is Gamma(a+b, θ). That is what makes the chi-square degrees of freedom add when you pool sums of squares, and it is the same fact.
The ratio of two gammas gives a beta or an F. Which is where the F-distribution of an ANOVA comes from — a ratio of two independent chi-squares, each a gamma.
And it is the conjugate prior for a Poisson rate. Start with a gamma prior, observe Poisson counts, and the posterior is another gamma with the shape increased by the count and the rate by the exposure. That closure is why it appears throughout Bayesian work on rates.
Fitting one to data
Two routes, and the quick one is good enough more often than people expect.
Method of moments is one line. The mean is kθ and the variance kθ², so θ = variance/mean and k = mean²/variance. No iteration, and it is a reasonable starting point for anything.
Maximum likelihood is better and needs solving. The shape estimate satisfies an equation in the digamma function with no closed form, so it is found numerically. It matters most at small samples and at shapes below 1.
The fit is sensitive to zeros and near-zeros. The log-likelihood contains log(x), so an observation at exactly zero makes it undefined, and a cluster near zero pulls the shape below 1. Rainfall data is the standard example, and it is usually handled by modelling the dry periods separately.
And check the fit on the tail, not the peak. A histogram will look fine while the upper tail is badly wrong, which is where a gamma is usually being used to make a decision.
Reporting a gamma result
Four things, and the first prevents most reproduction failures.
State the parameterisation. “Gamma(3, 5)” is ambiguous. “Gamma with shape 3 and scale 5 (rate 0.2)” is not, and costs six words.
Give the mean and mode together where the shape is small. They differ by exactly one scale, and on a right-skewed distribution the difference is the point rather than a detail.
Quote quantiles rather than multiples of the standard deviation. A gamma is not symmetric, so “mean plus two sigma” is not a 97.5% point and the error is largest at small shapes.
And cross-check integer shapes against the Poisson. It is free, it uses a completely different computation, and it catches parameterisation errors immediately.
Sources and methodology
References for the gamma and Erlang distributions.
Method. The CDF uses the regularised lower incomplete gamma function and the Poisson tail is summed independently, so the Erlang identity between them is a genuine cross-check rather than a restatement — the suite confirms they agree to better than 1e-12 across 126 combinations of shape, evaluation point and scale, and that a non-integer shape correctly returns no Poisson counterpart. Shape 1 is verified to reproduce the exponential CDF and density exactly. The density is checked to integrate to its own CDF range by Simpson’s rule and the CDF to be monotone across 400 points. That engine is verified on every change against 75 assertions. The count and the per-case breakdown are published on the formula verification page.
Related calculators
Where this goes next:
Exponential DistributionTime-until-event probabilities from a rate or a mean, always showing both — with a panel proving elapsed time changes nothing, which is a constant hazard rate and false for anything that wears out.
Poisson DistributionPoisson probabilities with a dispersion test against your own variance — because a Poisson forces variance to equal the mean, and real count data usually does not, which is exactly where the tail goes wrong.
Chi-SquareGoodness of fit and tests of independence with every expected count and per-cell contribution shown — because the validity condition is about expected counts, not observed ones, and most calculators hide them.
Weibull DistributionReliability probabilities with the hazard curve drawn beside the density — because the shape parameter is the hazard story: below 1 the risk falls, at 1 it is exactly an exponential, above 1 it rises.
Beta DistributionTakes raw successes and failures and runs the conjugate update, so 5 out of 5 returns 6/7 rather than the 100% a plain proportion claims — with a credible interval that stays honest at zero.
F-DistributionUpper and lower critical values at any degrees of freedom — including the lower tail printed tables omitted, because F(a,b;p) = 1/F(b,a;1−p) — plus F(1,v) against t(v)² computed both ways, which agree exactly.
An educational tool. A gamma model assumes events arrive at a constant average rate independently of one another — where arrivals cluster or the rate varies over time, the fitted waiting-time distribution will understate the long waits that matter most.
Published the gamma distribution with the Erlang identity computed alongside rather than mentioned: for an integer shape the gamma CDF equals a Poisson tail EXACTLY, verified to 5.6e-17 across 126 combinations of shape, evaluation point and scale.
The two sides are computed by entirely different routines - a regularised incomplete gamma function and a finite Poisson sum - so the agreement is a genuine cross-check rather than a restatement.
A non-integer shape correctly returns no Poisson counterpart, because there is no such thing as waiting for the 2.5th event.
The shape-versus-rate parameterisation trap is handled by printing the user's rate alongside their scale; it is the commonest reason a gamma result fails to reproduce between two tools.
Shape 1 is verified to reproduce the exponential CDF and density exactly, and the skewness is reported as 2/sqrt(k) - the central limit theorem visible in a single parameter.
Add this calculator to your site
Responsive embed — and private: nothing your visitors type leaves their browser.