Welcome to Mastery of Repeating Decimals! This is the first lesson of the course, and over the next four lessons we will build the skills needed to read, write, analyze, and convert repeating decimals with confidence. As you may recall from earlier work with rational numbers, every rational number's decimal expansion either terminates or eventually falls into a repeating cycle. We have already spent time on the terminating side, so now it is time to turn our full attention to the repeating kind.
In this lesson, we will learn to read and write bar notation, the compact and precise way mathematicians represent repeating decimals. By the end, you will be able to move fluently in both directions: from bar notation to a written-out string of digits, and from a string of digits back to bar notation.
Why We Need a Shorthand
The Overline and the Repeating Block
Decimals with a Non-repeating Prefix
Translating from Digits to Bar Notation
A Key Distinction to Remember
Conclusion and Next Steps
In this lesson, you learned that bar notation uses an overline to mark the exact digits that repeat in a decimal expansion. We saw how to unfold that notation into an infinite string of digits, how to spot a repeating block in a written-out decimal and write the matching bar notation, and why precise placement of the overline matters — shifting it by even one digit creates an entirely different number.
Now it is time to put these skills into action. In the practice exercises ahead, you will match bar notation expressions to their digit expansions, unfold repeating blocks into specific digit sequences, and write your own bar notation from written-out decimals. Let's jump in!
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal
When you divide 1 by 3, the result is 0.3333…, where the digit 3 continues forever. Writing a handful of digits followed by dots works in casual settings, but it can be ambiguous. For instance, does 0.16666… mean only the 6 repeats, or is the pair 16 repeating? Without a precise convention, the reader is left guessing.
This kind of ambiguity matters beyond the classroom, too. In fields like engineering and finance, a misread repeating pattern can lead to rounding errors that snowball through calculations. Bar notation solves this problem cleanly. Instead of trailing dots, we place a small horizontal line over the exact digits that repeat, and this single visual cue tells us everything we need to know about the pattern — with zero ambiguity.
The horizontal line used in bar notation is called an overline (sometimes called a vinculum). It sits directly above the digit or group of digits that cycles endlessly. We call those digits the repeating block (also known as the repetend).
Here are three quick examples showing how the overline works:
Bar Notation
Repeating Block
Decimal Expansion
0.3
3
0.3333…
0.27
27
0.272727…
0.142857
142857
0.142857142857…
The rule is straightforward: whatever appears under the bar repeats in the same order, forever. For 0.27, the two-digit block 27 cycles without end: 0.272727… For 0.142857, all six digits under the bar cycle together: 0.142857142857142857… Notice that 0.142857 is actually the decimal form of the familiar fraction 71 — a great example of how a simple fraction can hide a lengthy repeating block.
Not every repeating decimal starts its cycle immediately after the decimal point. Sometimes one or more digits appear first and never repeat. We call those leading digits the non-repeating prefix. The overline covers only the part that truly repeats.
Consider 61, whose decimal expansion is 0.1666… Here the digit 1 shows up just once, while 6 repeats forever. In bar notation we write:
0.16
The bar sits only over the 6, telling us that 6 alone cycles. The 1 before it is outside the bar, so it does not repeat. Here is one more example: the decimal 0.58333… has the prefix 58 followed by a repeating 3, so its bar notation is 0.583.
So far we have been reading bar notation and expanding it into digits. Now let's practice going the other way: given a decimal written out with enough digits to reveal the pattern, we need to identify the repeating block and place the bar precisely.
A simple three-step approach works well:
Write out enough digits to spot which group of digits repeats.
Identify any digits that come before the repeating block (the non-repeating prefix, if any).
Place the overline above exactly the repeating block — nothing more, nothing less.
For example, if you see 0.454545…, the pair 45 clearly cycles and there is no prefix, so we write 0.45. If instead you see 0.8333…, the digit 8 appears once and then 3 repeats, giving us 0.83.
The exact placement of the overline changes the meaning of the number completely. Mixing up which digits fall under the bar is the most common mistake when working with this notation. Compare these two expressions side by side:
Notation
Meaning
Expansion
0.16
Both 1 and 6 repeat
0.161616…
0.16
Only 6 repeats
0.16666…
These represent two entirely different numbers! In 0.16, the block 16 starts cycling right after the decimal point: 0.161616… In 0.16, the 1 is fixed and only 6 cycles: 0.16666… Always check carefully which digits the bar actually covers before interpreting or writing a repeating decimal.