π
H₂O
α

Hexadecimal Calculator

Calculate with hexadecimal numbers and convert between hexadecimal and decimal.

Hexadecimal calculation – Addition, Subtraction, Multiplication or Division

Result

Hexadecimal value:

Decimal value:

Convert Hexadecimal to Decimal

=

Convert Decimal to Hexadecimal

=

The Hexadecimal System

The hexadecimal system (or hex) is a base-16 number system with 16 different symbols: the digits 0 to 9 and the letters A to F. Each hexadecimal digit corresponds to 4 bits (a nibble) in binary, making it particularly well-suited for computing.

Conversion Table

HexadecimalBinaryDecimal
000000
100011
200102
300113
401004
501015
601106
701117
810008
910019
A101010
B101111
C110012
D110113
E111014
F111115

Convert Decimal to Hexadecimal

To convert a decimal number to hexadecimal, divide the number repeatedly by 16 and note the remainders. The remainders read from bottom to top give the hexadecimal number. Example:

1500 in Hexadecimal:
1500 ÷ 16 = 93 Remainder 12 (C)
93 ÷ 16 = 5 Remainder 13 (D)
5 ÷ 16 = 0 Remainder 5
Result: 5DC

Convert Hexadecimal to Decimal

To convert a hexadecimal number to decimal, multiply each digit by the corresponding power of 16 (starting from the right) and add the results. Example:

2AA in Decimal:
2 × 16² + 10 × 16¹ + 10 × 16⁰
= 2 × 256 + 10 × 16 + 10 × 1
= 512 + 160 + 10
= 682

Applications in Computing

The hexadecimal system is frequently used in computing because it compactly represents binary values. One hexadecimal digit corresponds exactly to 4 bits, which makes reading and writing binary data easier. Used for example in:

  • RGB color codes (e.g. #FF0000 for red)
  • Memory addresses
  • Program debugging
  • Unique identifiers (UUID)

Quick Guide to Hexadecimal

Base 16 uses 0–9 and then A–F (A=10, B=11, …, F=15). The 0x notation is common in computing for memory addresses, colors and codes.

  • Decimal → Hex: repeated division by 16, read remainders from bottom to top.
  • Hex → Decimal: sum of digits × 16ⁿ according to position.
  • Binary relation: 1 hex digit = 4 bits, so 2 hex digits = 1 byte.

1500₁₀ → 5DC₁₆ (Remainders 12=C, 13=D).

2AA₁₆ → 2×16² + 10×16¹ + 10×16⁰ = 682.

0xFF → 255 in Decimal, 11111111 in Binary.

Tip: For verification, convert back to decimal and compare. Errors often occur due to incorrect position of powers of 16.

Need a detailed explanation (division by 16, 0x notation, binary relation)? Ask the Math AI assistant.