GAMMA.DIST returns the gamma distribution for a given value, shape parameter alpha, and scale parameter beta. It can give either the cumulative probability (when cumulative is TRUE) or the probability density (when cumulative is FALSE).
=GAMMA.DIST(x, alpha, beta, cumulative)What does GAMMA.DIST do?
GAMMA.DIST is a statistical function in Excel that calculates the gamma distribution, a continuous probability distribution often used to model waiting times, rainfall amounts, or the time until a certain number of events occur. It takes four arguments: the value x at which to evaluate the distribution, the shape parameter alpha, the scale parameter beta, and a logical value cumulative that decides whether you get the cumulative probability or the probability density.
For office workers and students, GAMMA.DIST is useful whenever you need to answer questions like 'What is the probability that a customer service call lasts less than 10 minutes?' or 'What is the chance that a machine breaks down after 500 hours?' Instead of relying on statistical tables or complex formulas, you can get the answer directly in Excel.
A common real situation is queue management: you have historical data on service times and want to estimate the probability that a customer waits more than a certain threshold. With GAMMA.DIST you can quickly compute that probability and make informed staffing decisions.
When to use GAMMA.DIST
- Modelling the time until a machine fails when failures follow a gamma process.
- Estimating the probability that a customer service call lasts less than a target duration.
- Calculating the likelihood of a certain amount of rainfall in a given period.
- Assessing the probability that an insurance claim exceeds a deductible.
- Simulating waiting times in a queue when service times are gamma-distributed.
GAMMA.DIST syntax
=GAMMA.DIST(x, alpha, beta, cumulative)| Argument | Required? | What to enter |
|---|---|---|
x | Required | The value at which to evaluate the distribution. Must be a non-negative number. Example: 10. |
alpha | Required | The shape parameter of the distribution. Must be a positive number. Example: 2. |
beta | Required | The scale parameter of the distribution. Must be a positive number. Example: 3. |
cumulative | Required | A logical value: TRUE returns the cumulative distribution function; FALSE returns the probability density function. Example: TRUE. |
What it returns: GAMMA.DIST returns a numeric value: the cumulative probability (if cumulative is TRUE) or the probability density (if cumulative is FALSE) for the gamma distribution with the specified parameters.
GAMMA.DIST examples
1 Basic cumulative probability
This example shows the simplest use: calculating the cumulative probability that a gamma-distributed variable is less than or equal to 10, with alpha=2 and beta=3. The formula =GAMMA.DIST(B2, C2, D2, TRUE) uses the values in the table. It returns approximately 0.8454126955, meaning there is about a 49.6% chance that the variable is at most 10.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | x | alpha | beta | cumulative | |||
| 2 | 10 | 2 | 3 | TRUE | 0.8454126955 | ||
| 3 |
2 Probability density
Here we calculate the probability density at x=10 for alpha=2 and beta=3, using cumulative=FALSE. The formula =GAMMA.DIST(A2, B2, C2, FALSE) returns approximately 0.03963777039. This value represents the height of the density curve at x=10 and is useful for plotting or understanding the shape of the distribution.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | x | alpha | beta | cumulative | |||
| 2 | 10 | 2 | 3 | FALSE | 0.03963777039 | ||
| 3 |
3 Probability of exceeding a threshold
To find the probability that a gamma-distributed variable exceeds 15 (with alpha=2, beta=3), we use the complement of the cumulative probability. The formula =1-GAMMA.DIST(A2, B2, C2, TRUE) returns about 0.04042768199, meaning there is roughly a 17.4% chance the value is greater than 15. This is handy for risk assessment.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | x | alpha | beta | cumulative | |||
| 2 | 15 | 2 | 3 | TRUE | 0.04042768199 | ||
| 3 |
4 Service time probability
A call centre models service times with a gamma distribution (alpha=3, beta=4 minutes). They want the probability that a call lasts less than 12 minutes. The formula =GAMMA.DIST(A2, B2, C2, TRUE) returns approximately 0.5768099189, so about 42.4% of calls are shorter than 12 minutes. This helps in staffing decisions.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | x | alpha | beta | cumulative | |||
| 2 | 12 | 3 | 4 | TRUE | 0.5768099189 | ||
| 3 |
5 Machine failure probability
A machine's time to failure (in hours) follows a gamma distribution with alpha=5 and beta=100. The probability that it fails within 400 hours is found with =GAMMA.DIST(A2, B2, C2, TRUE), which returns about 0.371. This means there is a 37.1% chance of failure before 400 hours, useful for maintenance planning.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | x | alpha | beta | cumulative | |||
| 2 | 400 | 5 | 100 | TRUE | 0.3711630648 | ||
| 3 |
Common GAMMA.DIST errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #NUM! | x, alpha, or beta is negative or zero, or the combination of arguments is invalid. | Ensure x is non-negative and alpha and beta are positive numbers. |
| #VALUE! | One or more arguments are non-numeric (e.g., text) and cannot be converted to a number. | Check that all arguments are numbers or references to numeric cells. Remove any text or special characters. |
| #NAME? | The function name is misspelled, or the Analysis ToolPak is not enabled (only relevant in Excel 2003 or earlier). | Verify the spelling: GAMMA.DIST. In Excel 2010 and later, no add-in is needed. |
Tips for using GAMMA.DIST
- Use cumulative=TRUE when you need the probability that the variable is less than or equal to x.
- Use cumulative=FALSE to get the probability density, which is useful for charting the distribution curve.
- Remember that GAMMA.DIST replaces the older GAMMADIST function; use GAMMA.DIST for new work.
- If you need the inverse (given a probability, find x), use GAMMA.INV.
- Double-check that alpha and beta are positive; negative values cause #NUM! errors.
Frequently asked questions
What is the difference between GAMMA.DIST and GAMMADIST?
GAMMA.DIST is the modern version introduced in Excel 2010. GAMMADIST is the legacy function kept for compatibility. They work the same way, but GAMMA.DIST is recommended for new formulas.
Can I use GAMMA.DIST for values that are not integers?
Yes, GAMMA.DIST works with any non-negative real number for x. The gamma distribution is continuous, so x can be a decimal.
Why do I get a #NUM! error?
A #NUM! error occurs if x is negative, or if alpha or beta is zero or negative. Make sure all numeric inputs are valid: x ≥ 0, alpha > 0, beta > 0.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. GAMMA.DIST reference