🏆 US-Registered Digital Marketing Agency Trusted by 200+ brands · USA · UK · Canada · AUS
Advertisement
Advertisement
MATH

Decimal to Fraction Calculator — repeating decimals included

Turn any decimal into an exact fraction, including recurring decimals such as 0.1666… solved algebraically.

Type the digits once. For 0.1666… type 0.16 and set the repeating digits below to 1.
0 for a terminating decimal. 1 for 0.16 meaning 0.1666…, 2 for 0.142857 style pairs, 6 for 0.142857 repeating as a block of six.
Exact fraction
0
 
0
Before reducing
0
Mixed number
0
Check as decimal
0%
As a percentage
Tip: a rounded decimal cannot be converted back to its original fraction. 0.3333 becomes 3333/10000; only 0.3333… with the repeat flag set gives you 1/3.
Advertisement

The decimal to fraction calculator above does the thing most converters quietly skip: it handles repeating decimals exactly. Terminating decimals are easy — 0.75 is 75/100 is 3/4, and any tool can manage that. Recurring decimals like 0.1666… or 0.142857142857… need an algebraic method, and without it you get an approximation dressed up as an answer. This page runs that method with your digits and prints every line of it.

Arb Digital builds free tools that show their reasoning rather than hiding it behind a result box. Whether you are checking homework, converting a measurement, or trying to recover the exact value behind a decimal a spreadsheet gave you, the working is the part worth having.

What This Decimal to Fraction Calculator Does

Enter a decimal and say how many of its trailing digits repeat. With the repeat count at 0 it treats the decimal as terminating and converts by placing the digits over the appropriate power of ten. With a repeat count above 0 it applies the algebraic method for recurring decimals, producing the exact fraction rather than a close approximation.

Every result comes back four ways: the fraction in lowest terms, the fraction before reducing so you can see what the method produced, the mixed number for values above 1, and the percentage. It also converts the fraction back to a decimal as a check, which is the fastest way to confirm the repeat count was interpreted the way you intended. Negative decimals are supported, and the sign is carried on the numerator.

How to Use It

  1. Type the decimal once, without repeating the digits. For 0.1666… enter 0.16 — the repeating 6 is typed a single time.
  2. Set the repeating-digit count. In 0.16 the repeating block is just the 6, so the count is 1. In 0.142857 recurring, the whole six-digit block repeats, so the count is 6.
  3. Use 0 for terminating decimals such as 0.75 or 2.125, where nothing recurs.
  4. Read the steps panel for the algebra: the equation, the multiplied version, the subtraction, and the reduction.
  5. Check the decimal in the results grid. If it does not match what you meant, the repeat count is probably wrong.

The Method for Terminating Decimals

A terminating decimal is already a fraction; the notation just hides the denominator. Count the digits after the point, put the digits over 1 followed by that many zeros, and reduce. 0.75 has two decimal places, so it is 75/100, and dividing top and bottom by their greatest common divisor of 25 gives 3/4. 2.125 has three places, so it is 2125/1000, which reduces by 125 to 17/8, or 2 1/8 as a mixed number.

Which decimals terminate is not arbitrary. A fraction in lowest terms produces a terminating decimal exactly when its denominator's only prime factors are 2 and 5 — the primes that divide ten. That is why halves, quarters, fifths, eighths, tenths, and sixteenths all terminate, while thirds, sevenths, ninths, and elevenths never do. It is also why the same fraction terminates in some number bases and not others: the rule follows the base, not the fraction. Wolfram MathWorld covers the general behaviour under decimal expansion.

Advertisement

The Algebraic Method for Repeating Decimals

This is the part worth reading. Take x = 0.1666…, the default in the calculator. There is one digit before the repeat starts (the 1) and one digit repeating (the 6).

Multiply x by 10 raised to the number of non-repeating decimal digits: 10x = 1.666…. Now multiply x by 10 raised to the total number of decimal digits in one full cycle, non-repeating plus repeating: 100x = 16.666…. Both numbers now have exactly the same infinite tail after the point. Subtract the first from the second and the tails cancel completely: 100x − 10x = 16.666… − 1.666…, so 90x = 15, and x = 15/90, which reduces by 15 to 1/6.

Nothing about that is approximate. The infinite tails are identical, so subtracting them leaves zero exactly, and what remains is ordinary integer arithmetic. Wolfram MathWorld sets out the same structure under repeating decimal, where every such expansion is shown to correspond to a rational number. Written as a formula: the numerator is the whole digit string minus the digit string up to where the repeat begins, and the denominator is 10n+r − 10n, where n counts non-repeating decimal digits and r counts repeating ones. For 0.16 with r = 1 and n = 1, that is (16 − 1) ÷ (100 − 10) = 15/90 = 1/6.

Try it on 0.333… with n = 0 and r = 1: numerator 3 − 0 = 3, denominator 10 − 1 = 9, giving 3/9 = 1/3. Or 0.142857 repeating with n = 0 and r = 6: numerator 142857, denominator 999999, and that reduces to exactly 1/7 — the greatest common divisor is 142857 itself. The pattern of all-nines denominators for purely repeating decimals falls straight out of the formula when n is zero.

The 0.999… Question

Run the method on 0.999… with n = 0 and r = 3 and you get 999/999, which is 1. Run it with r = 1 on 0.9 and you get 9/9, also 1. This is not a rounding artefact or a flaw in the method; 0.999… and 1 are two decimal representations of the same number, and the algebra says so without any special pleading.

The same thing happens elsewhere: 0.4999… equals 0.5, and 2.0999… equals 2.1. Every terminating decimal has a second representation ending in repeating nines. It is the one place where decimal notation is not unique, and it is worth knowing about because it explains why the calculator returns a whole number where you might have expected something just under one.

Where the Exact Fraction Matters

Rounding error compounds. A rate of one third stored as 0.33 loses a third of a percent immediately, and multiplied across a thousand units that gap is visible. Keeping the fraction and converting only at the final step avoids the accumulation entirely, which is why financial and engineering systems that care about exactness store rationals rather than decimals.

Measurement is the other common case. A digital caliper reading 0.375 inches is 3/8 of an inch, which is the number that matches the drill bit you actually own. Converting 0.4375 to 7/16 turns an abstract reading into a tool size. Imperial work is fractions all the way down, and the decimal is usually just the display format.

Repeating decimals also identify themselves usefully. If a decimal repeats, its denominator in lowest terms has a prime factor other than 2 or 5, and the length of the repeating block is determined by that denominator — sevenths always repeat with a six-digit block, elevenths with a two-digit one. Spotting 0.8333… as 5/6 rather than as a messy number is often the moment a problem becomes tractable. If you want to go the other way and reduce a fraction you already have, the simplify fractions calculator shows the divisor it used, and the mixed number calculator converts between improper and mixed forms.

Reading the Repeat Count Correctly

The repeat count is the length of the block that recurs, not the number of times you can see it. In 0.8333…, only the 3 recurs, so the count is 1 and you type 0.83. In 0.121212…, the block is "12", so the count is 2 and you type 0.12. In 0.5833333…, the recurring block is again just the 3, so the count is 1 and you type 0.583.

Getting this wrong changes the answer rather than breaking the tool, which is why the check-decimal box exists. Enter 0.16 with a repeat count of 2 and the calculator will treat "16" as the recurring block, giving 16/99 = 0.161616…, a perfectly valid but different number. Look at the check decimal before you trust the fraction.

Want a calculator like this on your own site?

Arb Digital builds fast, accessible, dependency-free web tools that earn search traffic and keep readers engaged. Browse everything we have published, or tell us what you need built.

Browse All Free Tools Talk to Arb Digital

Common Mistakes to Avoid

  • Treating a repeating decimal as terminating. 0.3333 gives 3333/10000, not 1/3. The repeat flag is what makes the difference exact.
  • Typing the repeating block several times. Enter the digits once and set the repeat count; typing 0.166666 with a count of 1 changes what the tool treats as non-repeating.
  • Counting repetitions instead of block length. The count is how many digits are in the recurring block, so 0.121212… has a count of 2, not 6.
  • Forgetting to reduce. The algebra usually produces something like 15/90; the finished answer is 1/6.
  • Converting a value that was already rounded. If the decimal came from a display with limited digits, the exact original fraction is unrecoverable from those digits alone.

Related Free Tools From Arb Digital

Reduce the result with the simplify fractions calculator, convert improper results with the mixed number calculator, and generate equal-value forms with the equivalent fractions calculator. For arithmetic on the fractions you recover, see the adding fractions calculator or the general fraction calculator, and for proportion work the percentage calculator. Everything else is in the free online tools hub.

Frequently Asked Questions

How do you convert a decimal to a fraction?

For a terminating decimal, put the digits over 1 followed by one zero per decimal place, then reduce. 0.75 becomes 75/100, which simplifies to 3/4 after dividing both by 25.

How do you convert a repeating decimal to a fraction?

Set x equal to the decimal, multiply by a power of ten so the repeating tails line up, subtract the two equations so the tails cancel, then solve. For 0.1666… you get 100x minus 10x equals 15, so x is 15/90, which reduces to 1/6.

What is 0.333… as a fraction?

Exactly 1/3. Using the algebraic method with one repeating digit gives 3 over 9, which reduces to 1/3. Writing 3333/10000 instead is an approximation, not the true value.

Why do some fractions repeat and others do not?

A fraction in lowest terms terminates only when its denominator has no prime factors other than 2 and 5, the primes that divide ten. Thirds, sevenths, and ninths therefore always repeat.

Does 0.999… equal 1?

Yes. The algebraic method gives 9 over 9, which is 1. Every terminating decimal has a second representation ending in repeating nines, so the two are the same number written two ways.

How many digits should I enter as the repeating block?

Enter the length of the block that recurs, not how many times it appears. In 0.121212… the block is 12, so the count is 2, and you type the digits 0.12 once.

Can I recover the original fraction from a rounded decimal?

No. A rounded value such as 0.3333 is indistinguishable from a genuine terminating decimal, so the exact original cannot be determined from the digits alone.

This tool is provided for educational and general reference use. Always check results against the method your course or specification requires.

Advertisement
Advertisement

Take it further

Arb Digital assistant

👋 Hey! Want to grow your business? Ask me anything — a free marketing proposal is on the table!