Skip to content
RK Calculator
Menu

Decimal to Hexadecimal Converter

Convert decimal numbers to hexadecimal, including fractions and negative numbers, with the working shown.

Change the values and press Calculate to work out your own figures.

Enter a decimal number to write it in hexadecimal.

About decimal numberFor example 170 or 10.625.
Result
In hexadecimal
AA
In binary
10101010
In octal
252

170 in decimal is AA in hexadecimal.

Show the working
  1. 170 ÷ 16 = 10 remainder 10 (A)
  2. 10 ÷ 16 = 0 remainder 10 (A)
  3. Read the remainders from the bottom up for the whole part
  4. 170₁₀ = AA₁₆

How to use it

Enter a decimal number to write it in hexadecimal.

Letters stand for digits above 9 (A = 10 … Z = 35) and can be typed in either case; prefixes such as 0b and 0x, spaces and underscores are ignored. Show the working gives each step.

Key facts

decimal → hexadecimal: place values Σ dᵢ × bⁱ; repeated division by the new base

How the conversion works

To decimal, multiply each digit by its place value (a power of the base) and add; from decimal, divide by the base repeatedly and read the remainders from the bottom up (for a fraction, multiply by the base and read off the whole parts).

Questions

What is 170 in hexadecimal?

AA.

Can I convert fractions?

Yes. Digits after the point are converted exactly; if they repeat forever in the new base, the repeating block is shown in parentheses.

Formulas

decimal → hexadecimal: place values Σ dᵢ × bⁱ; repeated division by the new base

Sources

Limitations

  • Numbers have at most 1,000 characters; Roman numerals cover whole numbers from 1 to 3,999,999.

Formula version 0.1.0Reviewed