Quick answer
Hexadecimal arithmetic works in base 16 with digits 0–9 and A–F. FF + 1A = 119 in hex, which is 255 + 26 = 281 in decimal.
Enter two hex numbers and an operation. The calculator returns the result in hex and decimal.
Related tools: Hex to Text Converter: Decode hexadecimal bytes as UTF-8 text. Binary Calculator: Add, subtract, multiply, divide or apply bitwise operations to binary numbers. Decimal to Hex Converter: Convert integers between binary, octal, decimal and hexadecimal.
How to use the Hex Calculator
- Type first hex number.
- Type second hex number.
- Choose operation: Add, Subtract and Multiply.
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| First hex number | Text | — |
| Second hex number | Text | — |
| Operation | Choose one: Add; Subtract; Multiply | Starts at Add |
Formula and method
Formula
hexadecimal arithmetic
IEEE-754 double precision; shown to the decimals indicated.
Arbitrary-size integers.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: First hex number = FF; Second hex number = 1A; Operation = Add.
| Result | Value |
|---|---|
| Result | 119 |
| Decimal | 281 |
Example 2
Inputs: First hex number = 100; Second hex number = FF; Operation = Subtract.
| Result | Value |
|---|---|
| Result | 1 |
| Decimal | 1 |
Example 3
Inputs: First hex number = 1F; Second hex number = 10; Operation = Multiply.
| Result | Value |
|---|---|
| Result | 1F0 |
| Decimal | 496 |
The first line is the headline result (result). Below it the hex Calculator lists decimal, which describe the same case from other angles. IEEE-754 double precision; shown to the decimals indicated.
Worked example
F + A = 25 decimal = 19 hex, so write 9 and carry 1. F + 1 + 1 = 17 decimal = 11 hex. The result is 119 hex. Check: 1 × 256 + 1 × 16 + 9 = 281.
Details
Letters are case-insensitive. Hex is common for memory addresses, colours and byte values because two digits describe a byte exactly.
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- First hex number: entering "G" shows "“g” is not a base-16 digit." beside that field and no result.
- Second hex number: left empty shows "Enter second hex number." beside that field and no result.
Choosing between the Hex Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Hex to Text Converter](/technology/hex-to-text/) | hex bytes | Text |
| [Binary Calculator](/technology/binary-calculator/) | first binary number, second binary number and operation | Result |
| [Decimal to Hex Converter](/technology/decimal-to-hex-calculator/) | input base and value | Hexadecimal |
| [Two's Complement Calculator](/technology/twos-complement/) | bit width and decimal integer | Binary |
| [Binary to Text Converter](/technology/binary-to-text/) | binary bytes | Text |
Background: number systems
To convert a whole number from decimal to another base, divide repeatedly by the base and read the remainders backwards; to convert to decimal, multiply each digit by the base raised to its position (counting from 0 at the right) and add. Each hexadecimal digit equals exactly four bits and each octal digit three, so binary converts to hex by grouping bits in fours from the right.
255 in decimal is 11111111 in binary and FF in hexadecimal.
Assumptions and limitations
- Letters are case-insensitive
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for first hex number and second hex number to confirm this.
Frequently asked questions
What is FF in decimal?
FF in hexadecimal is 15 × 16 + 15 = 255.
What is 10 in hex in decimal?
The hex number 10 is 1 × 16 + 0 = 16 in decimal.
Can I multiply?
Yes, choose the operation.
What does the Hex Calculator calculate?
Add, subtract or multiply hexadecimal numbers. It returns Result and Decimal.
What formula does the Hex Calculator use?
hexadecimal arithmetic. Arbitrary-size integers.
What do I need to enter in the hex Calculator?
You enter First hex number, Second hex number and Operation.
How is the result rounded or limited?
IEEE-754 double precision; shown to the decimals indicated. Letters are case-insensitive.
What does the “Operation” option change?
It sets how the hex is worked out. The choices are Add, Subtract and Multiply.
What is an example of a hex result?
With first hex number FF, second hex number 1A and operation Add, the result is 119.
Where does the method come from?
The method follows: Positional numeral systems and two's-complement representation: see IEEE 754-2019 and ISO/IEC 9899 (C standard) for the integer and floating-point formats computers use; the arithmetic itself is base-b place-value expansion.
Related calculators
- Hex to Text Converter — Decode hexadecimal bytes as UTF-8 text.
- Binary Calculator — Add, subtract, multiply, divide or apply bitwise operations to binary numbers.
- Decimal to Hex Converter — Convert integers between binary, octal, decimal and hexadecimal.
- Two's Complement Calculator — Two's-complement representation of an integer in a fixed bit width.
- Binary to Text Converter — Decode groups of 8 bits as UTF-8 text.
- Number Base Converter — Convert a number between bases 2 and 36.
Sources
- Positional numeral systems and two's-complement representation: see IEEE 754-2019 and ISO/IEC 9899 (C standard) for the integer and floating-point formats computers use; the arithmetic itself is base-b place-value expansion
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.