FormulaCraft

DECIMAL

DECIMAL converts a text string that represents a number in a specified base (radix 2–36) back to a standard decimal integer. It is the inverse of BASE, so DECIMAL("FF",16) returns 255 and DECIMAL("1010",2) returns 10.

Excel
=DECIMAL(A2,16)
Google Sheets
=DECIMAL(A2,16)

Verified example

Computed by a real spreadsheet engine on the sample data below.

Hex CodeDecimal
FF
10
1A
80

=DECIMAL(A2,16)255

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

How it works

  1. 1A2 is a text string representing a number in the specified base (e.g. "FF").
  2. 216 is the base (radix) of the input string — must be an integer from 2 to 36.
  3. 3DECIMAL("FF",16) returns 255; DECIMAL("1010",2) returns 10.

Need a version for your data?

Try: “Convert hex color codes to decimal integers

Related

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: