Hex Calculator

Perform arithmetic and bitwise operations on hexadecimal numbers. Instant results in hex, decimal, octal, and binary.
Client-Side Only Instant Results

Calculations use exact BigInt arithmetic. NOT uses a 64-bit unsigned mask; shift counts are limited to 4,096 bits.

Quick Base Converter

Enter a value in any field — the others update automatically.

The hexadecimal basics guide explains positional values and binary grouping if you want to verify these conversions by hand.

Frequently Asked Questions

How do I add hexadecimal numbers?
Enter two hex values and select "Add". The tool computes the exact BigInt sum and shows it in hex, decimal, octal, and binary. For example, FF + 01 = 100 (hex) = 256 (decimal). Arithmetic is not limited by JavaScript's 53-bit Number range.
What operations does the hex calculator support?
Addition, subtraction, multiplication, integer division, modulo, AND, OR, XOR, NOT, and bit shifts (left/right). Inputs are non-negative integers, while subtraction can produce a negative result. NOT uses a predictable unsigned 64-bit mask; other operations use exact BigInt arithmetic.
Can I use the 0x prefix in inputs?
Yes. Enter hex values with or without the 0x prefix. "FF", "0xFF", and "0xff" are all valid and treated the same. The calculator auto-strips prefixes before computing.
What is the maximum value I can calculate?
BigInt keeps arithmetic exact beyond 2^53 - 1, with an input safety limit of 4,096 digits. The NOT operation specifically accepts unsigned 64-bit values up to 0xFFFFFFFFFFFFFFFF, and shift counts are limited to 4,096 bits.
How do I convert between hex, decimal, and binary?
Simply enter a value in any field (hex, decimal, or binary) and the other representations update automatically. For example, entering "255" in the decimal field shows "FF" in hex and "11111111" in binary.