Hex calculator
Add, subtract, multiply and divide hexadecimal numbers, or convert hex to and from decimal.
About this calculator
This hex calculator does arithmetic in hexadecimal, the base 16 number system used for memory addresses, colour codes and computer data.
It also converts hex to decimal and decimal to hex, with binary and octal, and keeps even very long numbers exact.
How it works
Hexadecimal is base 16: the digits 0 to 9 are followed by A to F for 10 to 15, and each place is worth 16 times the one to its right. So 2F = 2 × 16 + 15 = 47. The sums use whole-number arithmetic, so long values stay exact.
Last reviewed:
Worked example
- Work out: Hex arithmetic
- First hex number: 8AB
- Operation: +
- Second hex number: B78
Result in hex: 1423
Common questions
How do I convert hex to decimal?
Multiply each digit by a power of 16 and add them. 1A3 = 1 × 256 + 10 × 16 + 3 = 419.
How do I convert decimal to hex?
Divide by 16 again and again and write the remainders in reverse. 419 ÷ 16 = 26 r 3, and 26 ÷ 16 = 1 r 10 (A), so 419 = 1A3.
What is FF in decimal?
255, the largest value one byte can hold. FFFF is 65,535.
Sources and further reading
The story behind it
Where the idea came from: IBM's System/360 computers, launched in 1964, helped make hexadecimal the usual way to write computer data, in place of octal.
Each hex digit stands for exactly four bits, so a byte is always two hex digits, from 00 to FF. That is why web colours such as #FF8800 and memory addresses are written in hex.
Why you can trust this calculator
- It runs in your browser. Nothing you type into it is sent anywhere.
- The method is explained on this page, so you can check it yourself.
- Free to use, with no sign-up.
- Results are estimates, so please double-check anything important.
- Spotted a mistake? Tell us and we'll look into it.

After 15 years as a mathematics educator, I built CalculStore to give students, teachers, professionals and anyone working with numbers simple, reliable tools.
Meet the founder
