Calculators
Hex Calculator
Add, subtract, multiply or divide two hexadecimal numbers.
Last updated:
A LITTLE MORE CONTEXT
Hex Calculator

Use the Hex Calculator to calculate hexadecimal numbers and convert values between hexadecimal, decimal, binary, and octal. Enter two hex values, choose an operation such as addition, subtraction, multiplication, division, or modulo, and the result appears instantly.
The calculator also shows the equivalent result in other number systems, making it useful for developers, students, engineers, electronics enthusiasts, and anyone working with base-16 values.
What is a hexadecimal calculator?
A hexadecimal calculator performs arithmetic using the base-16 number system.
Hexadecimal uses 16 symbols:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
The letters represent decimal values above 9:
| Hex | Decimal |
|---|---|
| A | 10 |
| B | 11 |
| C | 12 |
| D | 13 |
| E | 14 |
| F | 15 |
For example:
FF + 1 = 100
In decimal, that is:
255 + 1 = 256
So hexadecimal 100 is equal to decimal 256.
How to use the Hex Calculator
Enter your first hexadecimal value in Hex Value A, choose an arithmetic operation, and then enter the second value in Hex Value B.
For example:
Value A: FF
Operation: +
Value B: 1
The calculator returns:
Hex: 100
Decimal: 256
Binary: 100000000
Octal: 400
Both uppercase and lowercase hexadecimal characters are supported, so FF, ff, and 0xFF can all represent the same hexadecimal value.
Hexadecimal operations supported
The calculator supports the most common base-16 arithmetic operations.
Hex addition
Hexadecimal addition works like decimal addition, but carrying occurs when a digit reaches 16 instead of 10.
Example:
FF + 1 = 100
Hex subtraction
Use hexadecimal subtraction to find the difference between two base-16 values.
Example:
A0 − 1 = 9F
Hex multiplication
Hexadecimal numbers can also be multiplied directly.
Example:
10 × 10 = 100
Because hex 10 equals decimal 16:
16 × 16 = 256, which is hexadecimal 100.
Hex division
The calculator can divide hexadecimal integers and display the hexadecimal result.
Example:
100 ÷ 10 = 10
When the division is not exact, the calculator uses integer division and can identify the remaining value.
Hex modulo
Modulo returns the remainder after division.
This can be useful in programming, addressing, bit operations, and low-level calculations.
Hex to decimal conversion
To convert hexadecimal to decimal, each digit is multiplied by a power of 16 based on its position.
For example:
FF
can be written as:
F × 16¹ + F × 16⁰
Since F equals 15:
15 × 16 + 15 × 1 = 255
Therefore:
FF hex = 255 decimal
You can use the converter in this tool to perform the calculation automatically.
Decimal to hex conversion
Decimal values can also be converted into hexadecimal.
For example:
255 decimal = FF hex
and:
256 decimal = 100 hex
The built-in base converter lets you enter a decimal integer and instantly view its hexadecimal equivalent.
Binary to hex conversion
Hexadecimal is closely related to binary because one hexadecimal digit represents four binary bits.
For example:
1111 binary = F hex
and:
11111111 binary = FF hex
A useful mapping is:
| Binary | Hex |
|---|---|
| 0000 | 0 |
| 0001 | 1 |
| 1010 | A |
| 1011 | B |
| 1100 | C |
| 1101 | D |
| 1110 | E |
| 1111 | F |
This is one reason hexadecimal is widely used in computing—it provides a much shorter way to represent long binary values.
Where hexadecimal numbers are used
Hexadecimal appears frequently in software development and computer systems.
Common uses include:
- memory addresses
- machine instructions
- debugging values
- bitmasks
- embedded systems
- microcontroller registers
- network data
- memory dumps
- encoded values
- CSS and HTML colors
For example, the CSS color:
#FF0000
represents red using hexadecimal RGB values.
Why use a hex calculator?
Manual hexadecimal arithmetic can become difficult when values are large or when you need to convert repeatedly between number systems.
A hex calculator helps you:
- avoid manual base-16 arithmetic
- verify programming calculations
- convert large hex values
- check binary equivalents
- understand hexadecimal math
- copy results quickly
- reduce mistakes with A–F digit values
This calculator also uses integer-safe calculations, which is useful when working with hexadecimal values larger than standard JavaScript numbers can represent precisely.
Related calculations
If you regularly work with number systems, you may also find these tools useful:
- Hex to Decimal Converter
- Decimal to Hex Converter
- Binary Calculator
- Binary to Decimal Converter
- Binary to Hex Converter
- Octal Calculator
- Bitwise Calculator
- ASCII to Hex Converter
Frequently Asked Questions
What is hexadecimal?
Hexadecimal is a base-16 number system that uses digits 0–9 and letters A–F.
What does A mean in hexadecimal?
Hexadecimal A represents decimal 10.
Similarly, B through F represent decimal values 11 through 15.
What is FF in decimal?
Hexadecimal FF equals decimal 255.
What is 100 in hexadecimal in decimal?
Hexadecimal 100 equals decimal 256.
Can I enter lowercase hexadecimal values?
Yes. Values such as ff, abc, and 0xff can be interpreted the same as uppercase hexadecimal values.
How do I convert hex to binary?
Convert each hexadecimal digit into four binary bits.
For example:
F = 1111
so:
FF = 11111111
Why do programmers use hexadecimal?
Hexadecimal represents binary data more compactly and is easier for humans to read. It is commonly used for memory addresses, bitmasks, colors, machine-level data, and debugging.
Is hexadecimal base 16?
Yes. Hexadecimal is also called base 16 because each digit can represent one of 16 possible values, from 0 through F.