Hexadecimal Arithmetic Explained: Adding, Subtracting and Multiplying in Base 16
Hex maths works like decimal maths with sixteen digits. This guide shows how to add, subtract and multiply hex numbers by hand and with a tool.
What is the Hex Calculator?
Hexadecimal is base 16, using digits 0 to 9 and letters A to F, and it is widely used for colours, memory addresses and identifiers. This tool validates both inputs as hex, performs the chosen operation, and shows the result in uppercase hex with its decimal value for checking. It handles whole numbers only, and a negative subtraction result is shown with a leading minus sign. Very long inputs may lose precision in JavaScript.
How to use it
- Enter the first hex number using digits 0-9 and letters A-F.
- Enter the second hex number.
- Choose Add, Subtract or Multiply and press Calculate.
Worked example
1A plus 2B in hex gives 45, which is 69 in decimal.
What is 1A plus 2B in hexadecimal?
1A is 26 and 2B is 43, so their sum is 69, which is 45 in hexadecimal.
Frequently asked questions
Are lower-case hex letters accepted?
Yes. Lower-case a to f are accepted and the result is shown in upper case for consistency.
What digits are invalid in hex?
Any letter beyond F, such as G, and any symbol, is invalid and will be rejected with an error.