# HEX2DEC Function

> Convert a hexadecimal number of up to 10 characters to decimal with HEX2DEC in TX Sheet Control: two's complement for negative numbers and #NUM! errors.

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

---

Convert a hexadecimal number to decimal. `number` is the hexadecimal number of up to 10 characters; a number from 8000000000 to FFFFFFFFFF is negative in two's complement, so FFFFFFFFFF returns -1. More than 10 characters or an invalid hexadecimal number returns `#NUM!`. HEX2DEC takes only `number`: the `places` shown in the syntax is not accepted and returns `#VALUE!`.

### Syntax

```text
HEX2DEC(number, places)
```

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

Available for supported offline calculation.

### Examples

```text
=HEX2DEC(10)
```

The formula returns 16.

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:** [HEX2BIN Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/hex2bin/llms-full.txt)
- **Next:** [HEX2OCT Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/hex2oct/llms-full.txt)
