Decimalto Hexadecimal Converter
Free Decimalto hexadecimal Converter for numeral systems units. Enter a value to see equivalent measurements across systems.
Reviewed for accuracy by Manoj Kumar, Mathematics Educator
Decimalto Hexadecimal Converter
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: Hex = repeated division by 16, reading remainders bottom-to-top
Worked example โ 4096 (decimal) = 0x1000 (hex) = 1000000000000 (binary)
Formula
Hex = repeated division by 16, reading remainders bottom-to-top
Divide the decimal number by 16. Record the remainder as the rightmost hex digit (using A-F for 10-15). Continue dividing the quotient by 16 until it reaches 0. The hex digits collected from last to first form the result. For reverse conversion, multiply each hex digit by 16 to the power of its position and sum.
Worked Examples
Example 1: Decimal to Hex Conversion
Problem:Convert decimal 4096 to hexadecimal.
Solution:4096 / 16 = 256 remainder 0 256 / 16 = 16 remainder 0 16 / 16 = 1 remainder 0 1 / 16 = 0 remainder 1 Reading bottom to top: 1000
Result:4096 (decimal) = 0x1000 (hex) = 1000000000000 (binary)
Example 2: Hex Color to Decimal RGB
Problem:Convert hex color #3498DB to decimal RGB values.
Solution:R: 34 hex = 3x16 + 4 = 52 decimal G: 98 hex = 9x16 + 8 = 152 decimal B: DB hex = 13x16 + 11 = 219 decimal
Result:#3498DB = RGB(52, 152, 219)
Frequently Asked Questions
How do I convert hexadecimal back to decimal?
To convert hex to decimal, multiply each hex digit by 16 raised to the power of its position (starting from 0 on the right) and sum the results. For example, hex 2A3: the 3 is at position 0, A (10) is at position 1, and 2 is at position 2. So the decimal value is 3 times 16 to the 0 (which is 3) plus 10 times 16 to the 1 (which is 160) plus 2 times 16 to the 2 (which is 512), totaling 675.
How are hexadecimal colors used in web design?
In CSS and HTML, colors are specified using six hexadecimal digits in the format #RRGGBB, where RR is the red channel (0-255), GG is green, and BB is blue. Each pair of hex digits represents a color intensity from 00 (none) to FF (maximum). For example, #FF0000 is pure red, #00FF00 is pure green, #0000FF is pure blue, and #FFFFFF is white. Some formats also support an alpha channel as #RRGGBBAA for transparency.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎBinaryto Hexadecimal Converter
Calculate binaryto hexadecimal converter with inputs, formulas, and instant results.
๐งฎDecimalto Octal Converter
Calculate decimalto octal converter with inputs, formulas, and instant results.
๐งฎHexadecimal to Decimal Converter
Calculate hexadecimal to decimal converter with inputs, formulas, and instant results.
๐งฎTorque Unit Converter
Calculate torque unit converter with inputs, formulas, and instant results.
๐งฎElectrical Resistance Converter (ฮฉ, kฮฉ, Mฮฉ)
Calculate electrical resistance unit converter with inputs, formulas, and instant results.
๐งฎTime Unit Converter
Calculate time unit converter with inputs, formulas, and instant results.
๐งฎArea Converter
Calculate area converter with inputs, formulas, and instant results.
๐งฎAresto Hectares Converter
Calculate aresto hectares converter with inputs, formulas, and instant results.