Skip to content
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.

  1. A hex string back to a number:

    =DECIMAL("2A", 16)

    Result42

  2. A binary string from a flags column into its integer value:

    =DECIMAL(A2, 2)

    Result42

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.