Gamma distribution probabilities, moments, and quantiles
This gamma distribution calculator evaluates a continuous model for nonnegative data. It is useful for waiting times, accumulated durations, rainfall totals, insurance claim amounts, and other measurements that cannot fall below zero and may have a long right tail. Enter shape k, scale θ, and value x to obtain the density at that point, cumulative probability through that point, survival probability above it, and the distribution’s mean and variance. Providing probability p also asks the calculator to find the associated gamma quantile numerically.
These gamma outputs answer different probability questions. The PDF describes the curve’s local height near a value, whereas the CDF gives the modeled share of outcomes at or below a threshold. Survival probability is the complementary share above that threshold, which is often the quantity needed in reliability and queueing work. The optional quantile reverses the question by finding the cutoff required for a chosen cumulative probability.
What the gamma distribution models in plain language
A gamma distribution can represent the total waiting time for several stages to finish. If events arrive at a steady average rate, waiting for one event has an exponential distribution; waiting through later stages produces a gamma-shaped total. This interpretation makes gamma models common in queueing theory, renewal processes, reliability engineering, hydrology, and operations analysis. The model accommodates several curve shapes while excluding impossible negative values.
The shape parameter k controls the overall form of the gamma curve. When k = 1, the gamma distribution is exponential and declines steeply from the origin. When k is greater than 1, density rises from zero, reaches a peak, and then falls. As k grows, the curve generally becomes less skewed and more concentrated around its center. Scale θ stretches or compresses the horizontal axis, so increasing it increases both the mean and the spread.
Gamma-distribution units must remain consistent. Shape k is dimensionless, while scale θ has the same units as x. If x is in hours, θ must be in hours; if x is rainfall in millimeters, θ must be in millimeters. Mixing hours with minutes or liters with milliliters can leave the arithmetic valid while making the modeled situation wrong.
How to choose gamma distribution inputs
Shape k. Enter a positive number. Larger shape values can represent a process with more stages or less extreme right-skew. Small positive values, particularly those below 1, can give a density sharply concentrated near zero with a long tail. In applied analysis, k is commonly estimated from data or supplied by a fitted model.
Scale θ. Enter a positive number using the same units as x. Increasing θ spreads the gamma distribution horizontally. Because the mean is kθ, doubling θ doubles the mean when k remains fixed. Sources that use rate β rather than scale use β = 1/θ, so convert a rate before entering it here.
Value x. Enter a nonnegative number at which to evaluate the gamma PDF and CDF. It might be 3 hours in a waiting-time model, 18 millimeters in a rainfall model, or 500 operating cycles in a reliability model. The calculator does not assign a unit, but x and θ must use the same measurement scale.
Probability p. This is optional. Leaving it blank returns density, cumulative probability, survival probability, mean, and variance at the selected x. Entering a value from 0 to 1 additionally finds the quantile x satisfying F(x) = p, which can be useful for percentile thresholds, service-level targets, and deadlines.
For uncertain gamma parameters, compare several defensible input sets instead of relying on one nominal estimate. Changes in scale can have a substantial effect on tail probabilities, so checking how the CDF, survival probability, and target quantile move is often more informative than treating one displayed value as exact.
How gamma distribution formulas work
The gamma probability density function for shape k and scale θ is:
The gamma PDF is a density rather than a probability of landing on one exact real-valued point. A high PDF indicates that the curve is tall near x; the probability assigned to a narrow interval depends on both that height and the interval width.
The gamma CDF accumulates density from zero through x. Using the lower incomplete gamma function, it is:
The gamma CDF is usually the most direct output to interpret. For example, CDF = 0.78 means that about 78% of modeled outcomes are at or below the selected x. Survival is 1 - CDF, the modeled share above x; in service or reliability terms, it answers how many cases take longer than the threshold.
The gamma mean and variance are:
These summaries provide a scale check for a gamma model. If the mean or variance is implausible for the process, revisit shape, scale, and units before drawing conclusions from the tails. The quantile calculation runs in the opposite direction from the CDF: it numerically searches for the x that reaches the requested cumulative probability p.
For this gamma calculator, every reported probability depends on the relationship between x, shape k, and scale θ. Verify that the distributional interpretation fits the data and that scale has not been confused with the reciprocal rate parameter before relying on a tail probability or percentile.
Worked example: exponential special case of the gamma distribution
Suppose you enter k = 1, θ = 2, and x = 3. With k = 1, the gamma model is exponential with scale 2. The calculator reports a PDF of about 0.111565, a CDF of about 0.776870, survival probability of about 0.223130, mean 2, and variance 4. Thus, roughly 77.7% of modeled outcomes fall at or below 3 units, while about 22.3% remain above 3 units.
Adding p = 0.9 requests the gamma quantile below which 90% of outcomes lie. In this example, the 90th percentile is approximately 4.605170. If the model represented waiting time, a deadline near 4.61 units would cover about 90% of cases under the assumed distribution.
This result also passes a gamma-model reasonableness check: the mean is 2, so x = 3 is above average and should have a CDF above 0.5. The 90th percentile should lie to the right of the mean, as the computed value does. Such checks can reveal incorrect units or a rate-versus-scale mix-up.
How gamma shape changes the result
Holding θ and x fixed while changing gamma shape k builds intuition about the curve. The table uses θ = 2 and x = 6. As shape increases, the mean rises and the cumulative probability at the same cutoff can fall because the distribution shifts right.
| Scenario |
Shape k |
Scale θ |
Value x |
Mean kθ |
Approx. CDF at x |
Interpretation |
| Single-stage wait |
1 |
2 |
6 |
2 |
0.950 |
With a small shape, 6 is far into the right tail, so most outcomes are already below it. |
| Two-stage process |
2 |
2 |
6 |
4 |
0.801 |
The same cutoff still covers most cases, but less dramatically because the center of the distribution moved right. |
| Three-stage process |
3 |
2 |
6 |
6 |
0.577 |
Now the cutoff sits close to the mean, so the cumulative probability is only a bit above one half. |
Changing gamma shape does more than alter the curve’s height: it changes where probability mass gathers along the axis. The optional mini-game below uses that same relationship, asking you to place a horizontal cutoff that matches a target gamma CDF.
How to interpret gamma calculator outputs
PDF is the gamma density curve’s height at x, useful for comparing nearby values rather than assigning probability to an exact point. CDF is the fraction at or below x. Survival is the fraction above it. Mean and variance summarize center and spread. When requested, Quantile is the value of x that reaches cumulative target p.
When reviewing gamma results, check that x and θ have matching units, that the scale is sensible relative to mean kθ, and that the CDF moves in the expected direction when one parameter changes. Unexpected output more often reflects an input or modeling mismatch than a problem with the gamma formula.
Gamma distribution assumptions, edge cases, and numerical notes
This gamma calculator requires k > 0, θ > 0, and x ≥ 0. Optional probability must be between 0 and 1 inclusive. At p = 0, the quantile is 0. At p = 1, the theoretical gamma quantile is infinite, so the page displays infinity rather than a fictitious finite cutoff. Intermediate quantiles are found with a numerical search.
The page evaluates the gamma function with an approximation and computes the regularized lower incomplete gamma function for the CDF. A general gamma CDF has no simple elementary antiderivative, which is why the inverse quantile is obtained numerically rather than from a simple closed-form expression.
For 0 < k < 1, gamma densities can become very large near zero. That is not automatically an error: the curve is sharply concentrated near the origin while its total integrated probability remains 1. In this range, small changes in x can produce noticeable CDF changes.
The gamma distribution remains a model rather than proof that a data-generating process follows gamma behavior. Use it where the support, shape, and process interpretation fit, and compare it with empirical data or subject-matter knowledge when decisions have significant consequences. For engineering, finance, medicine, compliance, or safety work, treat results as decision support rather than a substitute for professional validation.