Decimal to Fraction Calculator

Quick answer

To convert a decimal to a fraction, write the decimal over a power of 10 (0.875 = 875/1000), then simplify by dividing top and bottom by their greatest common divisor. So 0.875 = 7/8 and 0.375 = 3/8.

Enter a decimal, get the simplified fraction, with the GCD steps shown.

Try 0.875, 2.5, or 0.333

Advertisement

How to convert a decimal to a fraction

Type any decimal number and press Calculate. The calculator writes it over the right power of 10, finds the greatest common divisor with the Euclidean algorithm, and divides top and bottom, showing each stage so the simplification is fully transparent.

Classics to try: 0.875 → 7/8, 0.5 → 1/2, 2.5 → 5/2, 0.125 → 1/8. Note that repeating decimals like 0.333… cannot be typed exactly, 0.333 converts to 333/1000, which is the honest answer for the digits you entered.

All computation happens in your browser via a deterministic engine, the same code produces the answer and the steps, so they can never disagree. No signup, no limits.

Decimal to fraction method (GCD simplification)

The method has two moves. First, count the decimal places n and write the number over 10n: 0.875 has three places, so 0.875 = 875/1000. Second, simplify by the GCD: GCD(875, 1000) = 125, so 875/1000 = 7/8. The Euclidean algorithm finds the GCD by repeated division with remainder, the calculator prints every line of it.

Pro tips

Terminating decimals always work: any finite decimal converts exactly, the only question is how far it simplifies. Watch for float artifacts: if your input came from another calculation (like 0.1 + 0.2 = 0.30000000000000004), round it first. Large denominators: 0.142857 converts to 142857/1000000, which simplifies to 1/7 only if you typed all six digits, precision in, precision out.

0.d₁d₂…dₙ = integer / 10ⁿ, then divide by GCD

Worked example

Example: 0.875 as a fraction

Step 1, Over a power of 10: 0.875 has 3 decimal places → 875/1000.

Step 2, GCD: GCD(875, 1000) = 125 (Euclidean algorithm: 1000 = 875 × 1 + 125; 875 = 125 × 7 + 0).

Step 3, Simplify: 875 ÷ 125 = 7, 1000 ÷ 125 = 8 → 7/8.

Check: 7 ÷ 8 = 0.875. ✓

More examples: 0.375 → 3/8; 1.25 → 5/4; 0.0667 → 667/10000.

Common mistakes

  • Typing 0.333 and expecting 1/3: the calculator converts the digits you typed, 0.333 is 333/1000, not 1/3. For exact repeating decimals, enter the fraction directly.
  • Forgetting to simplify: 875/1000 is correct but not finished, always divide by the GCD for lowest terms.
  • Miscounting decimal places: 0.875 needs 10³ = 1000, not 100. Each decimal place is one more zero.
  • Float noise: typing 0.1 + 0.2 style artifacts (0.30000000000000004) converts literally, round your input first.

When to use it

Cooking (0.75 cup = 3/4 cup), construction (decimal feet to fractional inches), sewing and woodworking measurements, and homework that demands “exact form” answers. Going the other direction? The fraction to decimal calculator handles that, including repeating decimals.

Full walkthrough: 0.625 on a tape measure

A caliper reads 0.625 in – what mark is that? Three decimal places gives 625/1000; GCD(625,1000) = 125; 625 div 125 = 5, 1000 div 125 = 8, so 5/8 in – right on the tape marks.

Key takeaway: count decimal places, write over 10^n, divide by the GCD. Three steps, always the same. When the decimal has many digits, the fraction may look unwieldy, that is honest; precision has a price. For cooking and construction, the nearest 1/16th is usually the practical answer.

Frequently asked questions

7/8. Write 0.875 as 875/1000 (three decimal places), then divide top and bottom by their GCD, 125: 875 ÷ 125 = 7, 1000 ÷ 125 = 8.

Count the decimal places n, write the digits over 10ⁿ, then simplify by dividing top and bottom by their greatest common divisor. The calculator above shows every step.

5/2 (or 2½). One decimal place gives 25/10; GCD(25, 10) = 5, so 25/10 simplifies to 5/2.

Only approximately, you can only type finitely many digits, so 0.333 becomes 333/1000. For the exact value 1/3, start from the fraction instead.

1/8. Three decimal places gives 125/1000; GCD(125, 1000) = 125, so 125/1000 simplifies to 1/8.

3/4. Two decimal places gives 75/100; GCD(75, 100) = 25, so 75/100 simplifies to 3/4.

Write 875/1000, find GCD(875, 1000) = 125 via the Euclidean algorithm, then divide: 875/125 = 7, 1000/125 = 8, giving 7/8. The calculator shows each Euclidean step.