# LOG Function

> Return the logarithm of a number to a given base with the LOG formula function of TX Sheet Control: the default base of 10 and the #NUM! errors, unlike Excel.

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

---

Return the logarithm of a number to a given base. `number` must be greater than 0, and `base` is 10 when omitted, so `LOG(8,2)` returns 3 and `LOG(8)` returns 0.903. A number of 0 or less returns `#NUM!`, and so does a base of 1, where Excel returns `#DIV/0!`.

### Syntax

```text
LOG(number, base)
```

Category: Math. Minimum arguments: 1. Maximum arguments: 2.

Available for supported offline calculation.

### Examples

```text
=LOG(100,10)
```

The formula returns 2.

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:** [LN Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/ln/llms-full.txt)
- **Next:** [LOG10 Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/log10/llms-full.txt)
