Hex Calculator
Add, subtract, multiply and divide hexadecimal numbers, and convert between hex and decimal, with the working shown.
Change the values and press Calculate to work out your own figures.
Hexadecimal arithmetic
Enter two hex numbers and choose an operation.
Show the working
- Convert to decimal: 8AB₁₆ = 2,219 and B78₁₆ = 2,936
- Work it out: 2,219 + 2,936 = 5,155
- Convert back to hexadecimal: 5,155 = 1423₁₆
Hexadecimal to decimal
Enter a hexadecimal number to write it in decimal.
Show the working
- DAD₁₆ = 13 × 16² + 10 × 16¹ + 13 × 16⁰ = 3,501
Decimal to hexadecimal
Enter a decimal number to write it in hexadecimal.
Show the working
- 170 ÷ 16 = 10 remainder 10 (A)
- 10 ÷ 16 = 0 remainder 10 (A)
- Read the remainders from the bottom up for the whole part
- 170₁₀ = AA₁₆
How to use it
Enter two hex numbers and choose an operation. Enter a hexadecimal number to write it in decimal. Enter a decimal number to write it in hexadecimal.
Letters stand for digits above 9 (A = 10 … Z = 35) and can be typed in either case; prefixes such as 0b and 0x, spaces and underscores are ignored. Show the working gives each step.
Key facts
Place values: 8AB₁₆ = 8×16² + 10×16¹ + 11×16⁰ = 2,219 A–F stand for 10–15
Hexadecimal
Hex uses sixteen digits, 0–9 then A–F for 10–15. Each hex digit is exactly four bits, which is why hex is the usual shorthand for binary data such as colours (#FF8800) and memory addresses.
Questions
What is F + 1 in hex?
10 (sixteen).
What is FF in decimal?
255.
Formulas
Place values: 8AB₁₆ = 8×16² + 10×16¹ + 11×16⁰ = 2,219 A–F stand for 10–15
Sources
Limitations
- Numbers have at most 1,000 characters; Roman numerals cover whole numbers from 1 to 3,999,999.