Sum Of Squares CalculatorFree online math calculator — instant results, no sign-up

Calculate the sum of squared integers from one through n.

Inputs

Result
385

Sign in to save results and favorites.

About the Sum Of Squares Calculator

The Sum Of Squares Calculator finds the total of the squared integers from 1 through your chosen upper integer, n. It includes every integer in that range and includes n itself. With the default upper integer of 10, the result is 385.

Upper integer
The unitless positive integer n that sets the last term in the sum, with a default value of 10.

Formula and method

S = ∑(k², k = 1 to n) = n(n + 1)(2n + 1) / 6; for n = 10, S = 10 × 11 × 21 / 6 = 385.
  • SThe sum of the squares of all integers from 1 through n.
  • nThe upper integer, included in the sum.
  • kThe integer index that takes each value from 1 through n.
  • ∑The summation symbol, indicating that each k² in the specified range is added.

Use the closed-form sum-of-squares formula rather than squaring and adding every integer individually. Multiply n by n + 1 and 2n + 1, then divide the product by 6. For the default input, this gives 10 × 11 × 21 / 6 = 385.

Worked example

These are the calculator's starting values and the results it actually produces for them.

Inputs

  • Upper integer10

Results

  • Result385

How to use the Sum Of Squares Calculator

  1. 1Enter a positive whole number in Upper integer, or leave the default value of 10.
  2. 2Treat this value as n: the sum starts at 1 and includes n² as its final term.
  3. 3Run the calculation to evaluate n(n + 1)(2n + 1) / 6.
  4. 4Read the Result row; with Upper integer set to 10, it shows 385.

Reading your result

The Result row gives the unitless total of the squared integers from 1 through the upper integer. For the default input, Result = 385 means 1² + 2² + 3² + 4² + 5² + 6² + 7² + 8² + 9² + 10² = 385. It is not the square of the sum of those integers.

Limitations

The intended input is a positive integer, and the range always starts at 1. Fractions and negative values do not define the intended sequence, even though the polynomial can be evaluated at those values. This tool does not calculate the sum of squares of an arbitrary list or statistical squared deviations. The formula is exact for positive integers, but very large inputs may exceed the implementation's numeric precision or display limits.

Common questions

Is the upper integer included in the sum?+

Yes. With Upper integer set to 10, the final term is 10², and all squared integers from 1² through 10² are included.

Why does the default input give 385 rather than 100?+

100 is only the final term, 10². The calculator adds that term to the squares of every preceding positive integer, giving a total of 385.

Is a sum of squares the same as squaring a sum?+

No. This calculator squares each integer first and then adds the results. Squaring the sum instead would also introduce cross-product terms and would produce a different value.

Does the calculator need to add every square individually?+

No. The identity n(n + 1)(2n + 1) / 6 gives the same total directly, without listing or adding all n squared terms.

Does the calculator save my information?+

Calculations run in your browser. While signed in, inputs and results are automatically recorded in account history; saving a result creates a separate saved record.

You might also like

Results are estimates for informational purposes and are not financial, medical or legal advice.