DECIMAL Function
Converts text in another base to an ordinary number.
Category
Math & Trig
Available in
Excel 2013+, Microsoft 365
Returns
A number
Want to practice DECIMAL in a real spreadsheet? Open a blank sheet in our Practice Sandbox and try it with live data, with the AI Excel tutor beside you. No Excel needed — just a free account.Try it free in the Sandbox
Overview
DECIMAL is the reverse of BASE: "FF" in base 16 is 255.
Use it to read binary flags, hex codes or other base systems.
Syntax
=DECIMAL(text, radix) Explain
Arguments
| Argument | Required? | What it does |
|---|---|---|
| text | Yes | The number written in the other base. |
| radix | Yes | The base it's written in, from 2 to 36. |
Examples
Example 1 — Hex to decimal
Convert hex codes from a colour list.
B2fx=DECIMAL(A2, 16)
| A | B | |
|---|---|---|
| 1 | Hex | Decimal |
| 2 | FF | 255 |
| 3 | 2C | 44 |
| 4 | D1 | 209 |
=DECIMAL(A2, 16) Explain
Common mistakes
- Digits outside the base. "12" in base 2 isn't valid and returns #NUM!.
Notes
- Related functions: BASE, HEX2DEC, BIN2DEC.

Author
Kyle Stott
Certified Microsoft Excel Expert
Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.