Tool to find the period of a fraction or a decimal number with repeating decimals. The period is a set of digits that is repeated at infinity in the decimals of the number (usually a rational number or a periodic fraction).
Repeating Decimals - dCode
Tag(s) : Arithmetics
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The periodic decimal expansion/development of a rational number or a fraction (numerator over denominator) is the sequence of numbers that are repeated at infinity in the decimal writing of the number.
Example: 1/3 = 0.3333333333… The digit 3 is repeated to infinity
Example: 1/27 = 0.037037037037037… The digits 037 are repeated to infinity
All fractions do not have a repeating decimal form, some have a terminating decimal form.
A terminating decimal indicates that no sequence of numbers repeats infinitely in the decimal writing of the number.
Example: 4/25 = 0.16 the development is finished and does not continue
Any number that is written in decimal form with a finite number of digits (after the decimal dot) has is a terminating decimal number.
Multiple notations are possible.
The first uses … points of suspension, but does not define the part that repeats. It is practical but not rigorous and therefore not recommended.
Example: $ 37/300 = 0.12333333333\dots $
Notation with a bar above the repeated part.
Example: $ 37/300 = 0.12\overline{3} $
Notation with a bar below the repeated part.
Example: $ 37/300 = 0.12\underline{3} $
Notation between brackets
Example: $ 37/300 = 0.12[3] $
NB: For clarity, it is better to write the fraction in an irreducible form.
Divide the numerator by the denominator. Lay the Euclidean division by hand or use a calculator.
Take $ x $ a number, and $ n $ the size (the number of digits) of the periodic part of the decimal expansion. To get a fractional writing, solve $ x \times 10^n - x $.
Example: $ x = 0.1\overline{6} = 0.1666666\dots $, the repeating portion is $ 6 $, a single digit so $ n=1 $. Calculate $ 10^1 \times x = 1.\overline{6} = 1.6666666\dots $ and solve $ 10x−x = 9x = 1.\overline{6}−0.1\overline{6}=1.5 \iff 9x=1.5 \iff x=1.5/9 = 15/90 = 1/6 $
The inverses of prime numbers provide long and interesting periodic decimal developments.
Example: $ 1/3 = 0.333333\dots $
Example: $ 1/7 = 0.142857142857\dots $
Any rational number (any fraction) has a finite developpement or a periodic decimal expansion with a finite number of digits that repeat themselves ad infinitum.
But there are real numbers that are not rational numbers (which are not fractions) which have decimals without repetition
Example: $ \pi = 3.14159265\dots $ has no known repetition to date.
Example: Champernowne's constant will never have any repetition, it is a universe number.
dCode retains ownership of the "Repeating Decimals" source code. Any algorithm for the "Repeating Decimals" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Repeating Decimals" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Repeating Decimals" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Repeating Decimals" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Repeating Decimals on dCode.fr [online website], retrieved on 2025-04-16,