GAMMALN.PRECISE Function in Google Sheets: Formula, Examples & Troubleshooting
Use GAMMALN.PRECISE in Google Sheets for log-gamma values, log-factorials, and a checked combinations example without confusing Gamma with factorial.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: GAMMALN.PRECISE(value) returns the natural logarithm of the Gamma function at a positive input. =GAMMALN.PRECISE(6) has the independently calculated expected result 4.7874917428, because Ī(6) = 120 and ln(120) has that value.
Verification: NOT_TESTED_IN_GOOGLE_SHEETS. Google’s catalog and linked reference were reviewed October 17, 2026. All numerical examples were calculated independently, without executing Sheets formulas.
Syntax and supported mathematical input
=GAMMALN.PRECISE(value)
The single argument is required. Google’s function catalog lists this exact spelling and directs readers to its GAMMALN reference, which defines a base-e logarithm and requires a positive input. There are no optional arguments in the documented signature.
That cross-reference supports the mathematical contract, not a claim that both spellings have identical numerical implementations. The word PRECISE is not evidence of a measured accuracy improvement.
For a positive integer n, the Gamma identity is Ī(n) = (n ā 1)!. Therefore the log of n-factorial is obtained from GAMMALN.PRECISE(n + 1). The extra 1 matters. For positive noninteger input, Gamma continues the factorial-related function between integer points; it is not ordinary factorial rounding.
Example: build a log-factorial calculation
Create A1 n, B1 Gamma argument, and C1 ln(n!). Enter 0, 1, 3, 5, and 100 in A2:A6.
- Enter
=A2+1in B2 and fill down through B6. - Enter
=GAMMALN.PRECISE(B2)in C2 and fill down through C6. - Display about ten decimal places where useful.
- Compare with the independently checked values:
| n | Gamma argument | Expected ln(n!) |
|---|---|---|
| 0 | 1 | 0 |
| 1 | 2 | 0 |
| 3 | 4 | 1.7917594692 |
| 5 | 6 | 4.7874917428 |
| 100 | 101 | 363.7393755556 |
For n = 3, 3! = 6, so the result is ln(6). For n = 5, 5! = 120. Both n = 0 and n = 1 give a factorial of 1, whose natural logarithm is 0. The zero in the first data row never goes directly into GAMMALN.PRECISE; the formula supplies 1.
This distinction prevents a frequent off-by-one mistake: GAMMALN.PRECISE(5) represents ln(4!), not ln(5!). Document whether an input column contains n or the already-shifted Gamma argument.
Advanced use: combinations in log space
For integer n and k with 0 ⤠k ⤠n, the binomial coefficient satisfies:
ln(C(n,k)) = ln(n!) ā ln(k!) ā ln((nāk)!)
Put 10 in E2 and 3 in F2. In G2, calculate:
=GAMMALN.PRECISE(E2+1)-GAMMALN.PRECISE(F2+1)-GAMMALN.PRECISE(E2-F2+1)
The expected log-result is approximately 4.7874917428. To recover the small count for this example, put =EXP(G2) in H2. The mathematical result is 120, because 10 Ć 9 Ć 8 / (3 Ć 2 Ć 1) = 120.
Keeping the calculation in log space can make multiplicative expressions easier to combine: products become sums and ratios become differences. For very large models, retain the log-result if that is what the downstream calculation needs. Exponentiating every intermediate value can undo that advantage.
Do not claim this construction produces exact integers for every input in floating-point arithmetic. If a final rounded count is required, choose and document an appropriate rounding rule after checking the underlying model. Also check n and k before evaluation: positive Gamma arguments alone do not establish that a pair represents a valid integer combination problem.
A noninteger check
At input 0.5, the identity Ī(0.5) = āĻ gives:
=GAMMALN.PRECISE(0.5)
The expected result is approximately 0.5723649429. This demonstrates why GAMMALN.PRECISE should not be implemented conceptually by rounding the input and applying an integer factorial. The product reference’s positive-input requirement is broader than a positive-integer requirement.
Troubleshooting
- The input is zero or negative: It is outside the documented positive-input contract. Check the model and any missing +1 shift; do not silently replace it with a convenient positive value.
- The result looks smaller than a factorial: This function returns a logarithm. Ī(6) is 120, while ln(Ī(6)) is about 4.78749.
- The result was compared with LOG10: GAMMALN.PRECISE uses natural logarithms, base e. A base-10 comparison is a different calculation.
- A combination formula is off by a factor: Recheck all three +1 shifts and confirm whether the desired count permits repeated selections.
- An imported input is text: Validate the underlying value. The reviewed reference does not establish exact text-coercion rules or error tokens.
Availability and related guides
Google’s current catalog establishes documented support for this spelling on the review date. The original introduction and any retirement or last-working version were not established. No accuracy ranking, unsupported alias, or cross-software equivalence is asserted.
See LN for natural logarithms, EXP to reverse a natural log when appropriate, POWER for exponentiation, and ROUND for an explicit rounding step.
First-party references reviewed October 17, 2026: Google Sheets function catalog and GAMMALN. Factorial, half-integer Gamma, and combination examples were independently calculated.