Decimal to Fraction Calculator

Decimal to Hexadecimal Converter — Free Online

Enter a decimal fraction below to instantly convert it to its hexadecimal representation with a detailed step-by-step breakdown.

Visual Representation

Base-10 → Base-16 digits
Enter a number…
Value as proportion of 1
0%

How to Convert Decimal Fractions to Hexadecimal

To convert a decimal number with a fractional part to hexadecimal, you split the number into its integer and fractional parts and convert them separately.

Steps

  1. Separate the number into the integer part and the fractional part.
  2. Convert the integer part to hex by repeatedly dividing by 16 and recording the remainders (0-9, A-F).
  3. Convert the fractional part to hex by repeatedly multiplying by 16 and recording the integer part of the result.
  4. Combine the two hex parts with a decimal point.

Example

254 ÷ 16 = 15; remainder: 14 (E)
15 ÷ 16 = 0; remainder: 15 (F)
254 = FE₁₆

Common Conversions

Decimal Hexadecimal
0.06250.1
0.1250.2
0.250.4
0.50.8
0.750.C

Frequently Asked Questions

Common questions about hexadecimal system, base-16, color codes, programming uses

01 What is the hexadecimal system?

Hexadecimal (base-16) uses 16 symbols: digits 0–9 plus letters A–F (where A = 10, B = 11, …, F = 15). Each hex digit maps to exactly 4 binary bits, making hex a compact way to read binary data. For example, hex FE = 1111 1110 in binary = 254 in decimal.

02 Why is base-16 so common in programming?

Since 16 is a power of 2, each hexadecimal digit perfectly represents 4 binary bits (a nibble). This makes it much more compact and easier to read than long strings of 1s and 0s.

03 How are hexadecimal numbers used in web colors?

CSS and HTML define colors with 6-digit hex codes like #FF5733. The six digits form three pairs: the first pair is the Red channel (FF = 255), the second is Green (57 = 87), and the third is Blue (33 = 51). Each channel ranges from 00 (0, no intensity) to FF (255, full intensity). So #000000 is black and #FFFFFF is white.

04 What do the letters A through F represent in hexadecimal?

In base-16, the digits 0-9 represent their standard decimal values, while A represents 10, B is 11, C is 12, D is 13, E is 14, and F is 15.

05 How do you convert a decimal fraction to hex?

Split the number into integer and fractional parts. For the integer, divide by 16 repeatedly, collecting remainders. For the fractional part, multiply by 16 repeatedly, taking the integer portion each time (converting 10–15 to A–F). Example: 0.5 × 16 = 8.0, so 0.5 in hex is 0.8. For 254.5: integer 254 = FE, fraction 0.5 = 0.8, result = FE.8₁₆.

|