hex2dec.com

How to Convert Hexadecimal to Decimal

Converting hexadecimal (base 16) to decimal (base 10) is straightforward once you understand the method. This guide walks you through it step by step with examples.

The Formula

Each hex digit is multiplied by 16 raised to the power of its position (starting from 0 on the right). Then sum all the values:

decimal = dn × 16n + dn-1 × 16n-1 + ... + d0 × 160

Where each d is a hex digit (0-9, A=10, B=11, C=12, D=13, E=14, F=15).

Step-by-Step Examples

Example 1: Convert hex FF to decimal

  1. F = 15 (rightmost digit, position 0): 15 × 16⁰ = 15 × 1 = 15
  2. F = 15 (leftmost digit, position 1): 15 × 16¹ = 15 × 16 = 240
  3. Sum: 240 + 15 = 255

Example 2: Convert hex 2A3F to decimal

  1. F = 15 × 16⁰ = 15 × 1 = 15
  2. 3 × 16¹ = 3 × 16 = 48
  3. A(10) × 16² = 10 × 256 = 2,560
  4. 2 × 16³ = 2 × 4,096 = 8,192
  5. Sum: 8,192 + 2,560 + 48 + 15 = 10,815

Example 3: Convert hex 0x1A to decimal

  1. A = 10 × 16⁰ = 10
  2. 1 × 16¹ = 16
  3. Sum: 16 + 10 = 26

Quick Reference: Powers of 16

PositionPowerValue
016⁰1
116¹16
216²256
316³4,096
416⁴65,536
516⁵1,048,576
616⁶16,777,216
716⁷268,435,456
816⁸4,294,967,296

Practice Problems

Try converting these hex values to decimal (answers at the bottom):

  1. 3F
  2. 100
  3. BEEF
  4. CAFE
Show Answers
  • 3F = 3×16 + 15 = 63
  • 100 = 1×256 = 256
  • BEEF = 11×4096 + 14×256 + 14×16 + 15 = 48,879
  • CAFE = 12×4096 + 10×256 + 15×16 + 14 = 51,966