Sum of Squares Calculator

Calculate sum of squares (SS), variance, and ANOVA decomposition. Shows SS total, SS between, SS within, F-statistic, and detailed deviation breakdowns.

About the Sum of Squares Calculator

The Sum of Squares Calculator computes the total sum of squared deviations from the mean for a single dataset or decomposes it into between-group and within-group components for ANOVA analysis. Sum of squares is the foundation of variance, standard deviation, and nearly all inferential statistics.

For a single dataset, the calculator shows SS = Σ(xᵢ − x̄)², the variance, standard deviation, and a complete deviation breakdown table showing how each observation contributes to the total variability. The cumulative SS column reveals how variability builds across your data.

For multiple groups, the tool performs the classic ANOVA decomposition: SS Total = SS Between + SS Within. The resulting ANOVA table shows mean squares, the F-statistic, and eta-squared (η²) to measure effect size. A visual decomposition bar shows the proportion of variance explained by group differences versus individual variation. Check the example with realistic values before reporting. Use the steps shown to verify rounding and units. Cross-check this output using a known reference case.

Why Use This Sum of Squares Calculator?

Sum of squares is the fundamental building block of descriptive and inferential statistics. Variance, standard deviation, regression, ANOVA, chi-square tests, and virtually every statistical method involves computing Σ(x − mean)² in some form. Understanding SS helps you understand all of statistics.

This calculator goes beyond a simple computation: it shows the full deviation breakdown, cumulative contributions, and (for multiple groups) the ANOVA decomposition with F-test. The visual contribution bars immediately reveal which observations drive the most variability in your data.

How to Use This Calculator

  1. Choose single dataset mode or multi-group ANOVA mode.
  2. Enter comma-separated values in the data field(s).
  3. For ANOVA, provide at least two groups of data.
  4. Use preset buttons for quick examples.
  5. Review SS, variance, and deviation breakdown for single data.
  6. For groups, examine the ANOVA table and SS decomposition.
  7. Check the visual contribution bars to spot influential observations.

Formula

SS Total = Σ(xᵢ − x̄)² = Σxᵢ² − (Σxᵢ)²/n. ANOVA: SS Between = Σnⱼ(x̄ⱼ − x̄..)², SS Within = ΣΣ(xᵢj − x̄ⱼ)², F = MSBetween / MSWithin.

Example Calculation

Result: SS = 374.4, Variance = 41.6, Std Dev = 6.45, Mean = 86.4

With n=10 and mean=86.4, each deviation is squared and summed: (85-86.4)² + (90-86.4)² + ... = 374.4. Dividing by n-1=9 gives variance = 41.6 and std dev = 6.45.

Tips & Best Practices

Computational Forms of SS

There are two algebraically equivalent ways to compute sum of squares. The definitional form Σ(xᵢ − x̄)² subtracts the mean from each value, then squares and sums. The computational shortcut Σxᵢ² − (Σxᵢ)²/n avoids computing deviations and is less prone to rounding error with large numbers.

ANOVA Decomposition

The fundamental identity SS Total = SS Between + SS Within partitions total variability into explained and unexplained components. If groups truly differ, between-group variability will be large relative to within-group variability. The F-ratio quantifies this comparison, and eta-squared measures effect size.

Beyond One-Way ANOVA

When you have two or more factors, two-way ANOVA further decomposes SS Between into main effects and interactions. The same SS logic applies: each factor's effect is isolated by computing the SS attributable to that factor while accounting for others. Factorial designs provide more information from the same data.

Frequently Asked Questions

Why divide SS by n−1 instead of n?

Dividing by n−1 (Bessel's correction) gives an unbiased estimate of the population variance. The sample mean is already fitted to the data, reducing the effective degrees of freedom. This matters most for small samples.

What is the correction factor?

The correction factor (Σx)²/n converts the raw sum of squares (Σx²) into the sum of squared deviations. SS = Σx² − CF. This shortcut formula avoids computing individual deviations.

How does ANOVA use sum of squares?

ANOVA partitions total variability into between-group and within-group components. If groups differ, SS Between is large relative to SS Within, producing a large F-statistic. This tests whether group means differ significantly.

What is eta-squared (η²)?

η² = SS Between / SS Total measures the proportion of variance explained by group membership. It's an effect size: 0.01 is small, 0.06 is medium, 0.14 is large (Cohen's guidelines).

Can I have unequal group sizes?

Yes. The calculator handles unequal group sizes correctly. The between-group SS weights each group by its size nⱼ, so larger groups contribute proportionally more to the between-group variation.

What if my SS value is very large?

SS depends on the scale of measurement and sample size. Always interpret SS in context by converting to variance (SS/df), standard deviation, or coefficient of variation. These standardized measures are more meaningful than raw SS.

Related Pages