GAMMA Function

Returns the gamma function value — a factorial that works for any number.

Category

Statistical

Available in

Excel 2013+, Microsoft 365

Returns

A number

Want to practice GAMMA in a real spreadsheet? Open a blank sheet in our Practice Sandbox and try it with live data, with the AI Excel tutor beside you. No Excel needed — just a free account.Try it free in the Sandbox

Overview

For whole numbers, GAMMA(n) = (n − 1)!, so GAMMA(5) = 4! = 24. It also works between whole numbers (GAMMA(0.5) = √π) and for negative non-whole numbers.

It appears inside the formulas for many distributions — gamma, beta, t, chi-square and F.

Syntax

=GAMMA(number) Explain

Arguments

ArgumentRequired?What it does
numberYesAny number except 0 and negative whole numbers.

Examples

Example 1 — Factorials and beyond

Whole numbers give factorials; other values fill in between.

B2fx=GAMMA(5)
AB
1FormulaResult
2GAMMA(5)24
3FACT(4)24
4GAMMA(2.5)1.3293
5GAMMA(0.5)1.7725
=GAMMA(5) Explain

GAMMA(0.5) is √π ≈ 1.7725.

Common mistakes

  • #NUM! number is 0 or a negative whole number, or the result is too large (above about 171).
  • Off by one. GAMMA(n) is (n − 1)!, not n!.

Notes

Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.