Hex Calculator

Perform exact hexadecimal integer arithmetic and convert among hexadecimal, decimal and binary.

Your numbers

Live

Instant result. Updates while you type.

Your result

Updated now
—

Enter your numbers.

Hex calculator with arithmetic, decimal and binary conversion

Add, subtract, multiply or divide hexadecimal integers, or convert hex and decimal directly. Every result includes uppercase hex, decimal and binary.

Editorial checkCase-insensitive parsing, exact signed operations and three-base output checked with BigInt test vectors.Updated September 10, 2026Read the publication standard

Inputs used by this calculator

Hex Calculator uses the fields below. The starting values reproduce the page example; replace them with values from the same units and time period before using the result.

Field-by-field reference for Hex Calculator.
InputStarting exampleAccepted valueHow it is used
Operation modeHexadecimal arithmeticHexadecimal arithmetic · Hexadecimal to decimal · Decimal to hexadecimalChooses which Hex Calculator method or unknown the engine evaluates.
First hexadecimal integer2AText in the format shownSupplies the first hexadecimal integer quantity used by the published equation or result breakdown.
OperatorAddAdd · Subtract · Multiply · DivideSelects the unit or conversion path used by Hex Calculator.
Second hexadecimal integer10Text in the format shownSupplies the second hexadecimal integer quantity used by the published equation or result breakdown.
Decimal integer255Text in the format shownSupplies the decimal integer quantity used by the published equation or result breakdown.
One hex digit represents four bitsHex compresses binary groups: 0 through F represent decimal 0 through 15 and binary 0000 through 1111.1Hex digit2Four bits3Integer value
One hex digit represents four bitsHex compresses binary groups: 0 through F represent decimal 0 through 15 and binary 0000 through 1111.

What hexadecimal means

Hexadecimal is base 16. After 9, the digits A, B, C, D, E and F represent decimal 10 through 15.

Hex arithmetic

The same carrying and borrowing ideas used in decimal apply, but each column has sixteen possible digit values.

Hex and binary

Because 16 equals 2⁴, each hexadecimal digit maps exactly to four binary bits.

A₁₆=1010₂=10₁₀FF₁₆=11111111₂=255₁₀

Hex and decimal conversion

Multiply each digit value by 16 raised to its position. Decimal-to-hex repeatedly divides by sixteen and reads the remainders backward.

Worked addition example

2A₁₆ is 42 decimal and 10₁₆ is 16. Their sum is 58 decimal, written 3A₁₆.

Signed and color-code limits

A minus sign denotes a mathematical negative integer. This tool does not infer bit width, memory layout, CSS colors or alpha channels.

Hex digits above nine

Hex letters are case-insensitive on input and uppercase on output.
HexDecimalBinary
A101010
B111011
C121100
D131101
E141110
F151111

Frequently asked questions

Can I use lowercase hex?

Yes. Output is normalized to uppercase.

Do I need to type 0x?

No. The optional prefix is accepted but not required.

What is FF in decimal?

It is 255.

Does division show a remainder?

Yes.

Can results exceed 32 bits?

Yes. BigInt provides exact integer arithmetic within the input-length limit.

Does this calculate CSS colors?

No. It handles hexadecimal integers.

What to keep in mind

Whole signed integers only, up to 128 hexadecimal digits. Division returns quotient and remainder; fractional hex and fixed-width two's-complement interpretation are outside scope.

Results are rounded for display in US format, with money in dollars and cents; CSV exports keep full calculation precision. This is a calculation summary, not an official certificate.

Sources and references

Manage privacy choices