Calculator Hero

Hexadecimal Calculator

Converts between hex, decimal, binary, and octal, and performs arithmetic on hexadecimal numbers with results in all four bases.

Last updated: June 11, 2026

Hexadecimal Calculator

Enter a number above to convert between hex, decimal, binary, and octal.

How to Use the Hexadecimal Calculator

This hexadecimal calculator has two modes — switch between Base Converter and Hex Arithmetic using the toggle at the top. In converter mode, select your input base (hex, decimal, binary, or octal), type your number, and instantly see it expressed in all four bases. In arithmetic mode, enter two hex numbers and choose an operation — the result appears in all four bases simultaneously.

Hex digits are case-insensitive — you can type 1a3f or 1A3F. The calculator accepts only valid digits for the selected base, so invalid characters are filtered automatically.

The Hexadecimal Number System

Hexadecimal is a positional numbering system with base 16. The 16 symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F where A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.

Each position represents a power of 16. The rightmost digit is 16⁰ = 1, the next is 16¹ = 16, then 16² = 256, and so on. To convert hex to decimal: multiply each digit by its positional power and sum. For 2F in hex: 2×16 + 15×1 = 32 + 15 = 47.

Hex and Binary Equivalence

Each hex digit corresponds to exactly four binary digits (bits):

  • 0 = 0000, 1 = 0001, 2 = 0010, 3 = 0011
  • 4 = 0100, 5 = 0101, 6 = 0110, 7 = 0111
  • 8 = 1000, 9 = 1001, A = 1010, B = 1011
  • C = 1100, D = 1101, E = 1110, F = 1111

This means you can convert between hex and binary digit by digit without any arithmetic. For our scientific notation calculator, large numbers like memory sizes are often expressed more compactly in hex than in decimal.

AdvertisementResponsive Ad

Converting Between Bases

Decimal to Hex

Divide the decimal number by 16 repeatedly, recording the remainders (in hex), then read from bottom to top. For 255: 255 ÷ 16 = 15 R15 (F); 15 ÷ 16 = 0 R15 (F) → FF. For 419: 419 ÷ 16 = 26 R3; 26 ÷ 16 = 1 R10 (A); 1 ÷ 16 = 0 R1 → 1A3.

Hex to Binary

Replace each hex digit with its 4-bit binary equivalent. For example, 3F = 0011 1111 in binary. To go back from binary to hex, group the bits into sets of 4 from right to left and convert each group.

Hex in Real-World Computing

Hexadecimal appears everywhere in computing and digital work:

  • Colors — HTML/CSS colors like #FF5733 encode red (FF = 255), green (57 = 87), blue (33 = 51) channels as byte pairs
  • Memory addresses — pointers in C and assembly are shown in hex (e.g., 0x7FFE4B20)
  • IP and MAC addresses — MAC addresses like 00:1A:2B:3C:4D:5E are six hex bytes
  • File formats — file headers (magic numbers) like FF D8 FF identify JPEG files
  • Unicode — code points like U+1F600 (😀) are expressed in hex

For number representation in other formats, see our decimal calculator.

AdvertisementResponsive Ad

Hex Arithmetic Examples

  • FF + 1 = 100 (hex) — decimal 255 + 1 = 256 = 1×256 + 0×16 + 0 = 100 in hex
  • 1A × 2 = 34 (hex) — decimal 26 × 2 = 52 = 3×16 + 4 = 34 in hex
  • 100 − FF = 1 (hex) — decimal 256 − 255 = 1
  • FF ÷ F = 11 (hex) — decimal 255 ÷ 15 = 17 = 1×16 + 1 = 11 in hex

Sources & References

  1. HexadecimalWikipedia
  2. Positional notationWikipedia

Frequently Asked Questions

Related Calculators

Advertisement

320 × 50 — Mobile Anchor