Hex Calculator
Convert between hexadecimal, decimal, binary, and octal. Perform arithmetic on hex numbers.
About Hexadecimal
Hexadecimal (base 16) uses sixteen digits: 0–9 and A–F, where A=10, B=11, C=12, D=13, E=14, F=15. Each hex digit represents exactly four binary bits, making hex an extremely compact way to write binary values. For example, 0xFF = 1111 1111 in binary = 255 in decimal. This is why hex is ubiquitous in programming, from color codes (#RRGGBB) to memory addresses and file headers.
Hex arithmetic works just like decimal arithmetic, but digits roll over at 16 instead of 10. Adding A + 7 = 17 decimal = 11 hex, so you write 1 and carry 1. Modern compilers and assemblers handle hex arithmetic internally, but understanding it helps when debugging at the byte level or working with bitwise operations.
The relationship between hex and binary makes conversions trivial: substitute four bits per hex digit. F = 1111, E = 1110, D = 1101, etc. See our Binary Calculator for binary-focused operations. For very large integer arithmetic beyond JavaScript's safe integer range, use the Big Number Calculator.
Related Calculators
Explore more free online calculators to help with your calculations
Related Articles
Learn more about the math and strategy behind these numbers
Take this calculation further
Browse the math calculators collection for more tools in this subject.
For a related calculation, use Percentage Calculator to calculate percentages, percent change, and percentage of a number quickly and easily. Alternatively, use Binary Calculator to convert between binary, decimal, octal, and hexadecimal. Perform binary arithmetic with step-by-step working.
For the underlying method, read Binary and Hexadecimal Explained: A Beginner's Guide.
