Hex Calculator

Add, subtract, multiply and divide hexadecimal numbers, use AND/OR/XOR and shifts, and convert hex to decimal, binary and octal.

Calculator

Was this tool useful?

About this tool

About Hex Calculator

A calculator for programmers and students working in base 16. Do arithmetic directly in hex, or switch to Convert mode to change between hex and decimal of any size.

How it works

Hex uses 16 digits: 0–9 then A=10 … F=15. Each hex digit equals 4 binary bits. Large values use exact BigInt arithmetic.

Example

1F4 + A3 = 297 (500 + 163 = 663 in decimal).

How to use this tool

  1. Choose Calculate or Convert.
  2. Enter hex numbers (0–9, A–F; 0x is optional).
  3. Read the hex answer with decimal and binary versions.

Frequently asked questions

How do I convert hex to decimal by hand?

Multiply each digit by 16 to the power of its position from the right and add them: 1F4 = 1×256 + 15×16 + 4 = 500.

Are negative hex numbers supported?

Results can be negative after subtraction, and Convert mode accepts a minus sign.

Do I need to sign up?

No. The calculator is free, works in your browser and nothing you type is stored.

Can I use the Hex Calculator for homework?

Yes. The Hex Calculator shows the answer and, where possible, the method, so you can check your own working. Teachers usually want to see the steps, so use it to learn the method rather than only copying the answer.