Skip to content
K Knidox Search…
Computer Science · Number Systems

Hexadecimal Calculator

Add, subtract, multiply, and divide hexadecimal numbers.

Operation
Digits 0–9 and letters A–F.
Digits 0–9 and letters A–F.
Try an example
A + 5 =
Fhex
Decimal
15
Binary
1111

To do hexadecimal arithmetic, convert each hex number to decimal, apply the operation, then convert the answer back to hex. For example, A + 5: A is 10 in decimal and 5 is 5, so 10 + 5 = 15, and 15 written in base 16 is F. So A + 5 = F.

What hexadecimal arithmetic is

Hexadecimal (hex) is base 16: each digit stands for a value from 0 to 15, using 0–9 for zero through nine and the letters A–F for ten through fifteen. Arithmetic works exactly like decimal, except a column carries or borrows at 16 rather than at 10. The most reliable way to add, subtract, multiply, or divide by hand is to convert both numbers to decimal, do the operation, and convert the result back to hex — which is precisely what this calculator does, showing every step.

result = toHex( toDecimal(A) ∘ toDecimal(B) )

∘ is the chosen operation (+ − × ÷). Convert each hex operand to decimal, apply the operation, then convert back to base 16.

Worked example: FF + 1

FF is the largest two-digit hex number. Adding 1 rolls it over to a three-digit value — the hex equivalent of 99 + 1 = 100 in decimal.

  1. 1
    Convert each hex number to decimal. Read each digit’s place value as a power of 16. FF = 15 × 16 + 15 = 255, and 1 = 1.
  2. 2
    Apply the operation in decimal. Here that is addition: 255 + 1 = 256.
  3. 3
    Convert the answer back to hex. 256 = 1 × 16² + 0 × 16 + 0, so it is written 100 in base 16.
  4. 4
    Read the result. FF + 1 = 100 in hex (256 in decimal). For division, keep the quotient and remainder separately.

Hex digits and quick sums

The 16 hex digits with their decimal values, plus a few worked results.

HexDecimalBinary (4-bit)
000000
110001
770111
991001
A101010
B111011
C121100
D131101
E141110
F151111
A + 510 + 5 = 15result F
1A − F26 − 15 = 11result B
FF × 2255 × 2 = 510result 1FE

Why hex, and how carrying works

Hex is base 16, with digits 0–9 and A–F, and it is popular in computing because it maps cleanly onto binary: each hex digit is exactly four bits, so two hex digits describe one byte (0x00 to 0xFF, or 0–255). That makes long binary values far easier to read — a 32-bit value is just eight hex digits. Carrying and borrowing follow the same rules as decimal, only at 16: when a column reaches 16 you carry 1 to the next column, which is why F + 1 rolls to 10 (sixteen) and FF + 1 rolls to 100 (two hundred fifty-six).

What does A–F mean in hexadecimal?
Hex needs sixteen distinct digits, but there are only ten numerals, so the letters A–F stand for the values ten through fifteen: A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15.
Why is hexadecimal used in computing?
Each hex digit maps exactly to four bits, so two hex digits equal one byte (0x00–0xFF). That makes long binary values compact and readable — colours, memory addresses, and byte values are almost always written in hex.
How do I add two hexadecimal numbers?
Convert each number to decimal, add them, then convert the sum back to base 16. For example A + 5 becomes 10 + 5 = 15, and 15 in hex is F, so A + 5 = F.
How does carrying work in hex?
It is the same as decimal, but a column carries at 16 instead of 10. When a column total reaches 16 you write the remainder and carry 1, so F + 1 = 10 (sixteen) and FF + 1 = 100 (two hundred fifty-six).
How does hexadecimal division give a remainder?
Integer division splits into a quotient and a remainder, both shown in hex. For instance FF ÷ 10 is 255 ÷ 16 = 15 remainder 15, which is F remainder F in hexadecimal.
What is the largest two-digit hex number?
FF, which equals 15 × 16 + 15 = 255 in decimal — the maximum value of a single byte. Adding 1 makes it 100 in hex, the smallest three-digit hex number.