Sum of Squares Calculator
Add the squares of a list of whole numbers exactly, with the separators and the 10,000-value cap stated.
What the sum of squares calculator does
It squares every number in the list you paste and adds the results: 1, 2, 3, 4 becomes 1 + 4 + 9 + 16 = 30. The arithmetic is done with BigInt, so the total is exact even when a square passes the range a JavaScript number can hold without rounding.
The separators are a space, a comma, a semicolon or a new line, and you can mix them: 1 2;3\n4 is the same list as 1, 2, 3, 4. Only whole numbers are accepted; a decimal point or a stray word is refused and the token is named by its position.
Each operand may have at most 15 digits, and the list may hold at most 10,000 values. Both caps are stated because a page that quietly freezes on a large paste is worse than one that says no.
How to use it
Paste the whole numbers into the text box, separated by spaces, commas, semicolons or new lines.
Press Run. The result prints the exact sum of squares and how many values were included.
Worked example
Input:
1, 2, 3, 4
Output:
Sum of squares: 30
Values: 4 values
Why it runs in your browser
The squares and the total are computed in this tab with BigInt. Your list is never uploaded or stored.
Square every number in a list and add the results. 1, 2, 3, 4 becomes 1 + 4 + 9 + 16, so the sum is 30.
The arithmetic uses BigInt, so the total is exact even when a square passes the range a JavaScript number can hold without rounding.
Numbers are separated by spaces, commas, semicolons or new lines, and the page prints how many values it included.
What the sum of squares is
The sum of squares is the total you get by multiplying each value by itself and adding the products. It is used in statistics, where it measures spread, and in geometry, where it is the squared length of a vector. This page computes the plain integer version of it.
The separators are space, comma, semicolon and new line, and they can be mixed. Negative values are allowed and square to positive numbers, so -3 contributes 9, the same as 3.
The total is accumulated in BigInt, not a double, which is why a value such as 100000000000000 can be squared without losing digits. Each operand may have at most 15 digits, and the list may hold at most 10,000 values; both caps are stated so a large paste is refused rather than allowed to freeze the tab.
How to use Sum of Squares Calculator
Paste the whole numbers into the text box, separated by spaces, commas, semicolons or new lines.
Press Run. The result prints the exact sum of squares and the number of values that were included.
Only whole numbers are accepted. A decimal point or a stray word is refused, and the text box keeps what you typed while the error names the token by its position in the list.
What to Expect
Best for
- An exact sum of squares for a list of integers
- A quick check before a statistical formula
- Squaring values too large for exact double arithmetic
Not ideal for
- Lists containing decimals or fractions
- Lists longer than 10,000 values
What this tool keeps
- Every value in the list, in order
- Exactness: the total is a BigInt, not a rounded double
What may need cleanup
- A decimal value is refused rather than rounded
- A cap of 10,000 values applies even when the paste is small in bytes
Common errors
- Enter at least one whole number
- Not a whole number: token 2 is "x"
- Too many values: this page takes at most 10000
Example use cases
- Checking a sum-of-squares step in a statistics exercise
- Computing the squared length of an integer vector
Sample input
The list 1, 2, 3, 4.
Sample output
Sum of squares: 30, from 4 values.
Who this is for
- Students working through a statistics formula
- Anyone who needs an exact total for integer data
Frequently asked questions
Are negative numbers allowed?
Yes. A negative value squares to a positive number, so -3 adds 9 exactly as 3 does. The page does not take absolute values first; squaring already does that.
Why are decimals refused?
The page promises an exact integer total, and a decimal square is rarely exact in binary floating point. Refusing it keeps the claim honest; use a statistics tool that states its precision for decimal data.
What is the largest list?
10,000 values, each with at most 15 digits. A longer list is refused with its count, and an operand over 15 digits is refused with its value.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.