Hex Calculator
Free hex calculator: add, subtract, multiply, divide, AND/OR/XOR, NOT, shift, and convert between hex, decimal and binary. Works in any base for both operands.
How to Calculate Hexadecimal?
Hexadecimal (base-16) is a number system that uses 16 symbols: 0-9 and A-F. It's commonly used in computer programming and digital systems. Each position represents a power of 16.
Converting Hexadecimal to Decimal:
- Write down the hexadecimal number
- Multiply each digit by 16 raised to the power of its position (from right to left, starting at 0)
- Add all the results together
0xFF = 15×16¹ + 15×16⁰ = 240 + 15 = 255
Converting Decimal to Hexadecimal:
- Divide the decimal number by 16
- Write down the remainder (convert 10-15 to A-F)
- Continue dividing the quotient by 16 until it becomes 0
255 ÷ 16 = 15 remainder 15 → F
15 ÷ 16 = 0 remainder 15 → F
Result: 0xFF
Hexadecimal reference table
| Decimal | Hexadecimal | Binary |
|---|---|---|
| 0 | 0x0 | 0000 |
| 1 | 0x1 | 0001 |
| 10 | 0xA | 1010 |
| 15 | 0xF | 1111 |
| 16 | 0x10 | 10000 |
| 255 | 0xFF | 11111111 |
| 256 | 0x100 | 100000000 |
About this hex calculator
Enter two numbers in any combination of bases — hex, decimal, or binary — pick an operation, and the calculator returns the result simultaneously in hex, decimal and binary. Arithmetic operations (+, −, ×, ÷, exponent) are handled with BigInt, so very large hex values like 0xFFFFFFFFFFFFFFFF work without precision loss. Bitwise operations (AND, OR, XOR, NOT, left shift, right shift) operate on the integer representation, matching what C/JavaScript/Python would compute on the same inputs. Everything runs in your browser — no inputs are uploaded.
Frequently Asked Questions

