MultiConvers

Hex Calculator

Convert a hexadecimal integer to decimal, write a decimal integer in hex, or do integer arithmetic on two hex values.

How it works

Hexadecimal is base 16. Digits run 0–9 then A–F (10–15). FF₁₆ = 15×16 + 15 = 255. Arithmetic is integer-only and stays inside the safe-integer range so the hex spelling and the decimal agree.

Division must come out exactly; 5 ÷ 2 has no hex integer result on this page. Case does not matter: ff and FF are the same number.

Formula

FF₁₆ = 15×16 + 15 = 255₁₀
A₁₆ × 2₁₆ = 14₁₆ (10 × 2 = 20)

Worked examples

  • Decimal to hex

    255 ff

  • Multiply two hex numbers

    A × 2 14 (decimal 20)

Useful notes

  • This is not a color-picker and does not parse #RRGGBB strings with a leading hash.
  • For base 2 instead of base 16, use the binary calculator.

FAQ

What letters are valid in hex?

A through F, in either case. A is 10, B is 11, …, F is 15.

How do I convert hex to decimal?

Expand by place value. 1A = 1×16 + 10 = 26.

Can I enter a hash color like #FF8800?

No. Drop the # and treat each channel separately, or paste the hex integer without decoration.

Related tools

See all Math tools.