A problem on your board: "Express 0.\overline{27} as a fraction." You could try fractions at random — \dfrac{1}{4}, \dfrac{3}{11}, \dfrac{27}{99} — and see which one gives the right decimal. Or you could use the three-line algebra trick that every JEE-trained student uses without thinking: give the decimal a name, multiply by a power of 10 that shifts one full period past the point, and subtract. The repeating tail cancels, leaving an ordinary integer equation you can solve for the fraction.

This trick is the one-way bridge from "infinite repeating decimal" to "clean ratio of integers." Learn it once, and every recurring-decimal question is a ten-second calculation.

The trick in three lines

Let the decimal be x. Identify the length of the repeating block — call it n. Multiply both sides by 10^n so that the repeating tail shifts exactly one period to the left. Subtract the original equation from the shifted one. The infinite repeating tails line up and cancel out.

Template:

x = 0.\overline{b_1 b_2 \dots b_n}
10^n \, x = b_1 b_2 \dots b_n.\overline{b_1 b_2 \dots b_n}
(10^n - 1)\, x = b_1 b_2 \dots b_n
x = \dfrac{b_1 b_2 \dots b_n}{10^n - 1}

The denominator is 10^n - 1: either 9, 99, 999, 9999, \dots depending on the period length.

Why subtraction cancels the tail: after multiplying by 10^n, both x and 10^n x have identical infinite repeating tails, starting from the same digits. Subtracting wipes the tail out in one go, because \text{tail} - \text{tail} = 0. You are left with a finite number on the right-hand side — the one the block specifies.

Worked examples in increasing difficulty

Example 1: x = 0.\overline{3} = 0.333\dots

Block length is 1, so multiply by 10:

x = 0.3333\dots
10x = 3.3333\dots
10x - x = 3 \quad\Longrightarrow\quad 9x = 3 \quad\Longrightarrow\quad x = \dfrac{3}{9} = \dfrac{1}{3}.

The classic result. No surprises.

Example 2: x = 0.\overline{27} = 0.272727\dots

Block length is 2, so multiply by 100:

x = 0.272727\dots
100x = 27.272727\dots
99x = 27 \quad\Longrightarrow\quad x = \dfrac{27}{99} = \dfrac{3}{11}.

Example 3: x = 0.\overline{142857} = 0.142857142857\dots

Block length is 6, so multiply by 10^6 = 1000000:

1000000x - x = 142857 \quad\Longrightarrow\quad 999999x = 142857.

Simplify: \dfrac{142857}{999999} = \dfrac{1}{7}. So 0.\overline{142857} = \dfrac{1}{7}. (The numerator and denominator share a factor of 142857; divide both by it.)

When the repeating block doesn't start immediately

Sometimes the decimal has a non-repeating preamble before the repeating block kicks in, like 0.1\overline{6} = 0.1666\dots or 0.23\overline{45} = 0.2345454545\dots.

Fix: first multiply by a power of 10 to shift the preamble to the left of the point. Then apply the standard trick.

Example 4: x = 0.1\overline{6}

The non-repeating part is 1 (length 1), the repeating block is 6 (length 1).

x = 0.16666\dots
10x = 1.6666\dots \text{ (preamble now past the point)}
100x = 16.6666\dots
100x - 10x = 15 \quad\Longrightarrow\quad 90x = 15 \quad\Longrightarrow\quad x = \dfrac{15}{90} = \dfrac{1}{6}.

The denominator 90 = 9 \cdot 10: one 9 for the period length 1, one 10 for the preamble length 1.

Example 5: x = 0.23\overline{45}

Preamble length 2 (digits 23), repeating block length 2 (digits 45).

100 x = 23.\overline{45}
10000 x = 2345.\overline{45}
10000 x - 100 x = 2345 - 23 = 2322
9900 x = 2322 \quad\Longrightarrow\quad x = \dfrac{2322}{9900} = \dfrac{387}{1650} = \dfrac{129}{550}.

Simplified to lowest terms.

The 10x minus x cancellation visualisedTwo rows showing x equals 0.272727 dot dot dot aligned with 100x equals 27.272727 dot dot dot. Below, the subtraction 100x minus x equals 99x. The repeating tails are highlighted in red in both rows, and a box marks that they exactly cancel, leaving 99x equals 27. A small caption reads: after multiplying by 100, both tails line up — subtraction erases them.x = 0.272727272727…100x = 27.272727272727…99x = 27Identical tails subtract away to nothing.So x = 27 / 99 = 3/11. Done.
The red tails in the two equations are identical after the shift — subtracting kills them both and leaves $99x = 27$, a plain integer equation. That is the whole trick.

The general formula

If x = 0.\overline{b_1 b_2 \dots b_n} (pure period, no preamble):

x = \dfrac{B}{\underbrace{99\dots 9}_{n \text{ nines}}}

where B is the integer formed by the digits b_1 b_2 \dots b_n.

If there is a preamble of length k before the period:

x = \dfrac{\text{(digits with period shifted past point)} - \text{(preamble digits)}}{\underbrace{99\dots 9}_{n}\underbrace{00\dots 0}_{k}}

You do not need to memorise the general formula if you can run the 10^n x - 10^k x subtraction by hand. That is the more reliable skill.

Why every repeating decimal is rational

This trick is not just a computational shortcut. It is a proof that every repeating decimal is a ratio of integers. The three-line algebra produces, for any repeating decimal, a specific fraction that equals it. No repeating decimal can be irrational, because the trick always succeeds.

Why: the trick takes a decimal with a repeating block of length n and outputs a fraction with denominator 10^n - 1 (or 10^{n+k} - 10^k with preamble). Both numerator and denominator are integers. So every repeating decimal is a ratio of integers by construction.

Together with the converse (every rational has a decimal that terminates or eventually repeats), this gives the complete characterisation: rationals are exactly the decimals that terminate or eventually repeat.

Exam shortcut: $0.\overline{9}$

The textbook says 0.\overline{9} = 1, and students resist. Run the trick:

x = 0.9999\dots
10x = 9.9999\dots
10x - x = 9 \quad\Longrightarrow\quad 9x = 9 \quad\Longrightarrow\quad x = 1.

No tricks, no approximations. The algebra forces x = 1. If you trust the trick on 0.\overline{3} = \tfrac{1}{3}, you have to trust it on 0.\overline{9} = 1 — they are the same manipulation.

Carry this trick. When a question gives you a repeating decimal, don't hunt for the fraction — derive it in three lines. Every recurring decimal has a unique fraction hiding in it, and subtraction always drags it out.

Related: Number Systems · 0.999… Really Does Equal 1 · Rational or Irrational? Hunt for the Repeating Block · Non-Terminating vs Non-Repeating Decimals