Skip to content
RK Calculator
Menu

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.

About first hex numberDigits 0–9 and A–F, for example 8AB.
About operationWhat to do with the two numbers.
About second hex numberDigits 0–9 and A–F.
Result
Sum in hexadecimal
1423
In decimal
2,219 + 2,936 = 5,155
Answer in binary
1010000100011
Answer in octal
12043

8AB + B78 = 1423 in hexadecimal.

Show the working
  1. Convert to decimal: 8AB₁₆ = 2,219 and B78₁₆ = 2,936
  2. Work it out: 2,219 + 2,936 = 5,155
  3. Convert back to hexadecimal: 5,155 = 1423₁₆

Hexadecimal to decimal

Enter a hexadecimal number to write it in decimal.

About hexadecimal numberDigits 0–9 and A–F, for example DAD.
Result
In decimal
3,501
In binary
110110101101
In octal
6655

DAD in hexadecimal is 3,501 in decimal.

Show the working
  1. DAD₁₆ = 13 × 16² + 10 × 16¹ + 13 × 16⁰ = 3,501

Decimal to hexadecimal

Enter a decimal number to write it in hexadecimal.

About decimal numberFor example 170 or 10.625.
Result
In hexadecimal
AA
In binary
10101010
In octal
252

170 in decimal is AA in hexadecimal.

Show the working
  1. 170 ÷ 16 = 10 remainder 10 (A)
  2. 10 ÷ 16 = 0 remainder 10 (A)
  3. Read the remainders from the bottom up for the whole part
  4. 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.

Formula version 0.1.0Reviewed