How to Convert Decimal to Hexadecimal Manually Step by Step
Here is how to convert decimal to hexadecimal manually step by step: divide the number by 16 and write down the remainder. Divide the quotient by 16 again, recording each remainder until the quotient hits zero. Change remainders 10 to 15 into the letters A through F, then read the remainders from last to first. If you want instant results, our free number base converter converts decimal to hex in one click.
Why hexadecimal exists: the nibble connection
Hexadecimal (base 16) is the shorthand that computing settled on because it maps perfectly onto binary. Four binary digits — one nibble — can hold exactly 16 values (0000 through 1111), and one hexadecimal digit represents exactly those same 16 values. That is why hex shows up wherever binary data meets human eyes: CSS color codes like #FF5733 are three pairs of hex digits for red, green, and blue; memory addresses in debuggers and error logs are printed in hex; IPv6 addresses, MAC addresses, and Unicode code points all use hex notation. Converting a long binary string to hex is also trivial — just group bits into fours — which is exactly why you will sometimes see it called a stepping stone between machine bits and human-readable numbers. If you are working the other direction, our hexadecimal to decimal guide walks through the reverse conversion in the same detail.
The divide-by-16 remainder method
There is only one formula you need for manual decimal to hexadecimal conversion: repeatedly divide by 16 and collect remainders. Here is the full procedure. Step one: divide your decimal number by 16 using whole-number (integer) division. Write down the quotient and the remainder. Step two: if the quotient is greater than zero, divide that quotient by 16 and record the new quotient and remainder. Step three: repeat until the quotient is zero. Step four: convert each remainder to its hex digit. Remainders 0 through 9 stay as digits; remainders 10 through 15 become letters: 10=A, 11=B, 12=C, 13=D, 14=E, 15=F. Step five, the step people most often get wrong: read the remainders from the last one to the first — bottom-up. That sequence is your answer. Because base 16 needs 16 distinct symbols, the A-F mapping is simply counting past 9 without inventing a new glyph. Once you have the rhythm, even a five-digit decimal number takes less than a minute on paper.
Worked example 1: 255 becomes FF
Start small with 255, a number every web developer recognizes as the maximum value in a color channel. Divide 255 by 16: the quotient is 15 with a remainder of 15 (because 15 × 16 = 240, and 255 − 240 = 15). Write down: quotient 15, remainder 15. Now divide the quotient 15 by 16: the quotient is 0 with a remainder of 15. The quotient is zero, so we stop. The remainders are 15 and 15. Convert: 15 becomes F, 15 becomes F. Read them bottom-up — last remainder first — and we get FF. Quick sanity check: F is 15, so FF = 15 × 16 + 15 = 240 + 15 = 255. That lines up with our reverse-direction method: each hex digit, left to right, is worth a power of 16. Notice how 255 is exactly two F digits — FF is the biggest value two hex digits can hold, just as 99 is the biggest two decimal digits can hold.
Worked example 2: 2748 becomes ABC
Now a mid-size number that shows the A-B-C letter run in action. Divide 2748 by 16: the quotient is 171 with a remainder of 12 (171 × 16 = 2736; 2748 − 2736 = 12). Record: quotient 171, remainder 12. Divide 171 by 16: the quotient is 10 with a remainder of 11 (10 × 16 = 160; 171 − 160 = 11). Record: quotient 10, remainder 11. Divide 10 by 16: the quotient is 0 with a remainder of 10. We stop. Our remainders, in the order found, are 12, 11, 10. Convert them: 12 → C, 11 → B, 10 → A. Now read bottom-up — last remainder first — giving ABC. Verify by multiplying out, the habit that catches every careless slip: ABC = 10 × 256 + 11 × 16 + 12 = 2560 + 176 + 12 = 2748. Matches. For quick bulk conversions a decimal to hexadecimal converter saves the arithmetic, but walking through one example like this teaches the mechanism calculators hide.
Worked example 3: 4096 becomes 1000
Large numbers work exactly the same way — just more rounds. Convert 4096: divide by 16 to get quotient 256, remainder 0 (4096 ÷ 16 = 256 exactly). Divide 256 by 16: quotient 16, remainder 0. Divide 16 by 16: quotient 1, remainder 0. Divide 1 by 16: quotient 0, remainder 1. Stop. The remainders, in order found, are 0, 0, 0, 1. Read bottom-up: 1000. This is no coincidence: 4096 is 16³, so it is exactly 1 followed by three zeros in hex, the same way 1000 in decimal is 10³. Recognizing these powers — 16² = 256 (0x100), 16³ = 4096 (0x1000), 16&sup4; = 65536 (0x10000) — gives you instant landmarks when estimating hex values. If binary interests you too, the grouping trick is covered in our binary by hand guide and the sibling binary to decimal walkthrough.
Common mistakes and how to verify your answer
Three mistakes account for almost every wrong manual conversion. First, reading the remainders top-down instead of bottom-up — this is the single most common error, because everything in the work feels like a left-to-right process until the final read. Second, forgetting that A equals 10: a remainder of 10 is not the digit "10" (which would be two digits), it is A. Third, using regular division instead of integer division and quotient math, which scrambles the remainder values. The cure for all three is the verify-back step: multiply out your hex answer and confirm you land on the original number. Take the digits from left to right, multiply the leftmost by the highest power of 16, and add: for ABC we did 10 × 256 + 11 × 16 + 12 = 2748. If it does not match, retrace your divisions — the error is almost always a remainder read in the wrong order. Once this method feels natural, try hex color work: our hex to RGB conversion guide shows how the same two-digit grouping decodes web colors.
Do it in one click
Convert decimal to hex and back instantly with the free tool.
Open the Free Tool →