It is $\pi$-day and the internet is full of stories about $\pi$. One story mentions that "an approximation -- $22/7$ -- is used in many calculations."

I have never actually used $22/7$ as an approximation for $\pi$ in a calculation ... or at least I don't have a memory of doing that.

My questions are

  1. Is it true that today $22/7$ is an approximation that is used in many calculations? Are there, for example, any computers that use this approximation? Is $22/7$ in general (in the USA) often used in handcalculations that involve $\pi$?

  2. I could imagine that before the widespread use of calculators, people would actually use $22/7$ as an approximation. Are there any historical examples of this?

  • $\begingroup$ See e.g. the second line of this page (Wikipedia), and references [2,3,4,5] within: "Some Egyptologists have claimed that the ancient Egyptians used an approximation of π as 22/7 from as early as the Old Kingdom. This claim has met with skepticism." $\endgroup$ – Clement C. Mar 14 '16 at 15:11
  • 1
    $\begingroup$ $22/7$ is not accurate enough for many modern purposes. But a very long time ago (read: millenia ago) it was frequently used as an approximation for $\pi$ $\endgroup$ – Justin Benfield Mar 14 '16 at 15:11
  • 2
    $\begingroup$ @BigbearZzz To me that sounds like teaching children the concept of $\pi$ completely wrong from the very beginning. $\endgroup$ – molarmass Mar 14 '16 at 15:24
  • 1
    $\begingroup$ @molarmass That's sad, isn't it? Go and ask, says, a high school student in Thailand, a smart one while we are at it, what is $\pi$. Chances are that he'll say that it's 3.14159265 or, in a sad case, $\frac{22}7$. 95% won't even know that it's the ratio of circumference over diameter. $\endgroup$ – BigbearZzz Mar 14 '16 at 15:27
  • 1
    $\begingroup$ The second question is a better fit for the History of Science and Mathematics site. Why don't you ask there? $\endgroup$ – Rory Daulton Mar 14 '16 at 16:37

For the first part of your question about whether computers use this approximation, I think the answer is generally "no." Most modern languages contain some sensible numerical constant in a library that has $\pi$ to machine precision. The preference should be to use that. Before that, like old-style Fortran, the "correct" way was to make your own constant using $\pi = 4 \tan^{-1} 1$. (Of course that doesn't mean that no one ever hand-coded 3.14 or 22/7 into their program, but there were always better, more accepted solutions.)

For the second part, there's a list of historical approximations at Wikipedia, for example. It lists an old one going back to Archimedes:

In the 3rd century BCE, Archimedes proved the sharp inequalities 223⁄71 < π < 22⁄7, by means of regular 96-gons (accuracies of 2·10−4 and 4·10−4, respectively).


If true that shows it used as a bound.

  • 3
    $\begingroup$ Why the down-vote? $\endgroup$ – Brick Mar 14 '16 at 15:30
  • 1
    $\begingroup$ I observed that the amount of downvotes flying around in this thread is phenomenal. While I understand that the question may not be fully appropriate for this site, it still baffles me that people would throw downvotes everywhere just for that. $\endgroup$ – BigbearZzz Mar 15 '16 at 13:55

The two better known rational approximations of $\pi$ are $\dfrac{22}7$ ($3$ correct figures) and $\dfrac{355}{113}$ ($7$ correct figures).

Personally I don't use them as I consider that they bring no real benefit over the straight decimal representations $3.14$ and $3.141593$.

These approximations did not arise by accident: they are the most efficient for a given magnitude of the denominator and can be retrieved from the theory continuous fractions.

Repeatedly that the inverse of the fractional part, and you get a sequence of integer parts

$$3,7,15,1,292\dots$$ so that


The first approximations can be drawn from this:



You're right that 22/7 isn't used in actual calculations today. It's still the first of an interesting sequence of remarkably good approximations, in the following sense.

To approximate $\pi$ using tenths, just look at the beginning of the decimal expansion $\pi \approx 3.1$. You can be sure that you are within $1/20$ of the correct value. With $\pi \approx 22/7$ you can be sure that you are within $1/14 = 0.071428\ldots$, but in fact you're much closer than that: $\pi- 22/7 = 0.003069\ldots$. So $7$ is a very good denominator to use when looking for rational fractions near $\pi$. The next really good approximations are $333/106$ and $355/113$.

These good approximations come from the continued fraction for $\pi$ - see http://mathworld.wolfram.com/PiContinuedFraction.html .


One mathematical use comes from the continued fraction expansion $$3 + \frac{1}{7 + \frac{1}{15 + \frac{1}{1 + \frac{1}{292 + \frac{1}{1 + \ldots}}}}} $$

The "convergents" of this expansion are the approximations that you get by truncating the continued fraction. The first convergent is $3$, the next is $3 + \frac{1}{7} = \frac{22}{7}$, the next is $3 + \frac{1}{7 + \frac{1}{15}} = \frac{333}{106}$, and so on.

The mathematical importance of the continued fraction convergents $\frac{m}{n}$ of any real number $t$ is that they are very good approximations in a very precise sense: they are the only fractions such that $$\bigl|t - \frac{m}{n}\bigr| < \frac{1}{c \, n^2} $$ where $c = \sqrt{5}$ (thanks to @Ian for the constant which I could not dig out of my brain at the right moment).

  • $\begingroup$ $c=\sqrt{5}$ (the upper bound is attained when $t=\frac{1+\sqrt{5}}{2}$). $\endgroup$ – Ian Mar 14 '16 at 15:36
  • 1
    $\begingroup$ Continued Fraction approximations are guaranteed to have $\left|r-\frac pq\right|\le\frac1{q^2}$ and if $\left|r-\frac pq\right|\le\frac1{2q^2}$, then $\frac pq$ is guaranteed to be a continued fraction approximation for $r$. $\endgroup$ – robjohn Mar 14 '16 at 15:42
  • $\begingroup$ @robjohn Interesting addition, but the first part is not optimal, as the Hurwitz theorem referenced above shows. The second part is quite interesting, though: only the continued fractions can be below $\frac{1}{2q^2}$ but they are actually below $\frac{1}{\sqrt{5} q^2}$. $\endgroup$ – Ian Mar 14 '16 at 16:17
  • $\begingroup$ @Ian: Consider $106^2\left|\pi-\frac{333}{106}\right|=0.9350557349$ Something is amiss. $\endgroup$ – robjohn Mar 14 '16 at 16:24
  • $\begingroup$ @robjohn I seem to have misunderstood the Hurwitz theorem: it actually says that the $t$ in question must be irrational, and it only says that a subsequence of the continued fraction convergents satisfies that inequality. So for instance it holds for $355/113$ with $\pi$ but not for $333/106$. $\endgroup$ – Ian Mar 14 '16 at 16:33

No, of course computers don't use $\frac{22}{7}$ as an approximation for $\pi$.

But people often do, when they need a quick back-of-the-envelope calculation of something, don't want to pull out a calculator/computer, and only need a few significant digits of precision anyway.

  • 4
    $\begingroup$ Do people really use it? When I still took physics classes either I needed to guesstimate an order of magnitude and then $\pi = 3$, or I need a nontrivial amount of significant places and I used a calculator. And in mathematics $\pi = \pi$ of course. I cannot recall ever using $\pi \approx 22/7$. $\endgroup$ – Najib Idrissi Mar 14 '16 at 15:14
  • 1
    $\begingroup$ I disapprove those downvotes. $\endgroup$ – Yves Daoust Mar 14 '16 at 15:14
  • 1
    $\begingroup$ Why does this answer get so many downvotes? $\endgroup$ – BigbearZzz Mar 14 '16 at 15:15
  • 1
    $\begingroup$ @BigbearZzz: All part of my secret plan to earn the Peer Pressure badge, perhaps? $\endgroup$ – hmakholm left over Monica Mar 14 '16 at 15:15
  • 4
    $\begingroup$ I guess the downvotes come from the fact that people expect some sort of source for the assertion. It's not a math question where you can prove without doubt that your answer is correct just by writing down a proof, it's a sociology/history/i-don't-know question... A bare assertion is useless. $\endgroup$ – Najib Idrissi Mar 14 '16 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.