Hex calculator

Arithmetic in hexadecimal.

Hex result

220

Binary
Octal
Decimal
Hex
In decimal

Runs in your browser. Nothing uploaded.

How to do hexadecimal arithmetic

  1. Enter two hex numbers using 0–9 and A–F. A 0x prefix is fine.
  2. Choose the operation.
  3. Read the hex result with the decimal, binary and octal values.

Example

0x1F4 + 0x2C = 0x220, which is 500 + 44 = 544 in decimal. Each hex digit is four bits, so 0x220 is 0010 0010 0000 in binary.

Hex digits

Hex Decimal Binary
0–9 0–9 0000–1001
A 10 1010
B 11 1011
C 12 1100
D 13 1101
E 14 1110
F 15 1111

Hex in everyday computing

Colour codes like #1F2430 are three hex bytes for red, green and blue. Memory addresses, MAC addresses and file signatures are all written in hex because each pair of hex digits is exactly one byte, so it’s much shorter than binary and lines up with it perfectly.