Free developer tool

Free Hexadecimal Calculator

A hexadecimal calculator adds, subtracts, multiplies and divides base-16 numbers and shows the answer in hex, decimal and binary. Enter two hex values to calculate exactly, run bitwise AND, OR, XOR, NOT and shifts, see two's complement at 8 to 64 bits, and follow hex addition column by column.

Decimal to hex

= 0xFF

Result

1A + F =

29

Hex
0x29
Decimal
41
Binary
10 1001
Octal
51
32-bit register (two's complement)
0x00000029
Hex addition step by step (right to left)
ColumnDigits + carrySum (dec)WriteCarry
1A + F2591
21 + 0 + 1220

Hex digits in decimal and binary

HexDecimalBinary
000000
110001
220010
330011
440100
550101
660110
770111
881000
991001
A101010
B111011
C121100
D131101
E141110
F151111

How to use the hex calculator

  1. 1. Enter the first number

    Type a hex value such as 1A or 0xFF. Spaces, underscores, a 0x prefix and a leading minus sign are accepted.

  2. 2. Pick an operation

    Choose add, subtract, multiply, divide, AND, OR, XOR, NOT or a bit shift, and a register width for two's complement.

  3. 3. Enter the second number

    Type the second hex value, or the number of bits to shift by.

  4. 4. Read the result

    See the answer in hex, decimal, binary and octal, the remainder for division, and each carry for addition.

Hexadecimal calculator FAQ

What is a hexadecimal calculator?

A hexadecimal calculator does arithmetic on base-16 numbers, which use the digits 0-9 and A-F. It adds, subtracts, multiplies and divides hex values directly and shows the answer in hex, decimal and binary, so you do not have to convert by hand.

How do you add hexadecimal numbers?

Add one column at a time from the right, as in decimal. If a column adds up to 16 or more, write the sum minus 16 and carry 1 to the next column. For example, A + F = 25, so write 9 and carry 1. This calculator shows every column and carry for addition.

How do I convert decimal to hex?

Divide the decimal number by 16 and note the remainder, then repeat with the quotient until it reaches 0. The remainders read from last to first are the hex digits, with 10-15 written as A-F. 255 becomes FF. The decimal to hex box on this page does it instantly.

How are negative hex numbers shown?

Computers store negative numbers in two's complement: invert every bit and add 1. In 8 bits, -1 is FF and -16 is F0. Pick a register width to see a result as an 8, 16, 32 or 64-bit two's complement value, and whether it overflows that width.

Is there a size limit or rounding?

No rounding. The calculator uses exact big-integer arithmetic for inputs up to 256 hex digits, far beyond 64 bits. Division returns a whole quotient and a remainder. Everything runs in your browser and nothing is uploaded.

Automate the tedious parts of coding

Tornic turns repeatable tasks into deterministic workflows for the AI coding CLIs you already use.

Explore Tornic

Related free tools