Digital ToolPad.

Runs 100% in your browser

Your data never leaves your device. zero uploads.

Hex Calculator

Enter two hexadecimal numbers and choose an operation. See the answer in hex, decimal, binary and octal.

  • + − × ÷ mod
  • AND · OR · XOR · NOT
  • Bit shifts
  • Results in 4 bases

What is a hex calculator?

A hex calculator does arithmetic and bitwise logic on base-16 numbers. Programmers use it to add offsets to memory addresses, combine bit masks, compute sizes and check checksums without converting to decimal first. This calculator accepts hex with or without a 0x prefix, supports + − × ÷ and remainder, AND, OR, XOR, NOT and shifts, and shows every result in hex, decimal, binary and octal.

How to use the hex calculator

  1. Enter the first hex number in A and the second in B. 0x prefixes are optional.
  2. Choose an operation.
  3. Read the result in hex, decimal, binary and octal.
  4. Copy the format you need.

Bitwise operations at a glance

  • AND: 1 only where both bits are 1. 1100 AND 1010 = 1000.
  • OR: 1 where either bit is 1. 1100 OR 1010 = 1110.
  • XOR: 1 where the bits differ. 1100 XOR 1010 = 0110.
  • NOT flips every bit within the chosen width. Shift left (<<) by n multiplies by 2ⁿ; shift right (>>) divides by 2ⁿ, rounding down.

Why use this hex calculator

  • Every operation in one placeArithmetic, bitwise logic and shifts, without switching tools.
  • Results in every baseSee the answer in binary, octal, decimal and hex at once.
  • No overflowArbitrary-precision integers, so large results are exact.
  • Private by designEverything is calculated in your browser. Nothing you type is sent to a server or saved.

Common uses

  • Memory addresses. Add an offset: 0x1000 + 0x2F4 = 0x12F4.
  • Masks and flags. Combine 0xF0 | 0x0F = 0xFF.
  • Sizes and ranges. Subtract start from end addresses.
  • Colours. Blend or mask colour channels.

Related converters: number base converter, hex to decimal, decimal to hex, binary to decimal, decimal to binary, hex to binary, binary to hex, binary calculator. Browse all encoding tools.

Example: hex addition

FF + 1A = 119 (hex) = 255 + 26 = 281 (decimal)

What to expect from the result

Integers only; division rounds toward zero and shows the remainder. NOT uses the bit width you choose (8–64 bits). Negative results are shown with a minus sign rather than as two’s complement; use the number base converter to see the bit pattern.

Hex Calculator questions

How do you add hex numbers?

Add column by column from the right. If a column reaches 16 or more, write the value minus 16 and carry 1. F + 1 = 10 (hex).

What is FF + 1 in hex?

100 in hex, which is 256 in decimal.

How do I subtract hex numbers?

Enter both values and choose −. Borrowing works in units of 16; the calculator handles it for you.

Can I use 0x prefixes?

Yes. 0xFF and FF are read the same way.

Does it do bitwise operations?

Yes: AND, OR, XOR, NOT (with a bit width) and left and right shifts.

100% private — your data never leaves your browser

No registration, no tracking of your content, no server uploads. Don't just take our word for it:

  • No server, no uploads

    Your files and text are processed entirely on your device. Nothing is ever sent to us.

  • Works offline

    Once loaded, this tool keeps working with your Wi-Fi turned off. Try it.

  • Verify it yourself

    Open your browser's DevTools → Network tab. You'll see zero requests carrying your data.

Explore more tools

More utilities for your next task.

Browse all tools