Hex Calculator

Hexadecimal arithmetic and bitwise operations

Add, subtract, multiply and divide hexadecimal numbers, or apply AND, OR, XOR, NOT and shifts, with results in hex, decimal, binary and octal.
Share
Try an example:
Your result will appear here as you type.

About Hex Calculator

Formula

Value = Σ digit × 16^position

Worked examples

FF + 1A

255 + 26 = 281 = 0x119.

How it works

  1. Hex digits 0-9 and A-F stand for 0-15; each place is a power of 16.
  2. Numbers are converted, combined and converted back.

What you need

  • Hex numbers (0x prefix optional).

Tips

  • Colour codes like #FF8800 are three hex bytes.
  • Masking with AND (e.g. & 0xFF) keeps the low byte.

Limitations

  • Whole numbers only.

Runs in your browser. Calculations run in your browser - nothing you enter is sent anywhere.

Definitions

Hexadecimal
Base 16.
Byte
8 bits, two hex digits.

Frequently asked questions

What is 0xFF in decimal?+

255 - the largest value of one byte.

Was this calculator helpful?