# GAMMALN Function

> Return the natural logarithm of the gamma function with GAMMALN in TX Sheet Control: valid numbers, #NUM! errors and large arguments that GAMMA can't handle.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > GAMMALN Function
- **193 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/gammaln/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/gammaln/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/gammaln/llms-full.txt

---

Return the natural logarithm of the gamma function. `number` must be greater than 0; 0 and negative numbers return `#NUM!`. GAMMALN also works for large numbers such as 200, for which [GAMMA](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/gamma/llms-full.txt) returns `#NUM!`.

### Syntax

```text
GAMMALN(number)
```

Category: Statistics. Minimum arguments: 1. Maximum arguments: 1.

Available for supported offline calculation.

### Examples

```text
=GAMMALN(5)
```

The formula returns 3.1780538303, the natural logarithm of 24.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [GAMMAINV Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/gammainv/llms-full.txt)
- **Next:** [GAMMALN.PRECISE Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/gammaln-precise/llms-full.txt)
