Why Does 1 + 2 + 3 + ... = -1/12? The Ramanujan Summation Explained

Add up every positive whole number, forever, and you should get infinity. Instead there's a famous equation that says you get -1/12. Here's what's actually going on, and why physicists take it seriously.

By Petrus Sheya

July 31, 2026 · 7 min read

How can adding up every positive whole number, forever, give you a negative fraction?

1+2+3+4+=1121 + 2 + 3 + 4 + \cdots = -\frac{1}{12}

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 1/12-1/12. 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 NN whole numbers, you get:

SN=1+2+3++N=N(N+1)2S_N = 1 + 2 + 3 + \cdots + N = \frac{N(N+1)}{2}

Plug in bigger and bigger NN, and SNS_N 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.

term 1 = 1term 2 = 2term 3 = 3term 4 = 4term 5 = 5term 6 = 6keeps climbing...
Terms added6
1 + 2 + ... + N21

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 1/12-1/12 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 1+2+3+1+2+3+\cdots, let's warm up with an easier troublemaker:

11+11+11+1 - 1 + 1 - 1 + 1 - 1 + \cdots

This one doesn't grow, it flips. Add the terms one at a time and the running total bounces between 11 and 00 forever: 1,0,1,0,1,0,1, 0, 1, 0, 1, 0, \ldots. 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 11 and 00, over any long stretch, edges toward 12\frac{1}{2}.

The partial sums (dots) just flip between 0 and 1 forever. But their running average (line) settles down. Hover a dot for its value.

settles at 1/2n=1: partial sum S = 1n=2: partial sum S = 0n=3: partial sum S = 1n=4: partial sum S = 0n=5: partial sum S = 1n=6: partial sum S = 0n=7: partial sum S = 1n=8: partial sum S = 0n=9: partial sum S = 1n=10: partial sum S = 0n=11: partial sum S = 1n=12: partial sum S = 0
Partial sum S_N0
Cesàro average0.5000

Watch the dots flip between 00 and 11. Now watch the line, the running average of all the partial sums so far. It doesn't flip. It calmly settles at 0.50.5. 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:

S2=12+34+56+S_2 = 1 - 2 + 3 - 4 + 5 - 6 + \cdots

This series doesn't oscillate between two fixed numbers, its partial sums grow in size while flipping sign: 1,1,2,2,3,3,1, -1, 2, -2, 3, -3, \ldots. Straight Cesàro averaging doesn't tame it. But there's a slicker move. Notice that if you add S2S_2 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:

S2=14S_2 = \frac{1}{4}

We're not claiming the partial sums of S2S_2 actually approach 14\frac{1}{4}, they don't, they swing wider and wider. We're saying 14\frac{1}{4} 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:

S=1+2+3+4+5+6+S = 1 + 2 + 3 + 4 + 5 + 6 + \cdots

Now line SS up against S2=12+34+56+S_2 = 1 - 2 + 3 - 4 + 5 - 6 + \cdots 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.

SS₂S−S₂1+102-243+304-485+506-612odd columns cancel to 0, even columns leave 4× the original termS − S₂ = 4S → −3S = S₂ = 1/4 → S = −1/12
S₂ partial sum-3
S₂'s true value1/4
Implied S−1/12

Hover over a column. On the odd positions, the terms are identical in SS and S2S_2, so they cancel to zero. On the even positions, S2S_2 has a minus sign where SS has a plus, so subtracting doesn't cancel, it doubles the term. Do this for every column and the pattern is unmistakable:

SS2=4+8+12+16+=4(1+2+3+4+)=4SS - S_2 = 4 + 8 + 12 + 16 + \cdots = 4(1 + 2 + 3 + 4 + \cdots) = 4S

So SS2=4SS - S_2 = 4S, which rearranges to 3S=S2-3S = S_2. And we already found S2=14S_2 = \frac{1}{4}. So:

3S=14S=112-3S = \frac{1}{4} \quad\Longrightarrow\quad S = -\frac{1}{12}

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. SS 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 ss, not a single number, a whole function:

ζ(s)=n=11ns=11s+12s+13s+\zeta(s) = \sum_{n=1}^{\infty} \frac{1}{n^s} = \frac{1}{1^s} + \frac{1}{2^s} + \frac{1}{3^s} + \cdots

For s>1s > 1, this series genuinely converges. ζ(2)1.645\zeta(2) \approx 1.645, ζ(3)1.202\zeta(3) \approx 1.202, no controversy at all, just ordinary infinite sums with ordinary finite answers.

Here's the key idea: ζ(s)\zeta(s) turns out to be a smooth, well-behaved curve for s>1s>1, 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 ns\sum n^{-s} genuinely stops meaning anything once s1s \le 1. 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.

poleζ(−1) = −1/12
ζ(s)-0.08333
Direct sum Σ n⁻ˢdiverges
Regioncontinuation only

Drag the marker along the curve. For s>1s > 1 (green, solid), the curve matches the direct sum exactly, you can check it in the readout. Past s=1s = 1 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 s=1s = -1...

...and the curve passes through 112-\frac{1}{12}. Not approximately. Exactly.

ζ(1)=112\zeta(-1) = -\frac{1}{12}

That's the actual, rigorous statement. Not "1+2+3+1+2+3+\cdots sums to 1/12-1/12," but "the analytic continuation of the zeta function takes the value 1/12-1/12 at the input 1-1." The formula ns\sum n^{-s} just happens to look exactly like 1+2+3+1+2+3+\cdots if you carelessly plug s=1s=-1 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 112-\frac{1}{12}. 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 1+2+3+1+2+3+\cdots. 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 1/12-1/12 is how you read it off correctly.


The short version

The literal sum 1+2+3+1+2+3+\cdots diverges to infinity, full stop, no trick changes that. Separately, mathematicians can extend well-behaved functions like ζ(s)=ns\zeta(s) = \sum n^{-s} 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 112-\frac{1}{12} at s=1s=-1, 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 ζ(2)=π2/6\zeta(2)=\pi^2/6. No libraries beyond React.