How can adding up every positive whole number, forever, give you a negative fraction?
That equation shows up on t-shirts, in a viral Numberphile video, and, more surprisingly, in real physics calculations about the energy between two metal plates. And it looks completely broken. Every term you add is positive. The total should shoot up toward infinity and never come back.
It does shoot up toward infinity. That part is true. But there's a second, more careful sense in which the number "attached" to this series is . Let's build up to it slowly, because the honest version of this story is way more interesting than the t-shirt.
The sum you'd expect: it just keeps growing
Let's start with the boring, correct answer. If you add up the first whole numbers, you get:
Plug in bigger and bigger , and gets bigger and bigger. No ceiling. No settling down. Watch it happen.
Each bar is the next whole number we add. Drag N up, or hit play, the total never levels off.
Slide N up, or hit play. The bars keep climbing and so does the total. In ordinary arithmetic, this series has no finite sum. Full stop. Whatever means, it does not mean "the sum" in the way you learned the word in school.
So why does anyone write that equation at all?
A stranger series: when "infinity" oscillates instead of grows
Before we touch , let's warm up with an easier troublemaker:
This one doesn't grow, it flips. Add the terms one at a time and the running total bounces between and forever: . It never picks a side, so in the usual sense it doesn't converge either.
But here's the thing. If a total is going to bounce between two values forever, its long-run average is a pretty reasonable stand-in for "the answer." And the average of and , over any long stretch, edges toward .
The partial sums (dots) just flip between 0 and 1 forever. But their running average (line) settles down. Hover a dot for its value.
Watch the dots flip between and . Now watch the line, the running average of all the partial sums so far. It doesn't flip. It calmly settles at . This averaging trick is called Cesàro summation, and it's the first real hint that a divergent series can still carry a sensible number, if you're willing to ask a different question than "what does it add up to."
From flip-flops to a value for 1 − 2 + 3 − 4 + ...
Now bump the difficulty up one notch:
This series doesn't oscillate between two fixed numbers, its partial sums grow in size while flipping sign: . Straight Cesàro averaging doesn't tame it. But there's a slicker move. Notice that if you add to a copy of itself shifted over by one slot, the terms interleave and mostly cancel, leaving something proportional to the flip-flop series from before. Work through that bookkeeping and you land on:
We're not claiming the partial sums of actually approach , they don't, they swing wider and wider. We're saying is the value a consistent regularization scheme assigns to it. Keep that number in your pocket. It's about to do some heavy lifting.
Ramanujan's slick shortcut
Here's the famous move, the one behind the t-shirt equation. Let:
Now line up against and subtract them term by term.
Line S up against S₂ = 1 − 2 + 3 − 4 + ... and subtract column by column. Hover a column to see the cancellation.
Hover over a column. On the odd positions, the terms are identical in and , so they cancel to zero. On the even positions, has a minus sign where has a plus, so subtracting doesn't cancel, it doubles the term. Do this for every column and the pattern is unmistakable:
So , which rearranges to . And we already found . So:
There it is. But be suspicious of this derivation, not convinced by it. We just shifted a divergent series over by one slot and subtracted it from itself, and shifting or rearranging an infinite sum is only guaranteed to be safe when the sum actually converges. doesn't. This trick is a shortcut that happens to land on the right answer, not a proof of it. For the real proof, we need to leave "sums" behind entirely and go look at a function.
The rigorous version: meet the zeta function
Define a function of , not a single number, a whole function:
For , this series genuinely converges. , , no controversy at all, just ordinary infinite sums with ordinary finite answers.
Here's the key idea: turns out to be a smooth, well-behaved curve for , and there's exactly one way to extend that curve to a smooth function defined almost everywhere else too. This extension is called analytic continuation, and it's not "redefining the sum." The sum genuinely stops meaning anything once . What continues is the function, using a completely different formula that happens to agree with the sum wherever the sum works, and stays well-defined where the sum doesn't.
This curve is the real Riemann zeta function. Drag the marker down to s = −1 and watch where it lands.
Drag the marker along the curve. For (green, solid), the curve matches the direct sum exactly, you can check it in the readout. Past there's a genuine wall, an actual pole where the function shoots to infinity, exactly where the original sum stops converging. But the continued curve (blue, dashed) keeps going on the other side. Slide down to ...
...and the curve passes through . Not approximately. Exactly.
That's the actual, rigorous statement. Not " sums to ," but "the analytic continuation of the zeta function takes the value at the input ." The formula just happens to look exactly like if you carelessly plug into it, which is where the confusing shorthand comes from.
So does 1 + 2 + 3 + ... really equal -1/12?
No, not in the sense you learned addition. The literal sum diverges, we showed you that in the very first section, and nothing later changed that. What's true is narrower and, honestly, cooler: there is a well-defined, rigorously constructed function that agrees with this series everywhere the series converges, and that function's value at the one input that "looks like" our series is . Mathematicians call assigning that value to the series zeta function regularization, and Ramanujan's own version of the same idea is called Ramanujan summation.
Why does anyone care about a "fake sum"? Because in physics, calculations for things like the Casimir effect (a measurable force between two uncharged metal plates in a vacuum) and the vibration modes of strings in string theory naturally produce expressions that look exactly like . Swap in the regularized value and the physics matches real experiments, to high precision. The divergent-looking sum was never really "infinity minus something," it was a stand-in for a finite, physical quantity the whole time, and is how you read it off correctly.
The short version
The literal sum diverges to infinity, full stop, no trick changes that. Separately, mathematicians can extend well-behaved functions like past the region where their defining sum converges, using analytic continuation, a rigorous and unique extension, not a redefinition. That extended function happens to take the value at , an input that superficially resembles our series. Ramanujan's shift-and-subtract algebra is a fast, informal way to stumble onto the same number, which is why it works, even though the manipulation itself bends rules that only hold for convergent series. The number is real and useful, the "sum" in the popular headline is a shorthand that skips the interesting part.
All visualizations are interactive React components running entirely in your browser. The zeta curve uses the globally-convergent Euler-transform series for the Dirichlet eta function, verified numerically against known values like . No libraries beyond React.