Contact

GAMMA in Google Sheets: Positive Scalar Values and Factorials

Statistical Intermediate Google Sheets

Evaluate GAMMA in Google Sheets for positive scalar inputs, distinguish Gamma from GAMMALN, and check factorial, fractional and recurrence examples.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: =GAMMA(6) has expected result 120. At a positive integer n, the mathematical Gamma function equals the factorial of n minus 1. GAMMA(6) therefore corresponds to 5 factorial, not 6 factorial.

Syntax and a necessary documentation distinction

=GAMMA(number)

Use one positive numeric value or a cell containing that value. There is no optional argument in the displayed syntax.

Google’s individual GAMMA page has inconsistent material: its definition and numerical table describe Gamma, but an argument sentence describes its natural logarithm, and some sample calls contain multiple arguments. This guide follows the single-argument syntax, definition and numerical table, corroborated by Google’s GAMMA catalog entry.

The separate GAMMALN reference explicitly defines the natural logarithm of Gamma. The distinction is numerically visible: Google’s GAMMA table gives 2 at input 3, whereas the logarithm of 2 is approximately 0.6931471806. Thus GAMMA and GAMMALN should not be treated as interchangeable names.

All examples below use a single positive scalar. Support for the inconsistent multiple-argument samples, range expansion and negative inputs is not asserted.

Worked example: the factorial offset

Enter 1, 2, 3, 4, 5 and 6 in A2:A7. In B2, enter and fill down:

=GAMMA(A2)
Input n Expected GAMMA(n) Independent interpretation
1 1 0 factorial
2 1 1 factorial
3 2 2 factorial
4 6 3 factorial
5 24 4 factorial
6 120 5 factorial

The first two outputs coincide; the function is not simply multiplying its input by a fixed factor. For the last row, the explicit check =1*2*3*4*5 gives 120.

If the intended calculation is 6 factorial, use a Gamma input of 7. The relation is Gamma(n+1) = n factorial. NIST’s Digital Library of Mathematical Functions documents this identity; it is a mathematical check rather than evidence of native spreadsheet execution.

Fractional positive inputs

Gamma also accepts positive noninteger inputs within this documented scalar scope. The following are independently calculated expected results:

Formula Expected result
=GAMMA(0.5) 1.7724538509
=GAMMA(2.5) 1.3293403882
=GAMMA(3.5) 3.3233509704
=GAMMA(4.5) 11.6317283966

The half-input value equals the square root of pi. Repeatedly applying the recurrence generates the other half-integer values without any spreadsheet-specific assumptions. The last value also agrees with the rounded positive-scalar example printed in Google’s individual help page.

A fractional argument is not a request to round to the nearest factorial. For example, 2.5 gives approximately 1.32934 rather than either 1 or 2.

Advanced application: check a recurrence or simplify a ratio

NIST’s recurrence relation states that Gamma(x+1) equals x times Gamma(x). For x = 2.5:

=GAMMA(3.5)
=2.5*GAMMA(2.5)

Both have expected result 3.3233509704, allowing for floating-point rounding. This is useful when checking a model that contains adjacent Gamma terms.

For a small normalization ratio:

=GAMMA(4)*GAMMA(7)/GAMMA(11)

Expected result: 0.00119047619047619, or 1/840. The independent integer calculation is =(1*2*3)*(1*2*3*4*5*6)/(1*2*3*4*5*6*7*8*9*10).

The logarithmic form of the same mathematical ratio is:

=EXP(GAMMALN(4)+GAMMALN(7)-GAMMALN(11))

It has the same expected value within numerical precision. Logarithmic rearrangements can avoid forming huge intermediate Gamma values, although no precise Google Sheets overflow threshold is established here.

Errors and limits

Start troubleshooting by checking that exactly one positive numeric scalar reaches GAMMA. Do not remove a period from a distribution function’s name and expect the same calculation: GAMMA is a special mathematical function, while gamma-distribution functions take distribution parameters.

The reviewed page does not provide a complete native error-code table. Behavior for zero, negative values, text, blanks, multiple arguments or array expansion is outside this guide’s verified scope. The wider mathematical Gamma function has additional domains, but that fact alone does not establish Google Sheets support for them.

Availability and verification

GAMMA is currently documented for rolling Google Sheets. Its original introduction date, first release and last functioning numbered release were not established.

NOT_TESTED_IN_GOOGLE_SHEETS. The individual Google page, catalog and GAMMALN documentation were inspected on October 17, 2026, alongside NIST mathematical references. Expected outputs were independently calculated using factorials, recurrence identities and numerical Gamma evaluation. No native result or screenshot is claimed.

Related published guides: PRODUCT, EXP, LN and ROUND.