Best uses
- Translate hex values used in programming or debugging.
- Understand color, memory, and byte values.
- Check base-16 math examples.
Convert hexadecimal numbers to decimal online using powers of 16, with A to F examples, conversion checks, FAQs, and common mistakes.
To convert a hexadecimal number to decimal, assign each digit its decimal value, then multiply that value by the matching power of 16. Digits 0-9 keep their normal values, while A=10, B=11, C=12, D=13, E=14, and F=15. Add the products together to get the decimal result.
For a hexadecimal digit dn, n is the position of that digit:
dn-1 .... d4 d3 d3 d2 d1 d0 . d-1 d-2 d-3
The decimal number is equal to the sum of hexadecimal digits (dn) times their power of (16n):
decimal = dn-1 x 16n-1 + .... + d1 x 161 + d0 x 160 + d-1 x 16-1 + .... + d-n x 16-n
Convert (A7.62)16 to decimal.
| Hexadecimal number: | A | 7 | . | 6 | 2 |
|---|---|---|---|---|---|
| power of 16: | 161 | 160 | . | 16-1 | 16-2 |
(A7.62)16 = (?)10
= 10 x 161 + 7 x 160 + 6 x 16-1 + 2 x 16-2
= 40 + 7 + 0.75 + 0.03125
= (47.78125)10
| Hexadecimal | Decimal |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 | 7 |
| 8 | 8 |
| 9 | 9 |
| A | 10 |
| B | 11 |
| C | 12 |
| D | 13 |
| E | 14 |
| F | 15 |
| 10 | 16 |
| 11 | 17 |
| 12 | 18 |
| 13 | 19 |
| 14 | 20 |
Each position is sixteen times the position to its right. Replace A through F with 10 through 15, multiply by the matching power of 16, and add the terms. For a long identifier, work in groups and preserve internal zeros because a zero digit contributes no value but still determines the powers used by every digit to its left.
Large hexadecimal integers can exceed the exact whole-number range of ordinary spreadsheet cells or JavaScript floating-point calculations. If the value represents a memory address, checksum, identifier, or bit mask, compare it with a tool that supports arbitrary-size integers and avoid scientific notation. A leading minus sign represents an ordinary negative value here, not an unsigned two’s-complement word.
Hexadecimal to decimal conversion uses powers of 16. Convert each hex digit to its decimal value, multiply by the matching power, then add the results.
2F equals 47 because it is 2x16 + 15.
Yes. a through f mean the same values as A through F.