Contact

GAMMA in Collabora Office: Extend Factorials Beyond Integer Inputs

Statistical Intermediate Collabora Office Calc

Understand Collabora GAMMA, its factorial offset, recurrence and half-integer values, without confusing it with gamma distribution functions.

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

Quick answer: =GAMMA(6) has independently expected result 120. For a positive integer n, GAMMA(n) equals FACT(n-1), so the gamma argument is one greater than the factorial argument.

Syntax and mathematical meaning

=GAMMA(Number)

Number is the single required argument. The dedicated Collabora help identifies this as the gamma function and explicitly warns that GAMMAINV is not its inverse. GAMMAINV and GAMMA.INV invert a cumulative distribution; they do not undo the special function on this page.

For positive x, gamma can be defined by the integral of t^(x-1)*EXP(-t) from zero to infinity. This mathematical definition explains why it extends factorial values to noninteger positive arguments. It is not itself a cumulative probability and need not lie between zero and one.

The examples use positive inputs. Gamma also has a real-valued extension at negative nonintegers, but zero and negative integers are poles. A current Collabora source snapshot rejects nonpositive integer arguments; its branch/date limitations are described below, rather than presented as a native desktop test.

Example 1: verify the factorial offset

Put 1, 2, 3, 4, 5, 6 in A2:A7. In B2 enter =GAMMA(A2) and fill down. Independent targets are 1, 1, 2, 6, 24 and 120.

In C2 enter =FACT(A2-1) and fill down. The two columns should agree for this positive-integer dataset. At A2=1, the reference is FACT(0)=1, which is why GAMMA(1) is one rather than zero.

A common off-by-one mistake is to use GAMMA(n) when the desired quantity is n!. For example, the number of orders of five distinct objects is 5!=120; GAMMA(5) gives 24, while GAMMA(6) gives the intended factorial value.

Example 2: use half-integer values

Put 0.5, 1.5 and 2.5 in A10:A12. The independent GAMMA targets are approximately 1.772453851, 0.886226925 and 1.329340388.

GAMMA(0.5)=SQRT(PI()). The recurrence GAMMA(x+1)=xGAMMA(x) then gives GAMMA(1.5)=0.5SQRT(PI()) and GAMMA(2.5)=1.50.5SQRT(PI()). These provide independent reference expressions using familiar constants and multiplication.

Do not apply FACT to these fractional values as a substitute. A factorial function’s treatment of a fractional argument does not define the continuous gamma function.

Advanced application: audit a recurrence table

For positive x in A15, enter =GAMMA(A15+1) in B15 and =A15*GAMMA(A15) in C15. Test x=0.5, 1.5 and 4.5. The mathematical targets agree in each row.

The recurrence is useful for checking a small computation, but repeated multiplication can magnify floating-point error or overflow. Agreement at small values does not establish accuracy for extremely large inputs or near a pole.

Advanced application: calculate a normalization constant

For positive a and b, the mathematical beta-function constant is GAMMA(a)*GAMMA(b)/GAMMA(a+b). With a=2 and b=3, =GAMMA(2)*GAMMA(3)/GAMMA(5) has independent result 1/12, approximately 0.083333333.

This is a special-function constant, not a beta cumulative probability. For larger parameters, a logarithmic expression using GAMMALN can avoid constructing enormous intermediate gamma values. Exponentiating the final result still has finite numerical limits.

Errors and troubleshooting

Reject zero and negative integer arguments rather than treating poles as zero-valued results. The mathematical gamma function can be negative between some poles; taking LN of such a result is not a real-valued logarithm. Use a clearly defined positive-input domain when GAMMALN is part of a calculation.

If an integer answer is one factorial step too small, inspect the argument offset first. If a result overflows, reformulate a ratio in log space where appropriate rather than simply increasing displayed decimal places. The saved help does not specify every numeric threshold, native error string or nonnumeric coercion rule.

Availability and verification

The exact function is documented in Collabora Office 26.04 desktop help. The snapshot was retrieved on 2026-10-13 and hash-verified on October 15, 2026. Desktop help is not proof of Online or mobile availability. First introduced release and last functioning version are unknown; the dedicated source does not establish them.

No native Collabora or WPS execution occurred. Numerical values are independent mathematical expectations, not certification of application errors or all numerical limits. Formulas use English names and semicolon separators.

A current Collabora interpreter source snapshot retrieved October 15, 2026 corroborates the described domain or parameter roles. It is from the moving main branch, not a pinned 26.04 binary, and is not an application execution.

References