DEVSQ Function

Excel 2007+

Summary

The DEVSQ function calculates the sum of the squared deviations of a set of values from their sample mean. This is a key statistical measure used in variance calculations and regression analysis.

Syntax

DEVSQ(number1, [number2], ...)

Parameters

Parameter Type Required Description
number1 Number Yes First required number, range, or array containing numeric values
[number2], ... Number No Optional numbers, ranges, or arrays (1 to 255 total arguments)

Using the DEVSQ Function

DEVSQ is primarily used in statistical analysis to calculate the sum of squared deviations needed for sample variance. Divide the DEVSQ result by (n-1) where n is the count of data points to get sample variance. It's commonly used in quality control, research data analysis, and financial modeling.

Common DEVSQ Examples

Basic Sample Data Analysis

=DEVSQ(4,5,8,7,11,4,3)

Calculates sum of squared deviations for test scores: 48

Range Reference Example

=DEVSQ(A2:A8)

Processes entire range of values from cells A2 through A8

Combine with VAR.S

=DEVSQ(A1:A10)/(COUNTA(A1:A10)-1)

Calculates sample variance using DEVSQ result

Frequently Asked Questions

DEVSQ returns raw sum of squared deviations; VAR.S divides by (n-1) to give variance.

Empty cells are ignored, but cells containing zero are included in calculations.

DEVSQ uses sample mean (divides by n-1 for variance compatibility).

Common Errors and Solutions

#VALUE! error

Cause: Arguments contain text that can't convert to numbers or error values

Solution: Ensure all arguments contain valid numeric data

#DIV/0! error

Cause: All arguments are identical (zero deviation)

Solution: Verify data contains variation or use different function

Notes

  • Logical values typed directly into arguments are counted
  • Use DEVSQ result divided by (n-1) for sample variance
  • Perfect companion to COUNT and AVERAGE functions
  • Available since Excel 2007

Compatibility

Available in: Excel 2007, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 2021, Microsoft 365

Not available in: Excel 2003 and earlier

Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+