Add, subtract, multiply or divide hexadecimal numbers exactly – with a decimal cross-check in the result so you can verify at a glance.
Show calculation steps
Processed privately in your browser — nothing you paste is uploaded, logged or stored.
Arithmetic in sixteen
Hex operands deserve hex arithmetic: converting to decimal and back for every addition invites transcription errors precisely where addresses and offsets punish them. All four operations run here exactly, at any length, with decimal restatements for verification rather than as the working medium.
Columns carry and borrow at sixteen; letters are digits. Once 8+9=11₁₆ feels normal, hex arithmetic is decimal arithmetic with six extra friends.
Worked example
1A3F + FF F+F = E carry 1 (30 = 0x1E) 3+F+1 = 3 carry 1 (19 = 0x13) A+0+1 = B 1+0 = 1 Sum: 1B3E (6719 + 255 = 6974 ✓)
| Example column | Result |
|---|---|
| 8 + 9 | 1 carry 1 (17 = 0x11) |
| C + 5 | 1 carry 1 (17 = 0x11) |
| F + F | E carry 1 (30 = 0x1E) |
| A + 4 | E, no carry |
Division with remainders in hex
0x1000 ÷ 0x30 → quotient 0x55, remainder 0x10: how many 48-byte records fit a 4KB page, and the tail. Keeping both parts hex-native is the point — the follow-on arithmetic (offsets of the tail) is hex too.
Verification habits
Check last digits mod 16 (F+F must end in E), then read the decimal line. Two five-second habits catch nearly every slip in hand-carried hex.
Privacy
Exact, local, unbounded — operands stay in your browser.
Hex arithmetic in real work
Most real hex arithmetic is address arithmetic: adding an offset to a base address, computing the distance between two pointers, or checking whether a structure field lands where the layout says it should. Doing it in hex keeps the bit boundaries visible — 0xFF + 0x1 rolling over to 0x100 shows a byte boundary being crossed, which the decimal form 255 + 1 = 256 hides. The decimal cross-check in every result lets you confirm each operation with familiar arithmetic.
How to use the Hex Calculator
- Enter two hex numbers.
- Choose the operation.
- Click "Calculate" – results are hex, with the decimal equivalents printed for verification.
- Case and 0x prefixes are accepted on input.
Frequently asked questions
What can this calculator do?
Add, subtract, multiply and divide hexadecimal integers exactly at any size – with division returning hex quotient and remainder, and every mode restating the computation in decimal.
How do hex carries work in addition?
A column carries when it reaches sixteen: 8+9=17 writes 1 carry 1 (because 17 = 0x11). Letters are just digits here – C+5 = 0x11 as well. Decimal habits misfire at 10 where hex has six digits to spare; the cross-check catches those slips.
Why calculate in hex at all?
Because the operands live in hex: memory addresses, offsets, RGBA channels, file sizes in dumps, register masks. Converting to decimal and back invites transcription errors this calculator avoids.
Are 0xFF + 0x1 and FF + 1 the same input?
Yes – the prefix is optional decoration; case is ignored. A 0b or 0o prefix is rejected with the correct converter suggested.
Does it work beyond 64-bit values?
Yes – 20-digit hex operands (80 bits) add exactly, which address arithmetic on hashes or GUId-scale values occasionally needs.
How do I quickly verify a hex sum?
Check the last digit in mod-16 terms: the low digits must satisfy (a+b) mod 16 – e.g. …C + …5 must end in 1. The printed decimal line then verifies the whole thing.
Is anything transmitted?
No – hexadecimal arithmetic executes in the page only.