Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Decimal to Fraction Converter

Decimals, repeating decimals, fractions and percents — converted exactly, with the method.

Math No upload Works offline Free, no sign-up

Repeating decimals: put the repeating digits in brackets, 0.1(6), or type them twice and ... (0.1666...).

Try:

Result

As a fraction —

—Fraction
—Mixed number
—Decimal
—Percent

Next steps

About the Decimal to Fraction Converter

Type a decimal such as 0.375, a repeating decimal such as 0.1(6) or 0.1666…, a fraction such as 3/8 or 1 3/4, or a percentage such as 37.5%. You get the simplified fraction, the mixed number, the exact decimal (with the repeating digits marked) and the percentage, plus the working: place value for terminating decimals, the algebra method for repeating ones, and long division with remainders for fractions.

Two extra modes cover common practical needs. Best fraction finds the closest fraction with a denominator no bigger than you choose, using continued fractions — that is how π ≈ 22/7 and 355/113 are found. Inch fractions rounds a decimal inch or millimetre measurement to the nearest 1/16, 1/32 or 1/64 inch for tape measures and drill charts.

How to use it

  1. Choose Convert, Best fraction or Inch fractions.
  2. Type the number. For a repeating decimal put the repeating digits in brackets — 0.1(6) means 0.1666… — or type them at least twice followed by ....
  3. Read the answer in every form, then follow the Working to see how it was found. Copy copies the fraction; Copy working copies the steps.
  4. In Best fraction, set the largest denominator you will accept. In Inch fractions, pick the unit and the precision of your ruler.

Examples

A terminating decimal
Input
0.375
Result
3/8 = 37.5%

0.375 is 375 thousandths: 375/1000, and dividing both by 125 gives 3/8.

A repeating decimal
Input
0.1(6)   (that is 0.1666…)
Result
1/6 = 16 2/3%

Let x = 0.1666…; then 100x − 10x = 16.666… − 1.666… = 15, so 90x = 15 and x = 15/90 = 1/6.

A fraction to a decimal
Input
5/12
Result
0.41(6), i.e. 0.41666… = 41.666…%

Long division gives 0.4166…; the remainder 8 keeps coming back, so the 6 repeats.

Best fraction for π with denominators up to 1,000
Input
π, largest denominator 1000
Result
355/113 ≈ 3.14159292 (off by about 2.7 × 10⁻⁷)
0.8 inch on a 1/16″ tape measure
Input
0.8 in, nearest 1/16
Result
13/16″ (0.8125″, 0.0125″ = 0.3175 mm long)

Common uses

  • Checking homework on repeating decimals and percentages.
  • Turning a measurement such as 7.9375 mm or 0.3125″ into a fraction of an inch.
  • Finding a simple gear or pulley ratio close to a target number.
  • Turning a rounded calculator result such as 0.428571428 back into the fraction 3/7 with Best fraction.

How each conversion works

  • Terminating decimal → fraction: a decimal with k digits after the point is that many digits over 10^k (0.375 = 375/1000). Divide the top and bottom by their greatest common factor to simplify.
  • Repeating decimal → fraction: if x has k non-repeating and p repeating decimal digits, then 10^(k+p)·x and 10^k·x have the same repeating tail, so subtracting them leaves a whole number. For 0.1(6): 100x − 10x = 15, so x = 15/90 = 1/6.
  • Fraction → decimal: long division. Each remainder is multiplied by 10 and divided again; when a remainder comes back, the digits from that point repeat forever.
  • Percent: percent means per hundred, so divide by 100 to get a decimal or fraction, and multiply by 100 to go back.

Which fractions repeat?

Write the fraction in lowest terms and factorise the denominator. If its only prime factors are 2 and 5, the decimal terminates (3/40 = 0.075, because 40 = 2³ × 5). Any other prime factor makes it repeat: 1/6 = 0.1666… because 6 = 2 × 3. A repeating block of 9s is a special case: 0.999… equals 1 exactly, and 0.4999… equals 0.5.

Best rational approximations

Every number has a continued fraction, x = a₀ + 1/(a₁ + 1/(a₂ + …)), written [a₀; a₁, a₂, …]. For π it starts [3; 7, 15, 1, 292, …]. Cutting it off after each term gives the convergents 3, 22/7, 333/106, 355/113, …, which are the best approximations for the size of their denominators. The closest fraction with a denominator up to your limit is either the last convergent within the limit or a semiconvergent between two convergents; the tool checks both (Hardy & Wright, An Introduction to the Theory of Numbers, 6th ed., ch. 10). For π, e, √2, √3 and φ it uses their values to 62 decimal places.

Fractions of an inch

The inch is defined as exactly 25.4 mm, so millimetres convert without rounding: 10 mm = 50/127 in. The measurement is then rounded to the nearest multiple of the precision you choose (halves round up), reduced to lowest terms — 8/16″ is shown as 1/2″ — and the difference is shown in inches and millimetres so you know how far off the mark is.

Limitations

  • Numbers can have up to 60 digits. Scientific notation (2.5e-3) is not accepted — type the number in full.
  • With “…” the repeating block must appear at least twice (0.1666…, 0.1212…), otherwise the tool cannot tell which digits repeat and asks you to use brackets.
  • Constants are only available as π, e, √2, √3 and φ; for other irrational numbers type as many decimal places as you know.
  • Inch fractions are rounded to the nearest mark; check the shown error before cutting anything that must fit tightly.

Privacy

Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.

Frequently asked questions

How do I convert a decimal to a fraction?

Write the digits after the point over a power of ten — one decimal place over 10, two over 100, three over 1,000 — and simplify. 0.75 = 75/100, and dividing both by 25 gives 3/4.

How do I convert a repeating decimal to a fraction?

Use algebra to cancel the repeating part. For 0.(3) = 0.333…: let x = 0.333…, so 10x = 3.333…; subtracting gives 9x = 3 and x = 1/3. With a non-repeating part, first multiply so the repeat starts right after the point. Type 0.(3) or 0.333... here to see every step.

Is 0.999… really equal to 1?

Yes. With x = 0.999…, 10x = 9.999…, and 10x − x = 9 gives x = 1. Equivalently, 1/3 = 0.333…, and three times that is 0.999…, which must be 3/3 = 1.

How do I write a repeating decimal here?

Put the repeating digits in brackets: 0.1(6) for 0.1666…, 0.(142857) for 0.142857142857…, 2.(3) for 2.333…. You can also type the block at least twice followed by ... (0.1666...), or paste a decimal with an overline on the repeating digits.

Why is 22/7 not exactly π?

π is irrational, so no fraction equals it. 22/7 = 3.142857… is only within 0.0013 of π. With denominators up to 1,000 the closest fraction is 355/113 = 3.14159292…, which is within 0.00000027.

What is 0.8 inch as a fraction?

Exactly, 0.8 = 4/5 inch, but tape measures mark sixteenths: the nearest is 13/16″ (0.8125″), 0.0125″ (0.32 mm) too long. On a 1/64″ scale it is 51/64″ (0.796875″).

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.