Gamma Distribution Calculator

This gamma distribution calculator works with the shape k and scale θ (or rate β). Get probabilities for any x or interval, the density, percentiles, mean, variance and shape measures, with the curve plotted.

Checks on your data

  • Check the parameterisation: you entered a scale θ. Textbooks and software disagree (SciPy, R’s default and Excel use scale or rate differently), and mixing them up gives wrong answers. Rate = 1 ÷ scale.

Results

P(X ≤ 5)
0.45618688
45.6187 %
P(X > 5)
0.54381312
Density f(5)
0.12825781
Mean kθ
6
Variance kθ²
12
Standard deviation
3.4641
Mode
4
Median
5.34812
Skewness 2/√k
1.1547
Excess kurtosis 6/k
2
5th and 95th percentiles
1.6354 and 12.592
Equivalent rate β = 1/θ
0.5
Gamma density (k = 3, θ = 2): shaded = your probability
05101520x = 5
Cumulative distribution function
0%50%100%051015200.4562x
Percentiles of this gamma distribution
Percentilex value
1%0.87209
5%1.63538
10%2.20413
25%3.4546
50%5.34812
75%7.8408
90%10.6446
95%12.5916
99%16.8119
Show step-by-step solution
  1. Shape k = 3, scale θ = 2 (rate β = 0.5).
  2. Density: f(x) = x^(k−1) e^(−x/θ) ÷ (Γ(k) θ^k); at x = 5 this is 0.12825781.
  3. Cumulative probability P(X ≤ x) = P(k, x/θ) = 0.45618688, where P is the regularised lower incomplete gamma function.
  4. Mean = kθ = 6; variance = kθ² = 12.
ParametersShape k, scale θ (or rate β)
Mean / variancekθ / kθ²
Special casesExponential (k = 1), chi-square
ModelsWaiting times, rainfall, claims

What Is Gamma Distribution?

The gamma distribution is a flexible model for positive, right-skewed quantities such as waiting times and rainfall amounts. It has a shape parameter k and a scale parameter θ, and the equivalent rate β = 1/θ is shown too, since textbooks and software use both conventions.

The calculator returns the cumulative probability, the probability between two values, the density, the median, the mode, the 5th and 95th percentiles, the mean kθ, the variance kθ² and the skewness and excess kurtosis. The curve shades the probability you asked for.

Below you will find the formulas, a variables table, a worked example and answers to common questions such as scale versus rate and the link with the exponential and chi-square distributions.

How to Use the Gamma Distribution Calculator

  1. Enter the shape k.
  2. Choose whether you are supplying the scale θ or the rate β, and enter it. Check which your textbook or software uses.
  3. Enter x, and optionally an upper bound for an interval probability.
  4. Read the probabilities and the percentile table.

Gamma Distribution Formula

Density

f(x)=xk−1e−x/θΓ(k) θk,x>0f(x)=\frac{x^{k-1}e^{-x/\theta}}{\Gamma(k)\,\theta^{k}},\quad x>0

Cumulative distribution

F(x)=γ(k,x/θ)Γ(k)=P(k,x/θ)F(x)=\frac{\gamma(k,x/\theta)}{\Gamma(k)}=P(k,x/\theta)

Moments

μ=kθ,σ2=kθ2,skew=2k,mode=(k−1)θ (k≥1)\mu=k\theta,\quad\sigma^2=k\theta^2,\quad \text{skew}=\frac{2}{\sqrt k},\quad \text{mode}=(k-1)\theta\ (k\ge1)

Gamma Distribution Variables Explained

SymbolMeaningNotes
kShape parameterk > 0
θScale parameterθ > 0
βRate parameter1 ÷ θ
μMeankθ
σ²Variancekθ²

Gamma Distribution Worked Example

With the example values loaded in the calculator above, the steps are:

  1. Shape k = 3, scale θ = 2 (rate β = 0.5).
  2. Density: f(x) = x^(k−1) e^(−x/θ) ÷ (Γ(k) θ^k); at x = 5 this is 0.12825781.
  3. Cumulative probability P(X ≤ x) = P(k, x/θ) = 0.45618688, where P is the regularised lower incomplete gamma function.
  4. Mean = kθ = 6; variance = kθ² = 12.

Result: P(X ≤ 5) = 0.45618688; P(X > 5) = 0.54381312.

How to Read a Gamma Distribution

The gamma distribution models positive, right-skewed quantities such as waiting times for several events. The shape k controls how skewed it is, and the scale θ stretches it. The mean is kθ and the variance is kθ².

With shape 1 the gamma is the exponential distribution. For large shapes it looks more and more like a bell curve. The percentile table shows where 50%, 90% and other shares of the distribution fall.

Shape, scale and rate: avoiding parameter mix-ups

The gamma has two common parameterisations. In the shape-scale form (used by many textbooks and by R’s scale argument) the mean is kθ. In the shape-rate form (used by R’s default, by Excel’s GAMMA.DIST with beta = scale, and in Bayesian work) the mean is k/β. Entering the wrong one changes every result, so check what your source calls its second parameter.

Naming across sources
SourceParametersMean
Most textbooksshape k, scale θkθ
Bayesian statisticsshape α, rate βα/β
R dgammashape, rate (or scale=)shape/rate
Excel GAMMA.DISTalpha, beta (scale)alpha × beta
SciPy gammaa, scalea × scale

Relationships with other distributions

If waiting times between events are exponential, the time to the k-th event is gamma with shape k. This links the gamma to the Poisson process and, through the chi-square, to statistical tests.

Gamma special cases
DistributionGamma form
Exponential with mean θk = 1
Chi-square with ν dfk = ν/2, θ = 2
Erlang with k stagesInteger k
Normal for large kApproximately normal as k grows

Typical applications

  • Reliability and queueing: time until the k-th failure or arrival.
  • Insurance: sizes of claims.
  • Hydrology: rainfall totals.
  • Bayesian statistics: conjugate prior for a Poisson rate.
  • Medicine: lengths of stay and survival times.

Where Gamma Distribution Is Used

Waiting times

Model the time until k events occur.

Skewed positive data

Fit sizes, rainfall or claim amounts.

Percentiles

Find the value below which a chosen share falls.

Relating distributions

See the link to the exponential and chi-square.

Common Gamma Distribution Mistakes to Avoid

  • Check whether your source uses scale θ or rate β = 1 ÷ θ. The calculator asks which you have.
  • Shape below 1 gives a density that is infinite at 0.
  • The mean is kθ and the mode is (k − 1)θ for k above 1.
  • Mixing up scale and rate is the commonest error.

Gamma Distribution Terms and Definitions

Shape
The parameter controlling skew and form of the curve.
Rate
The reciprocal of the scale; the events-per-unit-time view.
Incomplete gamma function
The special function whose normalised form gives the gamma CDF.

Gamma Distribution FAQs

What is the gamma distribution used for?

Modelling positive, right-skewed quantities such as waiting times until the k-th event, claim sizes and rainfall.

What is the difference between the scale and rate parameters?

They are reciprocals: rate β = 1/θ. The mean is kθ with scale and k/β with rate.

How is the gamma related to the exponential?

An exponential distribution is a gamma with shape k = 1. A gamma with integer shape k is the sum of k independent exponentials.

How is the gamma related to chi-square?

A chi-square distribution with ν degrees of freedom is a gamma with shape ν/2 and scale 2.

How do I find a percentile of a gamma distribution?

Use the inverse CDF. The percentile table above lists common ones for your parameters.

Can the shape be less than 1?

Yes. The density then goes to infinity at 0 and decreases steadily.

Related calculators

Last updated 2026-11-09. See our disclaimer.