✦ COMPUTER SCIENCE · BASE-16

Hex Calculator

Add, subtract, multiply, and divide hexadecimal numbers. Convert hex to decimal, binary, or octal — includes a live hex color tool and a full hex reference table.

Hex

Result

Base-10

Decimal

Base-2

Binary

Hexadecimal Arithmetic

Arithmetic Result

119

Hexadecimal

281

Decimal

100011001

Binary

431

Octal

0xFF + 0x1A = 0x119

Hex Reference Table (0-255)

DecHexDecHexDecHexDecHex
000101202303
404505606707
808909100A110B
120C130D140E150F
1610171118121913
2014211522162317
24182519261A271B
281C291D301E311F
3220332134223523
3624372538263927
40284129422A432B
442C452D462E472F
4830493150325133
5234533554365537
56385739583A593B
603C613D623E633F
6440654166426743
6844694570467147
72487349744A754B
764C774D784E794F
8050815182528353
8454855586568757
88588959905A915B
925C935D945E955F
9660976198629963
10064101651026610367
10468105691066A1076B
1086C1096D1106E1116F
11270113711147211573
11674117751187611977
12078121791227A1237B
1247C1257D1267E1277F
12880129811308213183
13284133851348613587
13688137891388A1398B
1408C1418D1428E1438F
14490145911469214793
14894149951509615197
15298153991549A1559B
1569C1579D1589E1599F
160A0161A1162A2163A3
164A4165A5166A6167A7
168A8169A9170AA171AB
172AC173AD174AE175AF
176B0177B1178B2179B3
180B4181B5182B6183B7
184B8185B9186BA187BB
188BC189BD190BE191BF
192C0193C1194C2195C3
196C4197C5198C6199C7
200C8201C9202CA203CB
204CC205CD206CE207CF
208D0209D1210D2211D3
212D4213D5214D6215D7
216D8217D9218DA219DB
220DC221DD222DE223DF
224E0225E1226E2227E3
228E4229E5230E6231E7
232E8233E9234EA235EB
236EC237ED238EE239EF
240F0241F1242F2243F3
244F4245F5246F6247F7
248F8249F9250FA251FB
252FC253FD254FE255FF

Understanding Hexadecimal Numbers

Hexadecimal (base-16) uses sixteen symbols per digit — 0 through 9, then A through F standing in for 10 through 15 — instead of the ten symbols decimal uses or the two binary uses. Computing adopted it because 16 is a power of 2 (2⁴), so every hex digit lines up perfectly with a 4-bit group of binary. That makes hex the standard, compact way to write memory addresses, machine code, and web color codes without drowning in long strings of 1s and 0s.

Place Values — Example: 0x2AF

DigitPositionPower of 16Value
22 (hundreds)16² = 2562 × 256 = 512
A1 (sixteens)16¹ = 1610 × 16 = 160
F0 (ones)16⁰ = 115 × 1 = 15

512 + 160 + 15 = 687 in decimal.

CONVERSION METHODS

Hex → Decimal: sum each digit × 16^position — 0x2AF = (2×256)+(10×16)+(15×1) = 687Decimal → Hex: divide by 16 repeatedly, read remainders bottom-up — 687 ÷ 16 = 42 r15(F) → 42 ÷ 16 = 2 r10(A) → 2 = 0x2AFHex ↔ Binary: swap each hex digit for its 4-bit group — 0x2AF = 0010 1010 1111

— FAQ

Frequently Asked Questions