How it works
This calculator lets you perform arithmetic operations on hexadecimal numbers and convert between hex and decimal. Hexadecimal is base-16, meaning each digit position represents a power of 16 rather than 10. The digits 0–9 represent their usual values, and A–F represent 10–15. This system is essential in computing because each hex digit maps cleanly to exactly 4 binary bits, making it far more readable than binary for programmers and engineers.
You enter two hex values, choose an operation (addition, subtraction, multiplication, or conversion), and the calculator returns the result. Arithmetic stays in hex throughout—no automatic decimal conversion unless you explicitly select the conversion option.
The formula
Result = (Hex A operation Hex B) or (Hex A → Decimal)
For arithmetic, operations follow standard rules but use base-16 place values. For conversion, multiply each hex digit by 16 raised to its position power, then sum.
Worked example
Scenario 1: Hex addition
Add 1A + 2F in hexadecimal.
- Hex A = 1A
- Operation = +
- Hex B = 2F
Working column by column (right to left):
- Rightmost: A (10) + F (15) = 25 in decimal = 19 in hex (write 9, carry 1)
- Left: 1 + 2 + 1 (carry) = 4
- Result: 49 in hex
To verify in decimal: 1A = 26, 2F = 47, 26 + 47 = 73. And 49 hex = 4×16 + 9 = 73. ✓
Scenario 2: Hex to decimal conversion
Convert 3C to decimal.
- Hex value = 3C
- Operation = → decimal
Break it down by position:
- 3 is in the 16¹ place: 3 × 16 = 48
- C (12) is in the 16⁰ place: 12 × 1 = 12
- Total: 48 + 12 = 60 in decimal
Scenario 3: Hex multiplication
Multiply A × B in hexadecimal.
- Hex A = A (which is 10 in decimal)
- Operation = ×
- Hex B = B (which is 11 in decimal)
In decimal: 10 × 11 = 110. Convert 110 back to hex: 110 ÷ 16 = 6 remainder 14. So 110 decimal = 6E in hex.
Common mistakes
Confusing case: Hexadecimal letters are case-insensitive—A, a, FF, and ff all work. The calculator accepts both.
Forgetting the base: When you see "1A," remember it's 1A in base-16, not base-10. Writing it as 1A₁₆ or 0x1A makes this explicit in technical contexts.
Overflow in subtraction: If you subtract a larger hex number from a smaller one (e.g., 5 − A), the result is negative. This calculator will show it as a negative hex value or flag the issue, depending on implementation.
Mixing systems: Never add a hex number to a decimal number directly—always convert one to match the other first. This calculator enforces hex input, so both values must be valid hex.
Use this tool to learn hex arithmetic, verify color codes, debug memory addresses, or simply explore how different bases work.