Hex Calculator

Convert between number bases and perform hexadecimal arithmetic.

Number Base Converter

Hex Arithmetic

Result (Hex)
0
(= 0 decimal)

Color Preview

#
R: 255
G: 107
B: 53

How Hexadecimal Works

Hexadecimal (hex) is a base-16 number system using digits 0-9 and letters A-F. Each hex digit represents 4 binary bits, making it ideal for representing binary data compactly.

FF₁₆ = 15×16 + 15×1 = 255₁₀ = 11111111₂

Hex Digit Reference

HexDecBinaryHexDecBinary
000000881000
110001991001
220010A101010
330011B111011
440100C121100
550101D131101
660110E141110
770111F151111

Frequently Asked Questions

Why is hex used in programming? Hex compactly represents binary data — each hex digit maps to exactly 4 bits. A byte (8 bits) is two hex digits, making memory addresses, colors, and binary data easy to read.

How do hex colors work? HTML/CSS colors use #RRGGBB format where each pair is a hex value 00-FF (0-255 in decimal) representing red, green, and blue intensity.

Related Calculators