Pi Day 2025: Infinite Sums of Pi

Written by BEAM CEO Dan Zaharopol

Wait, does that crazy infinite sum really equal π?!?

It does indeed! Let's walk through what's going on.


Can you actually add infinitely many numbers together?

As it happens, you can, but only certain numbers. For example, you can't add:

1 + 2 + 3 + …

That sum is infinite.

However, you can add:

½ + ¼ + ⅛ + ⅟₁₆ … = 1

Why does that work? You can get some intuition from the diagram below, which demonstrates how when you take half a square, and then ¼ of that square, and then ⅛ of that square, and so on, you cover essentially every point of that square.

Here's a more mathematical way to see it. If you have any two different real numbers x and y, and you subtract them, you have to get a nonzero answer: x y ≠ 0. If the difference was equal to 0, they'd be exactly equal.

Why does that matter?

Well, suppose that ½ + ¼ + ⅛ + … = x. Then what is 1 x?

It must be less than ½, because x is ½ plus more stuff, so when you subtract x from 1 you get a number smaller than ½.

It must be less than ¼, because x is ½ + ¼ = ¾ plus more stuff, so when you subtract x from 1 you get a number smaller than ¼.

Keep going, and you’ll find that 1 x is less than ⅛, and less than ⅟₁₆, and less than ⅟₃₂; in fact, 1 x is less than any positive number you can name no matter how small you go. So 1 x can only be 0, and 1 and x must be equal!

But this isn't the only infinite sum that still adds to a finite number. There are lots more.


What about pi?

What we showed you on our Pi Day card is actually the Leibniz formula for π. It comes about from a mix of trigonometry and calculus (pardon us for a second as we get technical): in trigonometry, arctan(1) is equal to π⁄₄, and in calculus, the Taylor series expansion for arctan gives you an infinite sum to calculate it with. That gets you:

To get the formula on our Pi Day card seen above, we simply multiplied by 4. And like so many tantalizing equations in math, this equation has beautiful patterns in it, leads you to a deeper theory to discover about mathematics, and is undeniably appealing! 

The Leibniz formula for π was actually first discovered by Madhava of Sangamagrama in the 14th–15th centuries, but was rediscovered by James Gregory in 1671 and Gottfried Leibniz in 1673.

It's a nice formula, and in theory, you can use it to calculate all the digits of π. Want to know the 1000th digit? Just keep adding and subtracting these fractions until they get small enough that they'll never affect the 1000th digit, and you've got it!

Unfortunately, that takes a long long looooooong time, especially because this formula "converges" slowly. There are much faster ways to calculate digits of π, usually from sums that converge faster. You can do a deep dive on Wikipedia if you want!

A bit more precise math for the curious and dedicated

(Warning: this part gets really technical!)

Formally speaking, an infinite sum (or "infinite series") converges to a value a if you can always win the following game: no matter how small a positive number (usually called ϵ, for the Greek letter "epsilon") someone names, the sum always gets closer than ϵ to a and stays closer.

That "game" is the same thing we did above when we showed that if you add enough terms of ½ + ¼ + ⅛ + …  the sum is eventually less than ½ away from 1, and eventually less than ¼ away from 1, and less than ⅛ away from 1, and less than ⅟₁₆, and less than ⅟₃₂, and so on. It gets closer to 1 than any small number ϵ someone can name.

If we take that intuition and write a formal definition of what it means to converge, we end up with the definition that mathematicians use:

Def. An infinite sum of real numbers a1 + a2 + a3 + ... converges to a real number a if, for any ϵ > 0, there exists an integer N so that for every nN, |a – (a1 + a2 + a3 + ... + an)| < ϵ.

What in the world does that mean?

It means just what is written above. Suppose you have an infinite sum and someone doesn't believe it converges to a final value a. So they say "I bet it doesn't get closer than ½," and you have to find some N so that after N terms, the distance from the partial sum to a is less than ½. In the definition above, it's taking ϵ = ½ and then we go out far enough that the sum is less than ½ away from its goal: |a – (a1 + a2 + a3 + ... + an)| < ½.

Of course, it can't just work for ½. If they keep playing that game, and it always gets closer than whatever number they can name, then it converges. This definition makes the "game" we played precise enough to write mathematical proofs about it.

To me, the fact that you can be mathematically exact about how to add infinitely many numbers together is truly amazing. And now hopefully the Leibniz formula tempted you to learn a new bit of math, too!


Even more math this pi day!

Check out our blog post to tackle an extra math challenge!