Hex Calculator

Fill in any one of the four fields (decimal, hex, binary or octal) and the others update instantly. A separate tool adds and subtracts hex numbers.

Quick Presets:

Instant Multi-Base Converter

Edit any field below — all other bases convert in real time!

Hexadecimal Arithmetic (+, -, ×, ÷)

Hex Result

Advertisement
Base 16: Digits 0-9 and letters A-F
One byte: Two hex digits = 8 bits
Conversions: Decimal, hex, binary, octal
Use case: Colors, memory addresses, machine code

Why hexadecimal matters

Hexadecimal is a base-16 system using digits 0-9 and letters A-F. Each hex digit represents four binary bits, which makes it a compact shorthand for binary data. The value FF equals 255 in decimal and 11111111 in binary.

Programmers use hex for memory addresses, color codes (like #FF0000 for red), and debugging because two hex digits exactly represent one byte. Converting between hex and binary is a simple digit-to-nibble mapping.

Converting between bases

To convert decimal to hex, divide by 16 repeatedly and read the remainders from bottom to top. For example 255 รท 16 = 15 remainder 15, giving FF.

The converter above works in all directions: fill in decimal, hex, binary or octal and the other three fields fill in automatically, so you never have to convert by hand.

How to use this calculator

  1. Fill in one of the four fields (decimal, hex, binary or octal).
  2. Press Convert and the other three fields fill in automatically.
  3. Use the second tool to add or subtract two hex numbers.
  4. Read the hex and decimal results together.

Pro tips

  • Color codes like #3498DB are hex: the first two digits are red, the next two green, the last two blue.
  • Use uppercase letters (A-F) for readability; lowercase is accepted too.
  • FF is 255 in decimal and 11111111 in binary โ€” a full byte.

Advantages & considerations

✅ Advantages

  • Four-way conversion in one view
  • Hex addition and subtraction included
  • Shows decimal values for every result

⚠️ Considerations

  • Negative hex results are shown with a minus sign
  • Very large values use standard 32-bit interpretation

Frequently asked questions

What is hexadecimal used for?
Hexadecimal is a compact way to write binary data. It is used for memory addresses, machine code, color values and error codes because two hex digits represent one byte.
How do I convert decimal to hex?
Divide the decimal number by 16 repeatedly, collecting remainders, then read them bottom to top. For example 255 becomes FF.
How do I convert hex to binary?
Replace each hex digit with its four-bit binary equivalent: F becomes 1111, so FF becomes 11111111.
What does FF mean in hex?
FF is the largest two-digit hex value, equal to 15ร—16 + 15 = 255 in decimal and 11111111 (one full byte) in binary.
Can I add hex numbers?
Yes. The arithmetic tool adds and subtracts hex numbers and shows the decimal result as well.