Skip to content
Google Sheets

DECIMAL function in Google Sheets

The DECIMAL function converts the text representation of a number in another base, to base 10 (decimal). .

=DECIMAL(value, base)

DECIMAL syntax and parameters

Two arguments, two required.

  • valuestringRequired
  • basenumberRequired

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 Excel

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.