Hexadecimal Calculator
Add, subtract, multiply, and divide hexadecimal numbers.
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.
∘ 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 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 Apply the operation in decimal. Here that is addition: 255 + 1 = 256.
- 3 Convert the answer back to hex. 256 = 1 × 16² + 0 × 16 + 0, so it is written 100 in base 16.
- 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.
| Hex | Decimal | Binary (4-bit) |
|---|---|---|
| 0 | 0 | 0000 |
| 1 | 1 | 0001 |
| 7 | 7 | 0111 |
| 9 | 9 | 1001 |
| A | 10 | 1010 |
| B | 11 | 1011 |
| C | 12 | 1100 |
| D | 13 | 1101 |
| E | 14 | 1110 |
| F | 15 | 1111 |
| A + 5 | 10 + 5 = 15 | result F |
| 1A − F | 26 − 15 = 11 | result B |
| FF × 2 | 255 × 2 = 510 | result 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).