FormulaCraft

HEX2DEC

HEX2DEC accepts a hexadecimal string (digits 0–9 and letters A–F, up to 10 characters) and returns the corresponding decimal integer. It is handy when working with memory addresses, HTML color codes, or API responses that return values in hex.

Excel
=HEX2DEC("FF")
Google Sheets
=HEX2DEC("FF")

Verified example

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

HexDecimal
A=HEX2DEC("A")
FF=HEX2DEC("FF")
1A3=HEX2DEC("1A3")
FFFF=HEX2DEC("FFFF")

=HEX2DEC("FF")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. 1Enter the hexadecimal string as a quoted text literal or reference a cell containing the hex value.
  2. 2The function ignores case — 'ff' and 'FF' produce the same result (255).
  3. 3The result is a decimal integer you can use directly in arithmetic or further conversions.

Need a version for your data?

Try: “Convert the hex code FF to a decimal number

Related

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

Last reviewed: