Sum of First N Cubes Calculator

Enter n to get the sum of the first n cubes and the corresponding triangular number.

Result

3,025
55

How it is calculated

The sum of the first n cubes is 1³ + 2³ + … + n³ = (n(n+1)/2)². First the tool finds the nth triangular number T = n(n+1)/2 (the sum 1 + 2 + … + n), then squares it. Both T and the sum are shown with thousands separators. n must be a whole number from 1 to 13,776: decimals such as 5.5, zero and negatives give no result, and so does anything above 13,776, because the square would no longer be exactly representable and the digits shown could be wrong. For n = 13,776 the sum is 9,005,246,260,992,576. The cubes start at 1³, so 0³ is not part of the sum, and only consecutive cubes from 1 are covered, not arbitrary cubes.

Worked example

For n = 10: the triangular number is 10 × 11 ÷ 2 = 55. Squared, 55² = 3,025. Adding the cubes one by one confirms it: 1 + 8 + 27 + 64 + 125 + 216 + 343 + 512 + 729 + 1000 = 3,025. The tool shows the triangular number, 55, next to the sum.

Try this example →

Common mistakes

  • Squaring n(n+1) and forgetting to halve it first; that gives a result four times too large.
  • Confusing this with the sum of the first n squares, which has a different formula, n(n+1)(2n+1)/6; for n = 10 that sum is 385, not 3,025.
  • Entering n as a decimal or with a unit; the tool accepts only whole numbers.
  • Using it for cubes that do not start at 1³ or skip terms (for example only odd numbers); the identity covers consecutive cubes from 1³ to n³ only.
  • Entering the last cube (1000) instead of n (10); n is the count of terms and the largest base, not the last cube.

About this calculator

This calculator uses Nicomachus's theorem, a classical identity in number theory: the sum of the first n cubes, 1³ + 2³ + … + n³, always equals the square of the nth triangular number, (n(n+1)/2)². That's a striking result — a sum of cubes collapsing into a perfect square — and it means the answer can be computed instantly without adding a single term.

It's a staple example in discrete mathematics and proof-by-induction courses, and the closed-form formula is useful whenever an exact sum of cubes is needed for large n without brute-force summation. Here n must be a whole number from 1 to 13,776; beyond that the result would no longer be exact, so no answer is shown.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators