DECIMAL Function

Excel Functions › Math & Trig

Excel 2013+ Math & Trig

The Excel DECIMAL function converts a text representation of a number in a given base (radix 2–36) back into an ordinary base-10 number — the exact inverse of BASE.


Quick answer:
=DECIMAL("FF", 16) hex "FF" = 255

Syntax

=DECIMAL(text, radix)
ArgumentDescription
textRequiredThe text representation of the number in the given base. Letters A–Z stand for digit values 10–35 and are not case-sensitive.
radixRequiredThe base of the text, an integer from 2 to 36.

How to use it

DECIMAL reads a string written in another base and returns its base-10 value. It is the mirror image of BASE.

=DECIMAL("FF", 16) // hex = 255
=DECIMAL("1000", 2) // binary = 8

For bases above 10, letters carry digit values: A=10, B=11, …, Z=35. So in base 36 a single "Z" is the largest one-character digit:

=DECIMAL("Z", 36) // = 35

The result is a true number you can calculate with. Letters are case-insensitive, so "ff" and "FF" both return 255.

Round trip: =DECIMAL(BASE(255,16),16) returns 255 — BASE encodes and DECIMAL decodes.

Try it: interactive demo

Live demo

Pick a DECIMAL example to see the formula and its result.

Result:

Practice workbook

📊
Download the free DECIMAL practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

Is DECIMAL the opposite of BASE?
Yes. BASE turns a number into a base-N text string; DECIMAL turns that string back into a base-10 number. =DECIMAL(BASE(255,16),16) returns 255.
How are letters interpreted in DECIMAL?
Letters represent digit values above 9: A=10, B=11, up to Z=35. This lets bases up to 36 use single characters per digit. Letters are case-insensitive.
What bases can DECIMAL read?
Any radix from 2 to 36. Common ones are 2 (binary), 8 (octal), and 16 (hexadecimal), but any value in that range works.
Does DECIMAL return text or a number?
A real number you can do math with — unlike BASE, which returns text. =DECIMAL("1000",2) returns the number 8.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: BASE · ARABIC · ROMAN · RAND · SEQUENCE