ExcelExcel 2013+
DECIMAL function in Excel
Converts a text representation of a number in a given base into a decimal number
=DECIMAL(text, radix)DECIMAL syntax and parameters
Two arguments, two required.
- textstringRequired
- radixnumberRequired
Radix must be an integer.
DECIMAL examples
Formulas you'll actually reuse.
A hex string back to a number:
=DECIMAL("2A", 16)Result
42A binary string from a flags column into its integer value:
=DECIMAL(A2, 2)Result
42
DECIMAL in Google Sheets
Same name — your formula ports as-is.
Try DECIMAL in the playground
Edit the example — nothing to install.
Preloaded with the DECIMAL formula from Example 1 — change anything and watch it respond.
Loading the editor…
DECIMAL errors
What they mean — and the fixes.
#NUM!The text contains a digit that isn't valid in that radix — e.g. a 2 in a binary string.
Related functions
More ways Excel gets this done.
- ABSReturns the absolute value of a numberMathGoogle Sheets
- ACOSReturns the arccosine of a numberMathGoogle Sheets
- ACOSHReturns the inverse hyperbolic cosine of a numberMathGoogle Sheets
- ACOTReturns the arccotangent of a numberMathGoogle Sheets
- ACOTHReturns the hyperbolic arccotangent of a numberMathGoogle Sheets
- AGGREGATEReturns an aggregate in a list or databaseMathNo Google Sheets equivalent