Sum of Squares Calculator

Compute the sum of the squares of the first n natural numbers.

Results assume integer inputs and ideal arithmetic.

Examples

  • n = 3 ⇒ 14
  • n = 5 ⇒ 55

FAQ

Does n have to be an integer?

Yes, the formula applies to positive integers.

What is the formula used?

n(n+1)(2n+1)/6.

Can n be zero?

Yes, the result will be zero.

Why is this useful?

It's common in statistics and series calculations.

Additional Information

  • The formula dates back to ancient mathematicians.
  • Useful in variance and physics computations.