Hex Calculator
Calculate hex instantly in your browser.
Loading calculator…
What this tool does
Calculate hex instantly in your browser. Nonnegative hex integers; subtraction may give a negative (sign-magnitude) result and division is integer division with a remainder.
How to use the Hex Calculator
- Enter or select first hex number.
- Enter or select second hex number.
- Enter or select operation.
- Read the calculated result; change any measurement to compare alternatives.
Formula
Hexadecimal digits run 0–9 then A–F (10–15); arithmetic carries at 16. The calculator converts to integers, operates exactly, and converts back to hex.
- a
- First hex number
- b
- Second hex number
- op
- Operation
Nonnegative hex integers; subtraction may give a negative (sign-magnitude) result and division is integer division with a remainder.
Worked example
For hex calculator, the following measurements illustrate the exact method: First hex number: A3; Second hex number: 1F; Operation: add.
Inputs
- First hex numberA3
- Second hex number1F
- OperationAdd
Result
- Result (hex)C2
- Result (decimal)194
- First number (decimal)163
- Second number (decimal)31
Results explained
- Result (hex)
- Result (hex) from the formula above. Nonnegative hex integers; subtraction may give a negative (sign-magnitude) result and division is integer division with a remainder.
- Result (decimal)
- Result (decimal) from the formula above. Nonnegative hex integers; subtraction may give a negative (sign-magnitude) result and division is integer division with a remainder.
- First number (decimal)
- First number (decimal) from the formula above. Nonnegative hex integers; subtraction may give a negative (sign-magnitude) result and division is integer division with a remainder.
- Second number (decimal)
- Second number (decimal) from the formula above. Nonnegative hex integers; subtraction may give a negative (sign-magnitude) result and division is integer division with a remainder.
Frequently asked questions
Hexadecimal digits run 0–9 then A–F (10–15); arithmetic carries at 16. The calculator converts to integers, operates exactly, and converts back to hex.
Nonnegative hex integers; subtraction may give a negative (sign-magnitude) result and division is integer division with a remainder.
Where mathematically meaningful, yes. Fields specify permitted ranges and undefined operations display an error.
Exact integer calculations use safe integers; decimal calculations use browser floating point, so small rounding differences can occur.
All values remain in your browser and are never uploaded.