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.
Syntax
| Argument | Description | |
|---|---|---|
text | Required | The text representation of the number in the given base. Letters A–Z stand for digit values 10–35 and are not case-sensitive. |
radix | Required | The 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.
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:
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
Pick a DECIMAL example to see the formula and its result.
Practice workbook
Frequently asked questions
Is DECIMAL the opposite of BASE?
=DECIMAL(BASE(255,16),16) returns 255.How are letters interpreted in DECIMAL?
What bases can DECIMAL read?
Does DECIMAL return text or a number?
=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