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

ArgumentRequired?What it does
textYesThe number written in the other base.
radixYesThe 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)
AB
1HexDecimal
2FF255
32C44
4D1209
=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.
Kyle Stott

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.