---
tag: 065S5B9HF1
kind: statement
role: theorem
name: Repeating decimals are rational
msc: [11A63]
uses: [06XY4X9430, 0NCJ5WXN6Z, 03X8V7D64M]
sources:
  - url: https://en.wikipedia.org/wiki/Repeating_decimal
    locator: Every repeating or terminating decimal is a rational number
---

## Statement

Let $x \ge 0$ be a real number with a [[decimal expansion|06XY4X9430]] that is eventually periodic.
That is, there are $N \ge 0$ and $p \ge 1$ with $d_{k + p} = d_k$ for each $k > N$.
Then $x$ is a [[rational number|0NCJ5WXN6Z]].

## Remarks

Proof: $10^{N+p} x - 10^N x$ is an integer, because the periodic tails cancel. Thus $x$ is a quotient of an integer by $10^N (10^p - 1)$.
For example, $x = 0.\overline{36}$ gives $100 x - x = 36$, thus $x = 36/99 = 4/11$.
The converse is also true: the decimal expansion of each rational number is eventually periodic.

## Explanations

### L1 human

A decimal that repeats the same block of digits forever is always a fraction.
Shift the decimal point by the length of the block and subtract: the endless tail disappears.
For $0.777\dots$, this gives $10 x - x = 7$, thus $x = 7/9$.
