Skip to main content

Hexadecimal & base 16

Hexadecimal Calculator: Arithmetic & Conversion

This calculator adds, subtracts, multiplies, and divides hexadecimal (base-16) values and converts between hex and decimal. Hex-to-decimal mode expands each digit by place value; decimal-to-hex mode shows repeated division by 16 with remainders mapped to A–F. Inputs use digits 0–9 and A–F without a 0x prefix, plus a 0–63 reference table. It stays within JavaScript safe integer limits and does not perform bitwise operations or arbitrary-precision hex.

By Jeff Beem

Updated

Mode

Choose a tool: hexadecimal arithmetic, hex-to-decimal, or decimal-to-hex. Digits: 0–9, A–F (values 10–15).

Hexadecimal arithmetic

Enter two hexadecimal values and choose an operator.

Hexadecimal arithmetic

FF + 10

10F (271 in decimal)

📋

Quick reference (0–63)

Hexadecimal, binary, and decimal

DecHexadecimalBinary
00000000
11000001
22000010
33000011
44000100
55000101
66000110
77000111
88001000
99001001
10A001010
11B001011
12C001100
13D001101
14E001110
15F001111
1610010000
1711010001
1812010010
1913010011
2014010100
2115010101
2216010110
2317010111
2418011000
2519011001
261A011010
271B011011
281C011100
291D011101
301E011110
311F011111
3220100000
3321100001
3422100010
3523100011
3624100100
3725100101
3826100110
3927100111
4028101000
4129101001
422A101010
432B101011
442C101100
452D101101
462E101110
472F101111
4830110000
4931110001
5032110010
5133110011
5234110100
5335110101
5436110110
5537110111
5638111000
5739111001
583A111010
593B111011
603C111100
613D111101
623E111110
633F111111

Reading your hex result

Pick a mode in the Choose mode dropdown first. The dark results panel and the white work box beside it change with each tool. The quick reference table at the bottom covers decimal, hex, and binary for 0–63.

Example: Hex arithmetic (default) → FF + 10 = 10F

In Hexadecimal arithmetic mode, the defaults are FF and 10 with operator +. The results panel reads 10F in hex (271 in decimal). Switch the operator for −, ×, or ÷; division floors to an integer when the decimal quotient is not whole.

Example: Hex to decimal → 2AA = 682

In Hexadecimal to decimal mode, default input 2AA expands by place value: 2×16² + 10×16 + 10 = 682. The Positional breakdown panel lists each term beside the dark results card.

Example: Decimal to hex → 682 = 2AA

In Decimal to hexadecimal mode, default input 682 shows repeated ÷16 steps with remainders A, A, 2 read right-to-left as 2AA. Use the Quick reference (0–63) table for small values without converting.

Nibbles in the reference table

The scrollable Quick reference (0–63) table at the bottom of the widget lists decimal, hex, and binary in three columns. Row 42 / 2A / 101010 shows how one byte (two hex digits) lines up with eight bits. Each hex digit in that table maps to four binary bits (one nibble), which is why programmers use hex to shorten binary in addresses and color codes.

Hexadecimal Calculator: Hex Arithmetic & Base-16 Conversion

This calculator performs hex arithmetic and base-16 conversion with step-by-step work panels. All computation runs locally in your browser within JavaScript safe integer limits.

What this calculator does

The widget supports three modes: hexadecimal arithmetic (+, −, ×, ÷ on two hex values), hexadecimal to decimal with a positional expansion panel, and decimal to hexadecimal with divide-by-16 steps. Results show in hex and decimal where both apply. A scrollable Quick reference (0–63) table lists decimal, hex, and binary columns. Inputs use digits 0–9 and A–F without a 0x prefix. Calculations stay within JavaScript safe integer range; the widget does not offer arbitrary-precision hex or bitwise operations.
  • Hex to decimal:
    D=k=0n1dk×16kD = \sum_{k=0}^{n-1} d_k \times 16^{k}
  • Decimal to hex:
    Repeatedly divide by 16; map remainders 10–15 to A–F; read digits last to first.

How the math works

Hexadecimal (base 16) uses sixteen symbols: digits 0–9 for zero through nine and letters A–F for ten through fifteen. Each column is a power of 16, with the rightmost digit at 16⁰. The canonical example on this page is 2AA in hex, which equals 682 in decimal.
To convert 2AA to decimal in Hexadecimal to decimal mode, multiply each digit by its place value: (2 × 16²) + (10 × 16¹) + (10 × 16⁰) = 512 + 160 + 10 = 682. The positional breakdown panel shows each term. To convert back, divide 682 by 16 repeatedly: remainder 10 (A), then 10 (A), then 2, read right to left as 2AA.
In Hexadecimal arithmetic mode, the widget converts both operands to decimal, applies the operator, and converts the answer back to hex when it is non-negative. With defaults FF (255) plus 10 (16), the sum is 271, which displays as hex 10F. Carries and borrows follow base-16 rules the same way base-10 arithmetic carries at ten.
One hex digit equals four binary bits (a nibble); two hex digits equal one byte (eight bits). That is why the quick reference table includes a binary column and why hex shortens long binary strings. For example, 2AA corresponds to the bit pattern 0010 1010 1010.

Limits of the model

This page uses JavaScript number arithmetic, not arbitrary precision. Integers beyond the safe range may round incorrectly. The widget rejects invalid characters, does not parse 0x prefixes, and shows decimal only (not hex) for negative arithmetic results. It does not perform bitwise AND, OR, XOR, or shift operations.

Hexadecimal Calculator FAQ

What does A mean in hexadecimal?

In hexadecimal (base 16), the letter A stands for decimal 10. Digits 0–9 keep their usual values; letters A–F represent 10 through 15. So hex 2AA equals (2 × 16²) + (10 × 16) + 10, which is 682 in decimal. The widget accepts A–F in any mode that takes hex input.

How many bits are in a hexadecimal digit?

One hex digit is exactly 4 bits (one nibble). Sixteen possible values (0–15) need 2⁴ bits, so two hex digits make one byte (8 bits). The Quick reference (0–63) table at the bottom of the widget shows decimal, hex, and binary side by side for quick lookup.

How do you convert decimal to hexadecimal in this calculator?

Choose Decimal to hexadecimal in the Choose mode dropdown. Enter a non-negative integer (default 682). The dark results panel shows the hex answer, and the white Decimal to hexadecimal steps box lists each divide-by-16 step with remainders read right to left. Default output: 2AA.

How do you convert hexadecimal to decimal here?

Choose Hexadecimal to decimal mode and enter hex digits (default 2AA). The results panel shows 682 in decimal. The Positional breakdown panel expands each digit times 16 raised to its place (rightmost digit uses 16⁰).

How does hex arithmetic work on this page?

Choose Hexadecimal arithmetic mode. Defaults: first number FF, operator +, second number 10. The widget converts both values to decimal, applies the operator, and displays the hex result 10F with decimal 271 in parentheses. Division uses integer floor when the quotient is not whole.

Do I need a 0x prefix for hex input?

No. Type digits 0–9 and letters A–F only (case-insensitive). The widget parses base 16 directly; a 0x prefix is not required and should not be typed.

What is the quick reference table for?

The scrollable Quick reference (0–63) table below the inputs lists decimal, hexadecimal, and binary for values 0 through 63. Use it to check a nibble or byte without switching modes, for example confirming that decimal 42 is hex 2A.

What are this calculator’s limits?

All math runs in JavaScript’s safe integer range; very large integers may lose precision. The widget does not accept a 0x prefix, fractional decimals in hex, or arbitrary-precision hex. Negative hex results in arithmetic mode show decimal only. It does not perform bitwise AND, OR, or shift operations.

Mathematical Reference Note

Calculation Logic: This tool uses standard mathematical algorithms. While we strive for accuracy, errors in logic or user input can result in incorrect data.

Verification: Results should be cross-checked if used for important academic, professional, or personal calculations.

Standard Terms: This tool is provided free of charge and as-is. CalcRegistry provides no warranty regarding the accuracy or fitness of these results for your specific needs.

© 2026 CalcRegistry Reference Last System Check: July 2026Free Online Utility Tools