Math calculator

Fraction to Decimal Calculator

Convert a fraction to its exact decimal, with the repeat length known before any dividing.

Fraction to decimal

Repeat length from the denominator first.

7/12

0.58(3)

The bracketed block repeats forever: 2 digits of run-in, then 1 that go round.

Exact decimal

0.58(3)

brackets mark the repeat

As a percentage

58.(3)%

the same number, times a hundred

Repeating block

1 digit

fixed by 3, not by the numerator

Rounded to 4 dp

0.5833

an approximation — the exact value is above

Predicted before dividing

12 is 2² × 3. Taking out the 2s and 5s leaves 3, so the decimal repeats: 2 digits of run-in, then a block of 1, because 1 is the smallest power of 10 that leaves remainder 1 on division by 3.

The long division, remainder by remainder

Each long-division step with the digit produced and the remainder left
StepBring downDigitRemainder
170510
210084
34034 ← seen at step 3

A remainder that has already appeared forces every later step to copy the earlier one. That is why the digits repeat, and why the block cannot be longer than the denominator.

If you do have to round

The value rounded to two, four and six decimal places, marked exact or approximate
2 dp0.58approximate
4 dp0.5833approximate
6 dp0.583333approximate
  • The block length depends only on 3, not on the numerator: every fraction with this denominator in lowest terms repeats after the same 1 digit.
  • The repeat shows up in the remainders before it shows up in the digits: the remainder left by step 3 is the one that step 3 started with, so from there every step must copy what it did the first time round.

The block length was worked out from the denominator, then the division was run and matched it.

What this tool shows

Whether a decimal stops, and how long it repeats if it does not, is decided entirely by the denominator. This page states both before dividing and then runs the division to confirm it, rather than dividing and looking for a pattern.

  • The exact decimal, with its repeating block in brackets
  • Whether it terminates, decided from the denominator
  • How long the repeat is, before dividing
  • The long division with every remainder
  • The same value as a percentage
  • Rounded forms, each marked exact or approximate
Exact decimal, repeat marked Block length from the denominator Long division, remainder by remainder Rounded forms labelled approximate

Exact expansion; rounded forms marked as such.

Updated 7 September 2026 · Works in any browser, no installation

A fraction becomes a decimal by dividing, and whether that division ever stops is decided by the denominator alone. Reduce the fraction, then look at what the denominator is built from: only 2s and 5s and the decimal terminates; anything else and it repeats forever. 3/8 stops after three places because 8 is 2³. 7/12 does not, because 12 keeps a 3 — it runs 0.58 and then repeats a single 3 for ever.

At a glance

Formula shown
Write the reduced denominator as d = 2^a \u00d7 5^b \u00d7 d\u2032 with d\u2032 coprime to 10. The decimal terminates exactly when d\u2032 = 1. Otherwise the run-in is max(a, b) digits and the repeating block is ord_d\u2032(10) digits \u2014 the smallest k with 10^k \u2261 1 (mod d\u2032).
Scenario support
Putting a fraction into a spreadsheet that only takes decimals; deciding how many places a measurement needs; explaining to a student why 1/3 never finishes and 3/8 does.
Educational estimate
Planning support from the values you enter — not professional advice.

Why some fractions repeat

Our decimals are built on ten, and ten is 2 × 5. A fraction whose reduced denominator is made only of 2s and 5s can be rewritten with a power of ten underneath, and a power of ten underneath is exactly what a terminating decimal is.

3/8 works because 8 is 2³: multiply top and bottom by 5³ and it becomes 375/1000, which is 0.375 and finished. 1/3 cannot, because no multiplication turns a 3 into a power of ten.

So the test is simple and it happens before any division: reduce, factorise the denominator, and look for anything that is not a 2 or a 5. The tool does exactly that and says which case you are in before it starts dividing.

How long the repeat is

The repeat has two parts and both are fixed by the denominator. Write it as 2ᵃ × 5ᵇ × d′, where d′ has no 2s or 5s left in it.

The digits before the repeat starts — the run-in — number exactly max(a, b). The repeating block is exactly as long as the smallest power of ten that leaves remainder 1 when divided by d′. For 12 = 2² × 3, that is a run-in of 2 and a block of 1, which is why 7/12 is 0.58(3).

Notice what is missing from that: the numerator. Every fraction with the same reduced denominator repeats after the same number of digits. 1/7, 2/7, 3/7 and the rest all have six-digit blocks, and in fact all six are the same six digits in a different order.

The repeat lives in the remainders

Long division produces a digit and a remainder at each step. The digits are what you write down, but the remainders are what determine everything: the next digit depends only on the current remainder, so the moment a remainder comes back, everything after it must copy what happened before.

That is why the repeat is inevitable rather than coincidental. There are only finitely many possible remainders — fewer than the denominator — so one has to recur within that many steps, and the block can never be longer than the denominator minus one.

The table in the tool marks the step where the remainder returns. It is usually visible there a line before you would have spotted the pattern in the digits.

1/7 and the six digits

1/7 = 0.(142857), and the block is six long because six is the smallest power of ten leaving remainder 1 on division by 7. 10¹ leaves 3, 10² leaves 2, then 6, then 4, then 5, and 10⁶ finally leaves 1.

Six is one less than seven, which is the largest a block can possibly be. Denominators that achieve it are called full reptend primes, and 7, 17, 19, 23 and 29 are among them. 13 is not: 1/13 also has a six-digit block, but thirteen would have allowed twelve.

The other sevenths are the same cycle started at a different point: 2/7 is 0.(285714), 3/7 is 0.(428571). That is the remainder argument again — they all pass through the same six remainders, just entering the loop somewhere else.

Rounding, and when to say so

Most tools round silently. This one shows the exact decimal first and then, separately, the rounded forms — each labelled as exact or approximate at that width.

The distinction matters more than it looks. 1/3 to four places is 0.3333, and that is not 1/3; adding three of them gives 0.9999 rather than 1. Errors of that kind accumulate quietly through a spreadsheet and surface as a penny that will not reconcile.

If the work will be added up, keep the fraction as long as you can and round once at the end. If it will be read by a person, round early and say what you rounded to.

Fraction, decimal, percentage

All three are the same number in different clothes. A percentage is just the decimal moved two places: 3/8 is 0.375 is 37.5%.

The repeat travels with it. 1/3 is 0.(3) and 33.(3)%, not 33.33% — which is why a third of a class, a third of a budget and a third of a discount are all slightly more than the 33% people usually write.

The tool gives the percentage exactly, with its own repeating block where there is one. For percentage increases, decreases and comparisons, the Percentage Calculator is the page for that.

Sources and methodology

The results about period length are classical number theory. These are where they are set out.

Method. The fraction is reduced first, because the period depends on the reduced denominator and not on the numerator. The twos and fives are divided out to give the run-in length directly; the order of 10 modulo what remains is computed by repeated multiplication, giving the block length. Long division is then run for exactly that many digits, recording every remainder, and the point at which a remainder recurs is marked. Prediction and division are computed independently and must agree. That engine is verified on every change against 58 hand-written assertions, including that the block length equals the order of 10 modulo the coprime part of the denominator for every denominator up to three hundred, computed separately in the test from the way the engine computes it. The count and the per-case breakdown are published on the formula verification page.

Related calculators

Where this goes next:

Decimal to FractionTurn any decimal into its exact fraction, repeating ones included, with the four algebra lines that cancel the infinite tail instead of rounding it away.
FractionAdd, subtract, multiply and divide fractions and mixed numbers exactly, with the least common denominator chosen, the cross-cancelling done first, and the true repeating decimal beside the answer.
Simplify FractionsReduce a fraction to lowest terms with both routes to the divisor shown side by side — Euclid line by line and the shared primes — and a stated proof when nothing can be cancelled.
Comparing FractionsOrder up to eight fractions with all three methods shown on your own numbers, and a figure for how many decimal places the closest pair need before they stop looking equal.
PercentageSolve X% of Y, what percent X is of Y, reverse percentage, increase/decrease, discounts, and tax, tip, or commission.
Mixed NumberAdd, subtract, multiply and divide mixed numbers with the borrow shown where it happens, plus a second independent check worked through improper fractions.

More in Math, or browse all calculators.

Read the guide

Going the other way — a decimal back to an exact fraction, repeating ones included — is the Decimal to Fraction Calculator. If the fraction needs reducing first and you want to see the divisor, the Simplify Fractions Calculator shows both routes to it.

Educational use disclaimer

This is an educational tool. The decimal shown is exact; the rounded forms beneath it are clearly marked as approximations, and which one your work needs is a question about your context rather than about the arithmetic.

How we calculate · Found an error? email us

Authorship & verification

Written and maintained by , a business operator who builds spreadsheet-based calculators.

What's changed (3 updates)

Published 7 September 2026

  1. Published the fraction to decimal page: the run-in and repeat lengths are derived from the denominator before any division runs, then confirmed by the division.
  2. The long division records every remainder and marks the step at which one recurs, because that is where a repeat actually begins — the digits only follow.
  3. Rounded forms are shown separately from the exact decimal and each is labelled exact or approximate at that width.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.