BIN2HEX Function in Excel: Binary to Hexadecimal

BIN2HEX Function in Excel: Binary to Hexadecimal 1
⏱ 1 min readUpdated 5 October 2026

EngineeringLevel: ExpertAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. BIN2HEX in practice
  5. Where you will use it
  6. Worked example
  7. Mistakes people make
  8. Related functions

BIN2HEX converts a binary number to hexadecimal. Used for device codes, permission bits, memory addresses and number-system lessons.

Advertisement

Syntax

=BIN2HEX(number, [places])
Argument What it means
number Binary number (as text or a number)
places Pad with leading zeros to this length

Examples

Example 1

=BIN2HEX(A2)

Result: A. See the worked example table below for more cases.

BIN2HEX in practice

Where you will use it

  • Reading binary values from device or network logs
  • Teaching number systems
  • Converting codes for systems that expect hexadecimal

Worked example

InputFormulaResult
1010=BIN2HEX(A2)A
11111111=BIN2HEX(A3)FF
100000000=BIN2HEX(A4)100

Results calculated in Excel.

Mistakes people make

MistakeWhat to do instead
Input too long or invalid digits#NUM!; check the digits allowed in the base
Negative resultsLarge inputs use two's complement (10 characters)

BASE · DECIMAL

📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.

Advertisement
✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong