Hexadecimal Calculator
Work with hex numbers and convert between hexadecimal and decimal. For step-by-step conversion, use the solver on the home page.
Hexadecimal calculation – Addition, Subtraction, Multiplication or Division
Result
Hexadecimal value:
—
Decimal value:
—
Convert Hexadecimal to Decimal
Convert Decimal to Hexadecimal
The Hexadecimal System
Hexadecimal (hex) is base 16: 16 symbols — 0–9 and A–F (A=10 up to F=15). One hex digit = 4 bits (a nibble), so it’s widely used in computing.
Conversion Table
| Hexadecimal | Binary | Decimal |
|---|---|---|
| 0 | 0000 | 0 |
| 1 | 0001 | 1 |
| 2 | 0010 | 2 |
| 3 | 0011 | 3 |
| 4 | 0100 | 4 |
| 5 | 0101 | 5 |
| 6 | 0110 | 6 |
| 7 | 0111 | 7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| A | 1010 | 10 |
| B | 1011 | 11 |
| C | 1100 | 12 |
| D | 1101 | 13 |
| E | 1110 | 14 |
| F | 1111 | 15 |
Convert Decimal to Hexadecimal
Repeatedly divide the decimal number by 16 and note the remainders. Read the remainders from bottom to top to get the hex result. Example:
255 in Hex:
255 ÷ 16 = 15 R.15 (F)
15 ÷ 16 = 0 R.15 (F)
Result: FF
Convert Hexadecimal to Decimal
Multiply each digit by the right power of 16 (starting from the right) and add. E.g.:
1A2 in Decimal:
1×16² + 10×16¹ + 2×16⁰
= 256 + 160 + 2
= 418
Where hex is used
Hex is handy in computing: one digit = 4 bits. Typical uses:
- RGB colour codes (e.g. #FF0000 for red)
- Memory addresses
- Program debugging
- Unique identifiers (UUID)
Hex in short
Base 16: digits 0–9 then A–F (A=10 … F=15). The 0x prefix is common for addresses, colours and hex codes.
- Decimal → Hex: repeated division by 16, read remainders from bottom to top.
- Hex → Decimal: sum of digits × 16ⁿ according to position.
- Binary relation: 1 hex digit = 4 bits, so 2 hex digits = 1 byte.
128₁₀ → 80₁₆ (remainders 0, 8).
2B4₁₆ → 2×256 + 11×16 + 4×1 = 692.
0x2A → 42 in decimal, 101010 in binary.
To check your answer, convert back to decimal. Mistakes often come from the wrong power of 16 in each position.
For division by 16, 0x notation or how hex relates to binary, the main solver can show you step by step.