Enter the number of pairs, n, to calculate 1² − 2² + 3² − 4² + … + (2n−1)² − (2n)². There are 2n terms, starting with a positive square and ending with a negative square. Use a whole number from 0 to 10,000,000. For n = 0, the empty sum is 0.
Group consecutive terms into pairs. Each pair simplifies to (2k−1)² − (2k)² = 1 − 4k. Adding these expressions for k = 1 through n gives n − 4[n(n+1)/2] = −2n² − n = −n(2n+1).
For example, n = 3 means six terms: 1 − 4 + 9 − 16 + 25 − 36 = −21. The formula gives the same result: −3 × 7 = −21.
| Pairs (n) | Terms (2n) | Sum |
|---|---|---|
| 0 | 0 | 0 |
| 1 | 2 | −3 |
| 2 | 4 | −10 |
| 3 | 6 | −21 |
| 5 | 10 | −55 |
| 10 | 20 | −210 |
| 100 | 200 | −20,100 |
The finite sum requires a nonnegative whole number of pairs. Fractional or negative n does not describe this sequence. The input step is 1; use whole numbers even if your browser allows other values to be typed. The upper bound keeps the calculation comfortably within standard numeric integer precision. An unavailable result indicates a calculation or numeric-range problem; it must not be interpreted as zero.
Does n mean the number of terms?
No. n counts pairs, so there are 2n terms. To end at −20², enter n = 10.
Why is the answer negative?
For n > 0, each pair subtracts an even square from the preceding, smaller odd square. Every pair is negative, so their sum is negative.
Does this cover a sum ending in a positive odd square?
This calculator covers an even number of terms ending in −(2n)². A sum ending in +(2n−1)² instead equals n(2n−1), for positive integer n.
Image creation required: no registered thumbnail asset was supplied. Before activation, create and register a 400 × 400 pixel WebP thumbnail and insert it as the first image block. Use the cheerful yellow five-point star mascot with hands, floating without separate legs or feet, on a white background with playful navy, blue and teal square-number graphics. Inspect neighboring thumbnails for style consistency. Renderer integration and functional QA are also required before activation.

