PERSONAL FINANCE · 206 TOOLS · 0 SIGN-UP
TallyBench / Hex Calculator
// HEX CALCULATOR

Add, subtract, multiply, or convert hexadecimal values.

Enter two hex values and an operation, or convert a single value between hex and decimal.

Educational tool. Double-check critical calculations independently.
Result (hex)0
Result (decimal)0
//

Hex ↔ Decimal conversion

Convert a single value between the two number systems.

Decimal value0

How do I convert hex to decimal?

Each hex digit represents a power of 16 based on its position, counting from the right starting at 16⁰, with the letters A-F standing in for the values 10-15. Multiply each digit's value by its positional power of 16 and add them up: hex 1A = 1×16¹ + 10×16⁰ = 16 + 10 = 26 in decimal.

Why is hexadecimal used in computing?

Hex gives a compact, human-friendly way to represent binary data — each hex digit corresponds to exactly 4 binary bits (a "nibble"), so a full 8-bit byte is always exactly 2 hex digits. That makes hex far shorter to read and write than the equivalent binary string, which is why it's the go-to notation for memory addresses, color codes (like #1A2B3C), and raw byte-level data throughout computing.

How does hex addition work?

Hex addition carries the same way decimal addition does, just rolling over to a carry once a column passes F (15) instead of 9. This tool handles that automatically by converting each hex value to decimal, performing the arithmetic normally, and converting the sum back to hex.

What's the largest single hex digit?

F, representing the decimal value 15 — the largest value a single hex digit can hold, the same way 9 is the largest single decimal digit. Two hex digits together (00-FF) cover the full range of one byte, 0-255 in decimal.

Worked example: adding hex 1A (26) and 2F (47): 26 + 47 = 73, which is 49 in hex. Converting FF to decimal: F×16¹ + F×16⁰ = 15×16 + 15×1 = 240 + 15 = 255, the maximum value a single byte can hold.

Why base 16 exists

Hexadecimal uses sixteen digits — 0-9 then A-F, where A is 10 and F is 15. Its value is that one hex digit maps exactly to four binary digits, so two hex digits describe one byte precisely. FF is 255, the largest value a byte holds. 2A is 42.

That clean mapping is the entire reason hex is used rather than, say, base 12. Converting between binary and hex needs no arithmetic at all, just substitution — whereas converting binary to decimal requires real calculation.

Converting by hand

Hex to decimal: multiply each digit by 16 raised to its position, counting from zero on the right. 2A = (2 × 16) + 10 = 42. FF = (15 × 16) + 15 = 255.

Decimal to hex: divide repeatedly by 16, and read the remainders bottom to top. It is the same algorithm as any base conversion, and doing it once by hand makes the rest obvious.

Where you'll meet it

Notation and common mistakes

Prefixes signal the base: 0x1F in C, JavaScript and Python; #1F for colours; 1Fh in assembly. Without a prefix, a value like "10" is genuinely ambiguous — it is ten in decimal and sixteen in hex.

Hex is case-insensitive: FF and ff are the same value. And do not confuse a hex digit with a decimal one — B is 11, not eleven-something. If a converted value looks wildly wrong, this is usually why. For base 2, use the Binary Calculator.

Looking for hex colour codes rather than base-16 arithmetic? The Colour Converter handles HEX, RGB and HSL and checks WCAG contrast.