DECIMAL
Converts a text representation of a number in a given base (radix) to a decimal number.
DECIMAL(text, radix)Arguments
textThe string to convert (max 255 characters).radixThe base radix the text is in (2 to 36).
=DECIMAL("1111",2)Binary 1111 → decimal 15
=DECIMAL("FF",16)Hex FF → decimal 255
=DECIMAL("ZZ",36)Base-36 ZZ → decimal 1295
- •Available since Excel 2013
- •Returns #NUM! if text contains characters not valid for the given base
- •Inverse of BASE()
- •Passing text with characters not valid for the specified radix, which returns a #NUM! error - for example, using digit '9' with a binary (base 2) radix, where only 0 and 1 are valid
- •Confusing DECIMAL with FIXED or general number formatting - DECIMAL specifically converts between number bases (radix conversion), it has nothing to do with decimal places or currency formatting
- •Forgetting DECIMAL is the inverse of BASE - confusing which function goes which direction can lead to nested formulas that undo each other or produce unexpected text-versus-number type mismatches
BASEPerforms the reverse operation - converts a decimal number into text representing another base, undoing what DECIMAL produces.HEX2DECConverts specifically from hexadecimal with its own set of limitations, a more specialized alternative to DECIMAL's general-purpose any-radix conversion.BIN2DECConverts specifically from binary, another specialized alternative to DECIMAL for a single fixed source radix.Why does DECIMAL return a #NUM! error?
The text contains a character that isn't valid for the specified radix - for instance, a digit like '8' can't appear in a base-8 (octal) number, since valid octal digits only go up to 7.
Does DECIMAL have anything to do with decimal places or currency?
No, despite the name, it's about converting numbers between bases (like binary or hexadecimal) into standard base-10, not about formatting decimal places.
How do I convert a decimal number back into another base?
Use BASE(number, radix), the inverse function - it takes a decimal number and returns it as text in the specified base.
Need to translate a formula using DECIMAL?
Use our translator to convert your complete formula
