Decimal to fraction converter, including repeating decimals

Type a decimal, mark any repeating digits, and get the fraction in lowest terms, the mixed number and the steps, plus close simple fractions such as 22/7 for long decimals.

Live demo · real result from this tool
Mark repeating digits with brackets, e.g. 0.1(6), or use the field below.
For 0.1666… enter 0.1 above and 6 here, or 0.16 and 6.
Fraction1/6
Mixed number
1/6
Decimal
0.1(6)

Steps

x = 0.1(6)10^2·x − 10^1·x removes the repeating part:(10^2 − 10^1)·x = 15x = 15/90 = 1/6

Processed on your device — nothing is uploaded.

How to use the decimal to fraction converter

  1. Type the number in Decimal, for example 0.75 or 2.125.
  2. If the decimal repeats, either write the repeating block in brackets, such as 0.1(6), or type the repeating digits in Repeating digits at the end (optional).
  3. If the decimal does not repeat, leave the second box empty, as it starts.
  4. Read the Fraction and Mixed number, and follow the Steps.
  5. For long decimals, check the Simpler approximations table for a short fraction that is close enough.

What it does and when to use it

Converting decimals to fractions comes up in maths homework, in measuring (0.375 inch is 3/8 inch), in recipes and in exam questions on recurring decimals. Terminating decimals are easy once you know the trick; recurring ones need a little algebra, which this tool shows step by step.

To go the other way or to add and divide fractions, use the fraction calculator. For converting fractions into binary or hex, see the number base converter. The ratio simplifier reduces ratios with the same GCD method.

How it works

Terminating decimals. Write the digits over a power of ten, then divide top and bottom by their greatest common divisor (GCD). 0.75 = 75/100, GCD(75, 100) = 25, so 0.75 = 3/4.

Repeating decimals. If x has k digits after the point before the repeat starts and a repeating block of L digits, then 10^(k+L)·x − 10^k·x is a whole number. Dividing by 10^(k+L) − 10^k gives the fraction, which is then simplified.

Approximations. For denominators above 1,000, the tool expands the value as a continued fraction and lists each convergent with a denominator up to 100,000.

Step by step for 0.1666… (0.1 with repeating 6):

  1. Let x = 0.1666…
  2. Here k = 1 and L = 1, so multiply by 10² and by 10¹: 100x = 16.666… and 10x = 1.666…
  3. Subtract: 100x − 10x = 16.666… − 1.666…, so 90x = 15.
  4. Divide: x = 15/90.
  5. Simplify by 15: x = 1/6.

The tool’s steps show the same: (10^2 − 10^1)·x = 15 and x = 15/90 = 1/6.

Worked examples

A terminating decimal. 0.75 gives 3/4, with the step GCD(75, 100) = 25.

One repeating digit. 0.1 with repeating digit 6 gives Fraction: 1/6.

A long repeating block. 0.(142857) gives 142857/999999, which simplifies to Fraction: 1/7.

An approximation of π. 3.14159 is exactly 314159/100000. The approximations table lists 22/7 (error 0.00127) and 355/113 (error 0.00000292).

A mixed number. 2.125 = 2125/1000 = 17/8, shown as Mixed number: 2 1/8.

Limits and tips

  • A decimal typed without a repeat is treated as exact; 0.33 is 33/100.
  • A decimal typed with dots, such as 0.333…, is read as repeating, and the steps show the bracket form the tool used (0.(3)). For a negative number the steps work on the size and add the minus sign at the end.
  • The converter runs entirely in your browser.

Frequently asked questions

Why did 0.75 turn into 227/300?
The "Repeating digits at the end" box held a 6, so the tool read 0.75666… That box now starts empty; clear it whenever your decimal does not repeat, and 0.75 gives 3/4.
How do I enter a repeating decimal?
Three ways. Put the repeating block in brackets, as in 0.1(6). Or type the start in Decimal and the repeating digits in the second box, such as 0.1 and 6. Or type it with dots, such as 0.333..., which gives 1/3.
Why is 0.333 not exactly 1/3?
0.333 stops after three digits, so it equals 333/1000. Only the never-ending 0.333… equals 1/3. Mark the repeat to get 1/3.
What are the "simpler approximations"?
When the exact fraction has a denominator above 1,000, the tool lists the continued-fraction convergents. These are the best fractions for their size, such as 22/7 and 355/113 for 3.14159, with the error of each.
Does it work for negative numbers and whole parts?
Yes. 2.125 gives 17/8, or 2 1/8 as a mixed number, and −1.25 gives −5/4, or −1 1/4.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close