About this calculator
Enter two hex numbers, with or without 0x, and choose an operation.
How to use it
- Enter the first hex number.
- Choose the operation.
- Enter the second number.
The formula
- A–F
- 10 to 15
Worked example
0A8F + FF
- 0A8F is 2,703 and FF is 255.
- Sum = 2,958 = B8E in hex.
What the result means
Each hex digit is exactly four binary digits, which is why programmers like it.
Hex values worth knowing
| Hex | Decimal | Where you see it |
|---|---|---|
| 7F | 127 | Largest signed 8-bit value |
| 80 | 128 | Top bit of a byte set |
| FF | 255 | Largest byte value, full colour channel |
| 100 | 256 | Number of values in one byte |
| 3E8 | 1,000 | A round decimal number in hex |
| 400 | 1,024 | One kibibyte |
| FFFF | 65,535 | Largest 16-bit value, highest port number |
| 10000 | 65,536 | Number of values in 16 bits |
| 7FFFFFFF | 2,14,74,83,647 | Largest signed 32-bit integer |
| FFFFFFFF | 4,29,49,67,295 | Largest unsigned 32-bit integer |
Two practical examples
Pulling the blue channel out of a colour: the CSS colour #3A7BD5 is 3A7BD5 in hex. Choose AND with FF and the result is D5, which is 213 in decimal, the blue value. XOR with FFFFFF gives C5842A, the inverted colour.
Working out a memory offset: a buffer starts at 7FF0 and you need the address 40 bytes (hex) further on. 7FF0 + 40 = 8030, which is 32,752 + 64 = 32,816 in decimal. The carry from F + 4 ripples through, which is where manual hex addition usually goes wrong.
Common mistakes
- Reading hex 10 as ten. It is 16; hex 20 is 32.
- Expecting a fraction from division. 3E8 ÷ 7 gives 8E with remainder 6, because the calculator does whole-number division.
- Expecting two’s complement for negative answers. FF − 100 is shown as −1 with a minus sign, not as FFFFFFFF.
Assumptions
- Non-negative inputs for bitwise operations.
Limitations
- Two’s complement is not shown.
Frequently asked questions
What is FF in decimal?
255.
How do I convert hex to binary?
Replace each hex digit with its four-bit binary value.
Can I type 0x?
Yes, the prefix is ignored.
Does it matter if I type capital or small letters?
No. 3e8 and 3E8 are the same number; results are shown in capitals.
How do I multiply a hex number by 16?
Add a 0 on the right, just as multiplying by 10 does in decimal. 1F4 × 10 (hex) = 1F40, which is 500 × 16 = 8,000.
Why do colour codes use hex?
Each colour channel runs from 0 to 255, and two hex digits cover exactly that range, from 00 to FF.
Last reviewed on 12 October 2026. How we calculate and check. Found a mistake? Tell us.

