---
title: "gamma function in Strata | Oplema"
description: "Calculate the gamma function of a number, which extends (x-1) factorial to decimal inputs. Write it as gamma(x) in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/gamma"
updated: "2026-11-04"
---

# gamma

Interpolation of (x-1) factorial (so decimal inputs are allowed).

## Try an expression

In [Formula](https://oplema.com/docs/strata/prep/formula), enter the expression and set Output type to **DOUBLE**.

### Expression

```
gamma(5.5)
```

### Result

```
52.34277778455353
```

To use your own data, replace the example values with column names. Keep format strings and other options as written.

Try it live in Formula

Result
| id | result |
| --- | --- |
| 1 | 52.3428 |

## Arguments and types

```
gamma(x)
```

**x**

Number

Supported signatures (1)

```
gamma(x: DOUBLE) → DOUBLE
```

The result type can depend on the input types. See DuckDB for the full argument rules.

## Things to know

If the first argument is missing, the result is NULL.

## Related functions

[factorial

Multiply a whole number by every whole number below it, down to 1.

](https://oplema.com/docs/strata/functions/factorial)[round

Round decimal values to a consistent number of places for prices, measurements or reports.

](https://oplema.com/docs/strata/functions/round)[abs

Return the absolute value of a number, removing any minus sign.

](https://oplema.com/docs/strata/functions/abs)[acos

Computes the arccosine of x.

](https://oplema.com/docs/strata/functions/acos)

[Browse numbers](https://oplema.com/docs/strata/functions#numbers) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/numeric.html#gammax)

Function metadata from DuckDB, used under the [MIT license](https://github.com/duckdb/duckdb/blob/v1.5.4/LICENSE).
