# DEC2OCT Function

> Convert a decimal number to octal text with DEC2OCT in TX Sheet Control: the valid range, two's complement for negatives, padding with places and errors.

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

---

Convert a decimal number to an octal number. `number` is an integer from -536,870,912 to 536,870,911; decimals are truncated. A negative number returns ten octal digits in two's-complement notation. `places` pads the result with leading zeros to that number of characters. A number out of range or too few places returns `#NUM!`, and text that is not a number returns `#VALUE!`.

### Syntax

```text
DEC2OCT(number, places)
```

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

Available for supported offline calculation.

### Examples

```text
=DEC2OCT(10)
```

The formula returns the text 12.

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:** [DEC2HEX Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/dec2hex/llms-full.txt)
- **Next:** [DECIMAL Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/decimal/llms-full.txt)
