Math

Hexadecimal calculator

Settings
Reset
Share
Save
Embed
Report a bug

Share calculator

Add our free calculator to your website

Please enter a valid URL. Only HTTPS URLs are supported.


Use as default values for the embed calculator what is currently in input fields of the calculator on the page.


Input border focus color, switchbox checked color, select item hover color etc.


Please agree to the Terms of Use.

Preview

Save calculator

Calculator Settings

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Share calculator

What is a hexadecimal number?

A hexadecimal number is a number expressed in base 16, using the digits 0–9 to represent values zero to nine, and the letters A–F to represent values ten to fifteen. The hexadecimal system is widely used in computing and digital electronics because it provides a compact, human-readable representation of binary values.

For example, in the hexadecimal system:

  • The decimal number 10 is represented as A.
  • The decimal number 15 is represented as F.
  • The decimal number 255 is represented as FF.

Each hexadecimal digit represents four binary digits (bits), which makes conversion between binary and hexadecimal especially straightforward. This calculator allows users to perform addition, subtraction, multiplication, and division directly in hexadecimal form without manually converting between decimal and hex systems.

How the calculator works

This hexadecimal calculator simplifies arithmetic operations with hex numbers by following three main steps:

  1. Conversion to decimal (base 10) – Each hexadecimal input is converted to its decimal equivalent.
  2. Arithmetic operation – Addition, subtraction, multiplication, or division is performed on the decimal numbers.
  3. Conversion back to hexadecimal (base 16) – The resulting decimal value is converted back into hexadecimal notation.

The calculator handles multiple inputs simultaneously, which allows users to perform operations with two, three, or more hexadecimal numbers at once.

For instance, the operation 1A + F + 5 in hexadecimal involves three numbers and will produce the correct hexadecimal result in a single step.

If you need to convert numbers to hexadecimal number system, then use hexadecimal converter.

Step-by-step conversion

Example 1: Hexadecimal addition

Perform the addition 1A+F1A + F in hexadecimal.

Step 1. Convert to decimal:
1A16=1×161+10×160=26101A_{16} = 1 \times 16^1 + 10 \times 16^0 = 26_{10}
F16=1510F_{16} = 15_{10}

Step 2. Perform addition in decimal:
26+15=4126 + 15 = 41

Step 3. Convert result to hexadecimal:

DivisionInteger quotientRemainder
41 ÷ 1629
2 ÷ 1602

So the hexadecimal result is 291629_{16}.

Example 2: Hexadecimal subtraction

Compute 3CA3C - A in hexadecimal.

Step 1. Convert to decimal:
3C16=3×161+12×160=60103C_{16} = 3\times16^1 + 12\times16^0 = 60_{10} A16=1010A_{16} = 10_{10}

Step 2. Perform the subtraction in decimal:
6010=5060 - 10 = 50

Step 3. Convert to hexadecimal:

DivisionInteger quotientRemainder
50 ÷ 1632
3 ÷ 1603

So the hexadecimal result is 321632_{16}.

Result: 3CA=323C - A = 32

Example 3: Hexadecimal multiplication

Compute A×5A \times 5 in hexadecimal.

Step 1. Convert to decimal:
A16=1010A_{16} = 10_{10}

Step 2. Multiply in decimal:
10×5=5010 \times 5 = 50

Step 3. Convert to hexadecimal:

DivisionInteger quotientRemainder
50 ÷ 1632
3 ÷ 1603

So the hexadecimal result is 321632_{16}.

Example 4: Hexadecimal division

Compute 64/864 / 8 in hexadecimal.

Step 1. Convert to decimal:
6416=6×161+4×160=1001064_{16} = 6\times16^1 + 4\times16^0 = 100_{10}
816=8×160=8108_{16} = 8\times16^0 = 8_{10}

Step 2. Perform division in decimal:
100/8=12.5100 / 8 = 12.5

Step 3. Convert integer and fractional part to hexadecimal:
Integer part 1210=C1612_{10} = C_{16}.

Fractional part

MultiplicationResultRemainder
0.5 × 1680

So the hexadecimal result is C.816C.8_{16}.

Conversion table

HexDecimalBinary
000000
110001
220010
330011
440100
550101
660110
770111
881000
991001
A101010
B111011
C121100
D131101
E141110
F151111

Interesting facts about hexadecimal

  • The prefix “0x” is often used to indicate a hexadecimal value in programming languages (e.g., 0xFF).
  • HTML and CSS use hexadecimal codes to represent colors; for example, #FFFFFF is white and #000000 is black.
  • The memory addresses in most computer systems are represented in hexadecimal format because it maps neatly to binary data.
  • In early computers, hexadecimal helped programmers quickly read and debug binary machine code more easily.

Frequently Asked Questions

How to add multiple hexadecimal numbers like 1A + 2F + 3B?

Convert each number to decimal:
1A = 26, 2F = 47, 3B = 59.
Sum them: 26 + 47 + 59 = 132.
Convert back: 132 ÷ 16 = 8 remainder 4 → 84₁₆.
Result: 84.

Can hexadecimal numbers include fractional parts?

Yes. Fractional hexadecimal numbers use negative powers of 16.
Example: 0.A16=10×161=0.625100.A_{16} = 10 \times 16^{-1} = 0.625_{10}.

How to convert a large hexadecimal number like ABCD to decimal?

Expand:
A×163+B×162+C×161+D×160A \times 16^3 + B \times 16^2 + C \times 16^1 + D \times 16^0
=10×4096+11×256+12×16+13×1= 10 \times 4096 + 11 \times 256 + 12 \times 16 + 13 \times 1
=40960+2816+192+13= 40960 + 2816 + 192 + 13
=4398110= 43981_{10}

So the decimal result is 439811043981_{10}.

Report a bug

This field is required.