By Philip Maus and Bogna Szyk
Last updated: Apr 14, 2021

This decimal to hexadecimal converter allows you to switch between numbers in their decimal and hexadecimal forms. Don't worry if you don't know what the hexadecimal system is – this article will provide you with all the information you need to perform these conversions correctly. If you ever wondered how to convert decimal to hexadecimal numbers, we will explain it to you and illustrate the conversion algorithm with easy-to-understand examples. Make sure to take a look at the binary to decimal converter and the binary to hexadecimal converter, too!

## What is the hexadecimal system?

The hexadecimal system is a numeral system that uses sixteen different digits. Our ordinary decimal system uses just ten digits, from 0 to 9. The hexadecimal also uses letters A, B, C, D, E, and F. These letters represent values from ten (A) to fifteen (F).

Programmers often use the hexadecimal system because it allows for concise representation of binary numbers. For example, the number `1111 1111` in binary can be represented as simply `FF` in hexadecimal. While the information is shown more compactly, binary operations like bit shifts and the bitwise operations AND, OR, and XOR can still be efficiently executed.

There are two main ways to represent hexadecimal numbers.

• The first one, most common in programming, is to use the prefix "0x". Then, the number FF will be written as 0xFF to inform the person reading the code that this number is hexadecimal.
• The second method is to use a subscript – for example, to write FF₁₆. Our decimal to hexadecimal converter does not include any of these notations, so keep that in mind when experimenting with how to convert decimal to hexadecimal numbers.

## How to convert decimal to hexadecimal?

You can use an algorithm that is easy to remember to convert numbers from the decimal to hexadecimal system:

1. Divide your initial decimal number by 16.
2. Note down the remainder in the hexadecimal notation. This will be the last digit of the hexadecimal number (the rightmost one).
3. Take the quotient. It is your new "initial number".
4. Keep repeating the above steps, each time adding the remainder to the left of previously obtained digits.

For example, for number `4987`, we would have the following steps:

1. `4987 / 16 = 311`, remainder `B`
2. `311 / 16 = 19`, remainder `7`
3. `19 / 16 = 1`, remainder `3`
4. `1 / 16 = 0`, remainder `1`

Reading from the bottom to the top, `4987` corresponds to `137B` in the hexadecimal system. Check this result with our hex calculator!

## How to convert hexadecimal to decimal?

1. Take the leftmost digit of your initial number. Multiply it by 16.
2. Add the next digit of the hexadecimal number. The sum will be your new "initial number".
3. Keep repeating these steps, each time first multiplying by 16 and then adding the last digit.

For example, for the hexadecimal number `243A`, we would have the following steps:

1. `2 * 16 = 32`
2. `(32 + 4) * 16 = 576`
3. `(576 + 3) * 16 = 9264`
4. `(9264 + 10) = 9274`

`243A` corresponds to `9274` in the decimal system. Check this result with the hexadecimal calculator!

## How to use the decimal to hexadecimal converter?

You know what a decimal and hexadecimal number is and how to convert one to the other. So let's take a look at the decimal to hexadecimal calculator and its use.

Don't worry; it is effortless. Type the decimal number you want to convert to hexadecimal in the field Decimal. And that's all!

If we try this with our example decimal number `4987` from above, we receive the expected hexadecimal result: `137B`.

By default, the converter is limited to 16 bit. If you need to change that, enter the advanced mode, and you will be able to define a bit range of up to 64.

## FAQ

### How do I convert the number 123 to hexadecimal?

To convert the number `123` to hexadecimal, do the following:

1. Divide by 16 and write down the remainder: `123 / 16 = 7` remainder `11`.
2. Convert the remainder to the hexadecimal notation. This will be the last digit of the hexadecimal number: `B`
3. Divide the quotient by 16: `7 / 16 = 0` remainder `7`.
4. Convert the remainder to the hexadecimal notation: `7`.
5. Since the remainder is 0, you are done. Your hexadecimal number is `7B`.

### How do I convert the number 3A to decimal?

To convert the number `3A` to decimal, follow these steps:

1. Take the leftmost digit of your initial number. Multiply it by 16: `3 × 16 = 48`.
2. Add the next digit of the hexadecimal number: `48 + 10 = 58`.
3. Your hexadecimal result is `58`.
Philip Maus and Bogna Szyk
You can enter a decimal number between -32,768 and 32,767.
Decimal
People also viewed…

### BMR - Harris-Benedict equation

Harris-Benedict calculator uses one of the three most popular BMR formulas. Knowing your BMR (basal metabolic weight), may help you make important decisions about your diet and lifestyle.

### Feet and inches

The feet and inches calculator is a simple tool for multiplying, dividing, subtracting and adding in feet and inches - including both fractions and decimals!

### Lat lon to UTM

This lat long to UTM converter takes geographical latitude and longitude coordinates and shows you the corresponding Universal Transverse Mercator (UTM) coordinate notation. 