DEVSQ Function in Excel: Sum of Squared Deviations

DEVSQ Function in Excel: Sum of Squared Deviations featured illustration

πŸ“Ž This article includes 1 downloadable practice file ↓

⏱ 2 min readUpdated 28 September 2026

StatisticsLevel: ExpertAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. DEVSQ in practice
  5. Where you will use it
  6. Worked example
  7. Mistakes people make
  8. Related functions
  9. Continue learning

DEVSQ adds up how far each value is from the mean, squared. It is the raw ingredient of variance and of ANOVA tables.

Advertisement

Syntax

=DEVSQ(number1, [number2], ...)
Argument What it means
number1… Values.

Examples

Example 1

=DEVSQ(B2:B13)/(COUNT(B2:B13)-1)

Same result as VAR.S β€” handy for showing where variance comes from.

DEVSQ in practice

Where you will use it

  • Sum of squared deviations for stats
  • Variance by hand
  • Regression basics

Worked example

Rows usedFormulaResult
3=DEVSQ(INDEX({120,135,128,160,95,140,132},SEQUENCE(A2)))112.6666667
5=DEVSQ(INDEX({120,135,128,160,95,140,132},SEQUENCE(A3)))2225.2
7=DEVSQ(INDEX({120,135,128,160,95,140,132},SEQUENCE(A4)))2358

Results calculated in Excel.

Mistakes people make

MistakeWhat to do instead
Confusing with VARVAR = DEVSQ/(n-1)
TextIgnored

VAR.S Β· SUMSQ

πŸ“š Part of the free Excel course: Beginner β†’ Expert Β· Try it in the Formula Lab or ask the AI Helper.

⚑ Interactive Practice Lab & Formula Tester:

Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.

πŸ“Ž Practice files for this article

  • πŸ“—
    Practice workbook: Statistics advanced33 tasks on realistic sales data β€” type your formula, the Check column turns green when it is right. Answers sheet included.
    ⬇ XLSX Β· 36 KB

Free to use for learning. Files with macros (.bas) are plain text β€” import them with Alt+F11 β†’ File β†’ Import File, and always test on a copy.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free Β· AI can be wrong