Hex Calculator
Add, subtract, multiply and divide hexadecimal numbers, or convert between hex and decimal — with every step shown.
Hexadecimal calculation — add, subtract, multiply, divide
Convert hexadecimal to decimal
Convert decimal to hexadecimal
What is hexadecimal?
Hexadecimal — or hex — is a base-16 number system. Instead of the ten digits 0–9 used in the decimal system, hex uses sixteen symbols: the digits 0–9 followed by the letters A, B, C, D, E and F, which stand for the decimal values 10, 11, 12, 13, 14 and 15.
Because 16 is a power of 2 (16 = 2⁴), each hex digit maps to exactly four binary digits. That makes hex a compact, human-readable shorthand for binary — the string1111 1010 1100 1110becomes FACE. That's why hex shows up in color codes (#FF8800), memory addresses, MAC addresses, hash outputs and byte dumps.
Hex calculator, piece by piece
Each card explains one job the calculator does — reading a hex value into decimal, writing a decimal back into hex, and running the four arithmetic operations column-by-column in base 16.
Hex → decimal — how the digits are weighted
The rightmost hex digit is worth 1, the next 16, then 256 (=16²), and so on — the calculator multiplies every digit by its place value and sums. The letters A–F stand for 10–15, so a two-digit hex value fits the range 0–255, exactly one byte.
Decimal → hex — repeated division by 16
The reverse converter divides your decimal by 16, records the remainder (translating 10–15 back to A–F), and repeats on the quotient until it reaches zero. Reading the remainders bottom-up spells the hex value the calculator shows in the output.
Hex add & subtract — carry at 16, borrow 16
Hex addition uses the same column-by-column method as decimal, but the carry only fires when a column reaches 16, not 10. Subtraction borrows 16 from the next column. Under the hood the calculator runs the arithmetic in native big integers, then converts back to base 16 for display.
Hex multiplication — long multiply with the F×F table
Multiplication follows the same shift-and-add layout as decimal long multiplication — multiply the top by each digit of the bottom, then sum the shifted rows in hex. The 16×16 table above is the base-16 version of the times table and is what the calculator uses for the single-digit products.
Hex / decimal / binary quick reference
| Hex | Decimal | Binary (4-bit) |
|---|---|---|
| 0 | 0 | 0000 |
| 1 | 1 | 0001 |
| 2 | 2 | 0010 |
| 3 | 3 | 0011 |
| 4 | 4 | 0100 |
| 5 | 5 | 0101 |
| 6 | 6 | 0110 |
| 7 | 7 | 0111 |
| 8 | 8 | 1000 |
| 9 | 9 | 1001 |
| A | 10 | 1010 |
| B | 11 | 1011 |
| C | 12 | 1100 |
| D | 13 | 1101 |
| E | 14 | 1110 |
| F | 15 | 1111 |
| 14 | 20 | 0001 0100 |
| 3F | 63 | 0011 1111 |
| FF | 255 | 1111 1111 |
| 100 | 256 | 1 0000 0000 |
| 3E8 | 1000 | 11 1110 1000 |
Hexadecimal multiplication table
Features of this calculator
- Add, subtract, multiply and divide two hex values
- Convert hexadecimal to decimal with place-value working
- Convert decimal to hexadecimal via repeated division by 16
- Arbitrary-precision — handles very large hex numbers exactly
- Includes a hex/binary/decimal reference and a 16×16 multiplication table
Frequently asked questions
+What is hexadecimal used for?
Hex is the standard shorthand for binary in computing — color codes, memory addresses, MAC addresses, hashes and byte-level file dumps all use it because one hex digit cleanly represents four binary digits.
+How do I convert hex to decimal by hand?
Multiply each digit by 16 raised to its position from the right, replacing A–F with 10–15, and add the results. Example: 2AF = 2·256 + 10·16 + 15 = 687.
+Why does hex use letters?
Base 16 needs sixteen distinct symbols. The digits 0–9 only cover ten, so A–F were chosen for the extra six. Using existing keyboard characters keeps hex easy to type and print.
+Can I enter negative hex values?
Yes — put a minus sign in front (e.g. −1F). This calculator uses signed arithmetic rather than two's complement, so you write the sign explicitly instead of picking a bit width.
+How is this different from the Binary Calculator?
Same idea, different base. Use the Binary Calculator for base 2, or the Number Base Converter to switch between binary, octal, decimal and hex in one step.