InfyCalculator
📊

Gamma Distribution Calculator

Gamma distribution with shape k and scale θ or rate β — cumulative probability P(X ≤ x), upper tail, density, mean, variance, mode and median.

Shape k (α)
Second parameter
Scale θ or rate β
Value x
Loading calculator…

How it works

f(x) = x^(k−1)·e^(−x/θ) ÷ [Γ(k)·θ^k]; P(X ≤ x) = γ(k, x/θ) ÷ Γ(k) (regularised lower incomplete gamma); mean = kθ; variance = kθ²; mode = (k − 1)θ for k ≥ 1; rate β = 1/θ

The gamma distribution models waiting times until the k-th event of a Poisson process, rainfall amounts, insurance claim sizes and many other positive, right-skewed quantities. It includes the exponential (k = 1), Erlang (whole-number k) and chi-square (θ = 2, k = ν/2) distributions as special cases. Probabilities come from the regularised incomplete gamma function, as in R’s pgamma and SciPy’s gamma.cdf.

Worked example

For shape k = 2 and scale θ = 2 (mean 4), P(X ≤ 3) = 0.4422, P(X > 3) = 0.5578 and the density at 3 is 0.1673; the median is 3.3567.

Sources: NIST/SEMATECH e-Handbook — Gamma distribution · SciPy — scipy.stats.gamma

Frequently asked questions

Scale or rate?

They are reciprocals: rate β = 1/θ. R and many textbooks use the rate (dgamma(x, shape, rate)), SciPy and Excel use the scale. Choose the matching option.

How is the gamma related to the exponential and chi-square?

Shape 1 is the exponential distribution with mean θ; shape ν/2 with scale 2 is the chi-square with ν degrees of freedom.

What does the shape parameter do?

Small k gives a sharply skewed curve piling up near zero; as k grows the distribution becomes more symmetric and approaches a normal with mean kθ.

Can I get the Erlang distribution?

Yes — an Erlang distribution is a gamma with a whole-number shape k, the time until the k-th arrival at rate β.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.