Free Hex Calculator & Hexadecimal Converter

Free hex calculator for adding, subtracting, multiplying and dividing hexadecimal numbers of any size, with bitwise operations and step-by-step hex to decimal.

  • No upload, 100% private
  • Instant, in your browser
  • 100% free, no signup
Loading tool…
Read the complete guideHow to Add and Subtract Hexadecimal Numbers (With Offsets and Masks) →

About the Hex Calculator tool

Hexadecimal packs four binary digits into one symbol from 0–9 and A–F, which is why it appears in memory addresses, colour codes, MAC addresses, error codes, hashes and file dumps. Adding two addresses, finding the distance between offsets or masking a register value all require arithmetic in base 16, and doing that by converting everything to decimal and back is slow and error-prone.

This hex calculator works directly in hexadecimal. The arithmetic tab adds, subtracts, multiplies and divides hex numbers of any size using exact big-integer maths, then shows the answer in hex, decimal, binary and octal. Addition is laid out column by column with the carries marked, and multiplication shows the partial product for each hex digit of the second number.

The convert tab takes a number written in hex, decimal, binary or octal and shows all four forms together with the working: hex to decimal is expanded as digit × 16 to the power of its position, and decimal to hex is done by repeated division by 16, reading the remainders upwards. A bitwise tab handles AND, OR, XOR, NOT and shifts on 8- to 64-bit values. Prefixes such as 0x are accepted.

How to use Hex Calculator

  1. Pick “Hex arithmetic”, “Convert hex ↔ decimal ↔ binary” or “Bitwise”.
  2. For arithmetic, enter two hex numbers (0x prefix optional) and choose add, subtract, multiply or divide.
  3. For conversion, choose what base the input is written in and type the number.
  4. For bitwise operations, choose the operation and bit width and enter A and B.
  5. Copy any result with the copy icons, and open “Show steps” for the working.

Features

Any-size hex arithmetic

Big-integer maths keeps 64-bit and longer values exact.

Carries and partial products

See hex column addition and long multiplication laid out like handwritten work.

Four-way conversion

Hex, decimal, binary and octal side by side, with digit grouping for readability.

Conversion steps

Positional expansion for hex → decimal and repeated division for decimal → hex.

Bitwise operations

AND, OR, XOR, NOT, NAND, NOR and shifts within a chosen bit width.

When to use it

  • Add an offset to a base memory address while debugging.
  • Convert a hex error code or Windows HRESULT into decimal.
  • Mask the low byte of a register value with AND 0xFF.
  • Check hex subtraction homework in a digital systems course.
  • Work out how many bytes lie between two addresses in a hex dump.

Frequently asked questions

How do you convert hex to decimal?

Multiply each digit by 16 raised to its position (counting from 0 on the right) and add. 2F = 2 × 16 + 15 = 47.

How do you convert decimal to hex?

Divide by 16 repeatedly and write down the remainders (10–15 become A–F), then read them from last to first. 255 ÷ 16 = 15 r 15, so 255 = FF.

How does hex addition work?

Add digit by digit from the right. If a column sum reaches 16 or more, write the sum minus 16 and carry 1. For example F + 1 = 10 in hex.

Can I enter negative hex numbers?

Yes, with a leading minus sign in the arithmetic tab. The bitwise tab converts negative values to two's complement for the chosen width.

Is there a size limit?

Inputs can be up to 4,096 digits, far beyond 64-bit values. Everything is computed exactly in your browser.

Related tools