Note that “decimal” and “denary” numbers both refer to the base-ten system. If you’re completely new to hexadecimal, you might want to review the basic concepts.

165 = 1,048,576 164 = 65,536 163 = 4,096 162 = 256 161 = 16 If the decimal number you’re converting is larger than 1,048,576, calculate higher powers of 16 and add them to the list.

For example, if you’re converting 495 to hexadecimal, you would choose 256 from the list above.

In our example, 495 ÷ 256 = 1. 93. . . , but we only care about the whole number 1. Your answer is the first digit of the hexadecimal number. In this case, since we divided by 256, the 1 is in the “256s place. "

Multiply your last answer by the divisor. In our example, 1 x 256 = 256. (In other words, the 1 in our hexadecimal number represents 256 in base 10). Subtract your answer from the dividend. 495 - 256 = 239.

239 ÷ 16 = 14. Once again, we ignore anything past the decimal point. This is the second digit of our hexadecimal number, in the “16s place. " Any number from 0 to 15 can be represented by a single hexadecimal digit. We will convert to the correct notation at the end of this method.

14 x 16 = 224. 239 - 224 = 15, so the remainder is 15.

The last “digit” of our hexadecimal number is 15, in the “1s place. "

Digits 0 through 9 remain the same. 10 = A; 11 = B; 12 = C; 13 = D; 14 = E; 15 = F In our example, we ended up with digits (1)(14)(15). In the correct notation, this becomes the hexadecimal number 1EF. You’re done! You’ve converted a decimal number to hexadecimal. You can also convert binary numbers to hexadecimal.

1EF → (1)(14)(15) Working right to left, 15 is in the 160 = 1s position. 15 x 1 = 15. The next digit to the left is in the 161 = 16s position. 14 x 16 = 224. The next digit is in the 162 = 256s position. 1 x 256 = 256. Adding them all together, 256 + 224 + 15 = 495, our original number.

For this example, let’s be ambitious and convert the decimal number 317,547. Calculate 317,547 ÷ 16 = 19,846, ignoring the digits after the decimal point.

To find the remainder, multiply your answer by the divisor, then subtract the result from the dividend. In our example, 317,547 - (19,846 x 16) = 11. Convert the digit into hexadecimal notation using the small number conversion chart at the top of this page. 11 becomes B in our example.

To find the remainder, multiply your answer by the divisor, then subtract the result from the dividend. In our example, 317,547 - (19,846 x 16) = 11. Convert the digit into hexadecimal notation using the small number conversion chart at the top of this page. 11 becomes B in our example.

In our example, 19,846 / 16 = 1240. Remainder = 19,846 - (1240 x 16) = 6. This is the second-to-last digit of our hexadecimal number.

Take the last quotient and divide by 16 again. 1240 / 16 = 77 Remainder 8. 77 / 16 = 4 Remainder 13 = D. 4 < 16, so 4 is the first digit.

Our final answer is 4D86B. To check your work, convert each digit back to a decimal number, multiply by powers of 16, and sum the results. (4 x 164) + (13 x 163) + (8 x 162) + (6 x 16) + (11 x 1) = 317547, our original decimal number. Next, check out how to convert hexadecimal numbers to binary or decimal.