Home / 🧮 Distributions & Plots/ Sum of Squares Calculator
Data Set
Please enter at least 1 valid number.
Sum of Squared Deviations (SS)
Σ (x - x̄)²
Sum of Squares (Σ x²)
Mean (x̄)
Variance: (Sample) | (Population)

A Sum of Squares Calculator (also known as an SS Utility) calculates the total mathematical dispersion of a dataset. It measures exactly how far every single data point strays from the center average, squares those distances to remove negative signs, and adds them all together. The resulting number forms the absolute mathematical foundation for finding Variance, Standard Deviation, and performing Regression Analysis.

Why do we square the distances? If you have two numbers, 0 and 20, the average is 10. The first number is -10 away from the average, and the second is +10 away from the average. If you just add those raw deviations together (-10 + 10), you get exactly 0. It falsely looks like there is no variation at all! By squaring the deviations (-10 becomes 100, and +10 becomes 100), the Sum of Squares perfectly captures the true physical spread (200) without negative numbers cancelling out positive numbers.

Our free online Sum of Squares Calculator provides instant execution for foundational dispersion math:

  • Sum of Squares Formula: SS = ∑(x - μ)2
  • Calculate Mean (μ): Automatically finds the exact center of your data.
  • Find Deviations (x – μ): Calculates the raw distance of every data point from the center.
  • Square & Sum: Multiplies every deviation by itself and aggregates the final unscaled spread.

Master Squared Deviation Reference Table (Test Scores: N = 5)

The table below tracks a classroom of 5 students taking a pop quiz (scored out of 10 points). To determine how wildly the test scores varied, we must first calculate the total Sum of Squares. (Dataset: 2, 4, 6, 8, 10):

Student Test Score (x) Raw Deviation (x – μ) Squared Deviation (x – μ)2
Student 1 2 2 – 6 = -4 -4 × -4 = 16
Student 2 4 4 – 6 = -2 -2 × -2 = 4
Student 3 6 6 – 6 = 0 0 × 0 = 0
Student 4 8 8 – 6 = +2 2 × 2 = 4
Student 5 10 10 – 6 = +4 4 × 4 = 16
BASE METRICS Mean (μ) = 6 Sum of Deviations = 0
SUM OF SQUARES (SS) Add the right column together Total SS = 40

Step-by-Step Sum of Squares Calculation

To extract the exact Sum of Squares for the test scores:

Step 1 (Find the Mean): Add all scores (30) and divide by 5. The Mean (μ) is exactly 6.

Step 2 (Find Deviations): Subtract 6 from every individual test score. (e.g., 2 - 6 = -4).

Step 3 (Square Deviations): Multiply every resulting deviation by itself. (e.g., -4 × -4 = 16). Notice all numbers are now positive.

Step 4 (Sum the Squares): Add all the squared numbers together (16 + 4 + 0 + 4 + 16 = 40).

Conclusion: The dataset has a Sum of Squares of 40. If the teacher wants to find the Variance next, they simply take that 40 and divide it by the sample size minus one (N-1).


Advanced Statistics: The 3 Types of Sum of Squares

In standard descriptive statistics, you only calculate one total Sum of Squares. However, if you are performing ANOVA or Regression Analysis (drawing a line of best fit through a scatter plot), the SS breaks down into three distinct components.

SS Type Statistical Meaning Formula Logic
Total Sum of Squares (TSS) The total variation in the data before drawing any predictive regression lines. Measures the distance from the data points to the horizontal Mean line.
Explained Sum of Squares (ESS) The amount of variation that your regression model successfully explains/predicts. Measures the distance from the Regression line to the Mean line.
Residual Sum of Squares (RSS) The “Error.” The amount of chaotic variation your model completely failed to predict. Measures the distance from the data points to the Regression line.

History & Mathematics: The Method of Least Squares

Navigating the Oceans

The core concept of squaring deviations was not invented by modern data scientists; it was invented by astronomers. During the Age of Exploration in the early 1800s, scientists were desperately trying to map the exact movement of stars and comets to help ships navigate the oceans safely. However, telescope measurements were constantly filled with random observational errors. Legendary mathematicians Adrien-Marie Legendre (1805) and Carl Friedrich Gauss (1809) independently published the Method of Least Squares. By squaring the errors and drawing a line that minimized the “Sum of Squares,” they successfully predicted the orbit of the lost dwarf planet Ceres, birthing the foundation of modern regression analysis.


Popular direct tools:


Frequently Asked Questions (FAQ)

Can the Sum of Squares ever be negative?

Absolutely never. Because any number (even a massive negative number) becomes positive when you multiply it by itself (square it), it is mathematically impossible for the final Sum of Squares to drop below zero. If you calculate an SS of -10, you made an arithmetic error during the squaring phase.

What does a Sum of Squares of exactly zero mean?

If your Sum of Squares is exactly 0, it means there is absolutely zero variation in your dataset. Every single data point in your set is the exact same number. Because every number is identical, the mean is identical to the numbers, meaning every single deviation is 0. (e.g., [10, 10, 10, 10] yields an SS of 0).

How do I turn the Sum of Squares into the Standard Deviation?

The Sum of Squares (SS) is just step one. To get the Standard Deviation, you first divide the SS by your sample size minus one (N-1). That gives you the Variance. Then, you simply take the square root of the Variance to find the Standard Deviation.