How to convert hex to decimal, step by step
You need two things: the values of the sixteen hex digits, and the idea that each position is worth a power of 16. Everything else is multiplication and addition.
1. Know the digit values
Hexadecimal (base 16) uses sixteen symbols. 0–9 mean what they always mean; the letters A–F stand for 10–15:
| Hex | Decimal | Binary |
|---|---|---|
| 0 | 0 | 0000 |
| 1 | 1 | 0001 |
| 2 | 2 | 0010 |
| 3 | 3 | 0011 |
| 4 | 4 | 0100 |
| 5 | 5 | 0101 |
| 6 | 6 | 0110 |
| 7 | 7 | 0111 |
| 8 | 8 | 1000 |
| 9 | 9 | 1001 |
| A | 10 | 1010 |
| B | 11 | 1011 |
| C | 12 | 1100 |
| D | 13 | 1101 |
| E | 14 | 1110 |
| F | 15 | 1111 |
2. Multiply each digit by its positional value
Positions count from the right, starting at 0. A digit at position n is
worth digit × 16ⁿ. Take 0x2F3:
2×16² + F(15)×16¹ + 3×16⁰
= 2×256 + 15×16 + 3×1
= 512 + 240 + 3 = 755
So 0x2F3 = 755 in decimal.
3. A byte-sized example: 0xFF
F(15)×16¹ + F(15)×16⁰ = 240 + 15 = 255
0xFF = 255 — the largest value of one byte. Worth memorizing:
it shows up constantly in masks, color channels and limits.
Decimal to hex: divide by 16
The reverse direction uses repeated division. Divide by 16, note the remainder, repeat with the quotient until you reach 0, then read the remainders bottom-up. Converting 755:
- 755 ÷ 16 = 47, remainder 3
- 47 ÷ 16 = 2, remainder 15 → F
- 2 ÷ 16 = 0, remainder 2
Read up: 2, F, 3 → 0x2F3
Common mistakes
- Forgetting letters are values.
Ais ten, not "a".0xA0is 160, not 100. - Counting positions from the left. Powers grow from the right: the last digit is 16⁰.
- Misreading case.
0xffand0xFFare the same number; case carries no meaning. - Reading remainders top-down. In decimal → hex, the last remainder is the first digit.
Check yourself with the converter
Our hex to decimal converter shows this exact breakdown for any number you type — use it to verify your hand conversions while you practice. When the numbers live in binary too, the hex to binary converter shows the nibble mapping.