Hex to Decimal Converter
Solve hex decimal problems step-by-step with our free calculator. See formulas, worked examples, and clear explanations.
Reviewed by Manoj Kumar, Mathematics Educator
Formula
Decimal = sum of (digit_value x 16^position) for each hex digit
Each hexadecimal digit is multiplied by 16 raised to the power of its position (counting from 0 on the right). The results are summed to produce the decimal equivalent. Hex digits A-F represent values 10-15.
Worked Examples
Example 1: Converting Hex 1A3F to Decimal
Problem:Convert the hexadecimal number 1A3F to decimal.
Solution:Break down by position (right to left):\nF (15) at position 0: 15 x 16^0 = 15 x 1 = 15\n3 at position 1: 3 x 16^1 = 3 x 16 = 48\nA (10) at position 2: 10 x 16^2 = 10 x 256 = 2,560\n1 at position 3: 1 x 16^3 = 1 x 4,096 = 4,096\nSum: 15 + 48 + 2,560 + 4,096 = 6,719
Result:1A3F (hex) = 6,719 (decimal)
Example 2: Converting Web Color #FF5733
Problem:Convert the hex color code FF5733 to its decimal RGB components.
Solution:Split into pairs: FF, 57, 33\nFF = 15 x 16 + 15 = 255 (Red)\n57 = 5 x 16 + 7 = 87 (Green)\n33 = 3 x 16 + 3 = 51 (Blue)\nFull hex FF5733 = 16,733,491 in decimal
Result:RGB(255, 87, 51) = Decimal 16,733,491
Frequently Asked Questions
How do you convert decimal to hexadecimal?
To convert decimal to hexadecimal, repeatedly divide the decimal number by 16 and record the remainders. The hex number is formed by reading the remainders from bottom to top. For example, converting 6719 to hex: 6719 divided by 16 = 419 remainder 15 (F), then 419 divided by 16 = 26 remainder 3, then 26 divided by 16 = 1 remainder 10 (A), then 1 divided by 16 = 0 remainder 1. Reading from bottom to top gives 1A3F. Remember that remainders 10-15 become letters A-F. This method works for any positive integer and can be verified by converting the result back to decimal.
References
Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy