Blog
Wild & Free Tools

Hex to Decimal in Excel — Formula Guide and Free Tool

Last updated: April 2026 5 min read
Quick Answer

Table of Contents

  1. The HEX2DEC Formula — Syntax and Examples
  2. Decimal to Hex in Excel — DEC2HEX
  3. Excel's HEX2DEC Limitations
  4. Converting a Column of Hex Values in Excel
  5. When to Use the Browser Tool Instead of Excel
  6. Frequently Asked Questions

To convert hex to decimal in Excel, use the built-in =HEX2DEC() function. Enter your hex value in a cell, type =HEX2DEC(A1) in an adjacent cell (replacing A1 with your cell reference), and Excel returns the decimal integer. No add-in required.

For one-off conversions or values Excel cannot handle, the Number Base Converter does the same job instantly in your browser — type the hex value and get decimal, binary, and octal all at once.

The HEX2DEC Formula — Syntax and Examples

The Excel function syntax is: =HEX2DEC(number)

Where number is the hex string you want to convert. It can be a direct string like "FF" or a cell reference like A1.

FormulaHex InputDecimal Output
=HEX2DEC("FF")FF255
=HEX2DEC("1A")1A26
=HEX2DEC("10")1016
=HEX2DEC("1000")10004096
=HEX2DEC(A2)(value in A2)(result)

Note: Excel treats hex input as upper case and is not case-sensitive. "ff" and "FF" both work.

Decimal to Hex in Excel — DEC2HEX

For the reverse conversion, use =DEC2HEX(number, [places]). The optional places argument pads the result with leading zeros to a fixed width.

FormulaDecimalHex Output
=DEC2HEX(255)255FF
=DEC2HEX(255, 4)25500FF
=DEC2HEX(16)1610
=DEC2HEX(4096)40961000

The padded version (with a places argument) is useful when you need consistent field widths — for example, all color hex codes formatted as 6 characters.

Sell Custom Apparel — We Handle Printing & Free Shipping

Excel's HEX2DEC Limitations

Excel's conversion functions have a cap: HEX2DEC accepts up to 10 hex digits (40-bit signed integers). The maximum input is 7FFFFFFFFF (about 549 billion). If you enter a larger hex value, Excel returns a #NUM! error.

Other limitations:

For values larger than 40 bits, or if you need binary or octal output, the browser converter handles integers up to roughly 9 quadrillion without any such limitation.

Converting a Column of Hex Values in Excel

If you have a column of hex values to convert in bulk:

  1. Put your hex values in column A (A1 through A100, for example)
  2. In cell B1, enter: =HEX2DEC(A1)
  3. Press Enter, then select cell B1 again
  4. Copy the formula down column B — double-click the fill handle or drag it down
  5. All decimal equivalents populate automatically

To keep only the values (remove the formula dependency), select column B, copy, then Paste Special → Values Only.

When to Use the Browser Tool Instead of Excel

Excel is the right choice when you have a spreadsheet full of hex values and need decimal equivalents in adjacent columns — bulk conversion with the formula dragged down a column is fast and clean.

Use the browser converter when:

The Number Base Converter shows decimal, binary, octal, and hex simultaneously — which is particularly useful for cross-checking values when one format alone is ambiguous.

Need a Quick One-Off Hex Conversion?

Type any hex value and get decimal, binary, and octal all at once — no spreadsheet, no formula, no 40-digit limit.

Convert Numbers Free

Frequently Asked Questions

Why does HEX2DEC return a negative number?

If the hex value starts with a digit greater than 7 in its most significant nibble, Excel interprets it as a negative number using two's complement representation. This is by design for compatibility with signed 40-bit integers. If you want the unsigned decimal value, the browser converter shows the standard unsigned result.

How do I convert hex to binary in Excel?

Excel has no direct HEX2BIN function for values longer than 4 bits. For short values up to 4 hex digits, you can chain HEX2DEC and then DEC2BIN. For any length hex value, the browser converter shows the binary output instantly without any formula chaining.

Does Google Sheets support HEX2DEC?

Yes. Google Sheets supports the same HEX2DEC and DEC2HEX functions with identical syntax. Copy the same formulas into Sheets and they work the same way.

Carlos Mendez
Carlos Mendez Photo Editing & Image Writer

Carlos has been a freelance photographer and photo editor for a decade, working with clients from local businesses to regional magazines.

More articles by Carlos →
Launch Your Own Clothing Brand — No Inventory, No Risk