Enrichment · STEM Explorations · Number theory

Fractions that home
in on a number.

Take the whole part of a number, flip what is left over, and repeat: that is a continued fraction. Type a decimal and see the first five terms and the fraction each one gives, closer and closer to the number.

The continued fraction explorer

The worked example is 3.1415926536, whose terms are 3, 7, 15, 1 and 292. Nothing you type leaves this browser.

Loading the calculator. If nothing appears, turn on JavaScript.

What you get

Enrichment · STEM ExplorationsOpen to everyone · no sign-in

What you finish with
The first five partial quotients of a decimal number, the fraction after each count of terms, its error and a table for other well-known numbers.
Who it is for
Students and families who like number puzzles, and teachers showing how fractions approximate irrational numbers.
Format
Browser calculator for a phone, tablet or computer, by touch or keyboard. Prints a summary; downloads a spreadsheet (.csv); export and import a file.
Access
Open to everyone with the link: no account, no sign-in, nothing to buy and nothing to install. Everything you type stays in this browser; nothing is sent to Caveat.
Where it lives
The STEM Explorations space in Caveat Enrichment.
Support
Questions, a correction or a request: team@caveatacademic.com.

How to use it

  1. Name the number.
  2. Type a positive decimal, with as many places as you have.
  3. Read the terms, in the square brackets.
  4. Compare the fraction after three terms with the one after five.
  5. Try other numbers in the table.

Expand the number

How the figures are worked out

Take the whole part, flip the rest, repeat; then build fractions from the whole parts.

The worked example: 3.1415926536Fifth term292a large oneThree terms333/10622/7 comes after twoFour terms355/113off by 267 bnFive terms0.6 bnerror, 103993/33102The worked example: 3.1415926536Fifth term292a large oneThree terms333/10622/7 comes after twoFour terms355/113off by 267 bnFive terms0.6 bnerror, 103993/33102
Each step keeps the whole part and flips the rest. The fractions are built from the whole parts.

Why pi has 355/113

The fourth term of pi's expansion is 292, a large number. A large term means the fraction just before it is a very good approximation for its size. That is why 355/113 is correct to six decimal places with such a small denominator.

Rounded input

A number typed with eight places stands for a nearby fraction, so its expansion eventually departs from the true number. The first terms still match.

Sources

  1. Khinchin, A. Y. Continued Fractions. Dover: the expansion of a real number and its convergents.
  2. Hardy, G. H., & Wright, E. M. An Introduction to the Theory of Numbers: continued fractions and best approximations.
  3. Wolfram MathWorld. Continued Fraction and Pi Continued Fraction. mathworld.wolfram.com.
  4. OEIS Foundation. Entry A001203, the continued fraction for Pi. oeis.org.

A calculation from the decimal typed, in ordinary decimal arithmetic. The worked example is made up. Your entries stay in this browser. Support: team@caveatacademic.com.

Written with AI, then checked before it is published. How we checkFound a mistake? Report it and we fix it, or refund you.Cancel anytime.