DEVSQ Function in Apple Numbers: Sum of Squared Deviations
Understand the unnormalised sum of squared deviations with Apple-documented scalar arguments and verifiable examples.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Apple Numbers. How formula examples are checked
Quick answer: For four readings 2, 4, 6, 8, the formula =DEVSQ(2,4,6,8) returns 20 in independently calculated arithmetic. DEVSQ is the sum of squared differences from the group’s arithmetic mean; it is not itself a variance or a standard deviation because it does not divide by n or n−1. [A1, C1]
Exact official syntax and argument types
=DEVSQ(num-value, num-value…)
| Argument | Required? | Exactly what Apple specifies |
|---|---|---|
num-value |
Yes | One numeric value. |
num-value… |
No | One or more additional numeric values. |
Apple’s 15.4 DEVSQ page describes num-value as a number value, not as a number-or-collection argument. Therefore this guide intentionally uses separate literals or separately referenced numeric cells. Do not assume =DEVSQ(B2:B5) is officially supported: that range form was not verified by the provided Apple DEVSQ specification, even though other Apple statistical functions explicitly support collections. If you need a large dynamic range, consider documented VARP with an independently established count, or verify any proposed DEVSQ range form natively. [A1, A2]
In ordinary mathematics, for inputs x₁...xₙ, DEVSQ = Σ(xᵢ−mean)² where mean=(x₁+...+xₙ)/n. Apple supplies no alternative mode or divisor argument. One numeric value gives mathematical zero deviation, although native edge-case acceptance was not tested here; use multiple values for reproducible examples. [A1, C1]
Numbers-specific setup, release scope, references and localisation
This guide uses Apple’s Formulas and Functions Help, edition 15.4, checked 2026-10-13, and its documented function signature. The help edition is not evidence of a minimum Numbers version on Mac, iPhone, iPad or iCloud.com. Check the specific application’s release notes and test an older installation instead of extrapolating availability. Apple’s Mac Numbers release history is linked below. No native application run was conducted for this review. [R1, R4]
The reproducible examples use one Numbers table, with its first row configured as a header. A range such as B2:B5 identifies four values in that table; put all formulas in otherwise empty cells outside the input ranges to avoid circular references. Numbers can use Table 2::B5 for another table on the same sheet, and Sheet 2::Table 2::B5 for a different sheet and table. Use the formula editor to construct qualified references; Excel’s Sheet1!B5 notation is not Numbers syntax. Header-derived names can be substituted by the editor, so verify the range endpoints. [R2]
English examples use period decimals and comma argument separators, e.g. =AVERAGE(2,4). Apple says that if your decimal separator is a comma, manually typed function arguments require semicolons (for example =AVERAGE(2;4)). The range-colon B2:B5 does not change. Formula-name case is not significant. The optional ellipsis … in Apple’s syntax notation is not typed into the formula. [R1]
Evidence labels: Apple-documented means the exact result appears in official help; independently calculated means reproduced with separate fractional/decimal arithmetic or Python’s standard statistics tools, not a Numbers output. Do not equate either with native Mac/iOS/iPadOS/iCloud execution or screenshots. Error conditions described below are guidance from documented constraints; unless Apple’s reference specifies an exact error code, this guide does not invent one. [R3]
Build an Apple Numbers readings table
Make a table named Calibration with at least eight rows. Set its first row as headers. Enter the measurements as genuine numbers (without appended unit strings). Place result formulas outside column B, for example in D2:D8.
| Row | A: Trial | B: Reading |
|---|---|---|
| 2 | R1 | 2 |
| 3 | R2 | 4 |
| 4 | R3 | 6 |
| 5 | R4 | 8 |
Use four separate cell arguments—this is the key compatibility precaution in this guide:
=DEVSQ(B2,B3,B4,B5)
Independently calculated expected result: 20. The four readings have mean 5; deviations −3, −1, 1, 3; squared deviations 9 + 1 + 1 + 9 = 20. A fully literal check =DEVSQ(2,4,6,8) also has expected answer 20. For a comma-decimal locale manually enter =DEVSQ(B2;B3;B4;B5) per Apple’s argument-separator rule. [A1, R1, C1]
Extra reproducible calculations
| Formula | Independent expected result | Why |
|---|---|---|
=DEVSQ(2,4,6,8) |
20 | Squares of deviations sum to 20. |
=DEVSQ(102,104,106,108) |
20 | Adding 100 to every measurement doesn’t change the deviations. |
=DEVSQ(4,8,12,16) |
80 | Doubling all values multiplies DEVSQ by 4. |
=DEVSQ(2,2,2,2) |
0 | No dispersion around the common mean. |
=VARP(B2:B5) |
5 | Population variance = 20/4. VARP explicitly allows a collection. |
=VAR(B2:B5) |
6.666666666666667 | Sample variance = 20/(4−1). |
=STDEVP(B2:B5) |
2.23606797749979 | Square root of population variance 5. |
The last three comparison functions are separately documented by Apple; their expected results here follow independent arithmetic, not Numbers execution. [A2, C1]
Reproduce Apple’s six-value published example
Apple explicitly documents this literal-argument formula:
=DEVSQ(1,7,19,8,3,9)
Apple-documented result: 196.833333333333 (displayed to 12 decimal places). The exact independent result is 1181/6, or 196.833333…. The six values total 47 and have mean 47/6. Sum of their squares is 1 + 49 + 361 + 64 + 9 + 81 = 565. Applying the equivalent identity Σx² − (Σx)²/n yields 565 − 2209/6 = (3390−2209)/6 = 1181/6. The displayed decimal is rounded, not a contradiction. [A1, C1]
Advanced uses: variance and normalization
The DEVSQ result is helpful as an intermediate in an audit of measurement variability. A population-variance calculation divides by all n numbers; a sample-variance calculation uses n−1 for n≥2. For the calibration table, compare the explicit DEVSQ result in D2 to VARP(B2:B5) or VAR(B2:B5) rather than creating an unsupported range-call. This is a cross-check of statistical arithmetic, not a claim that the functions share identical blank/text coercion. [A2, C1]
If four independent measurements with a target value of 5 are being evaluated, DEVSQ is the spread around their own average, not the sum of squared errors against the external target unless the observed average also happens to equal 5. Σ(measurement−target)² and Σ(measurement−mean)² are different objectives; do not label DEVSQ as model-prediction error without adjusting for this distinction.
Units: input in millimetres gives squared millimetres for DEVSQ. VAR/VARP are also in squared units, while standard deviation returns the original unit. Translation and scaling properties above can be used to sanity-check the spreadsheet independently. [C1]
Troubleshooting, limits and migration hazards
- Passing a range as the sole argument: Unlike VARP/STDEVP, Apple’s DEVSQ article does not explicitly allow collections. This review neither asserts support nor invents a guaranteed failure. Use
=DEVSQ(B2,B3,B4,B5)until you’ve tested a range on the target Numbers release. [A1] - Not enough numeric data: Four-cell examples assume all four referenced cells contain genuine numbers. Text imported as numbers or blank cells may change actual behaviour; Apple’s DEVSQ reference does not specify comprehensive coercion rules. Keep the worksheet clean. [A1, R3]
- Accidental unit text:
2 kgentered as plain text is not equivalent to the numeric value2with a number format. Set appropriate cell formatting instead. - Population vs sample:
20here is raw sum of squares, not the sample variance20/3or population variance20/4. Confirm which denominator your calculation requires. - Copied formulas: Relative
B2/B3/etc. references move when copied; inspect and lock cell references if needed. [R2] - Formula separators and regional formats: Use a semicolon in locales with comma decimal separator; don’t confuse a
.in decimal notation with the comma separating function arguments. [R1] - App errors: Examine Apple’s formula-error indicators, argument tokens and reference lengths. No exact DEVSQ error message was natively observed in this research. [R3]
- Migration from Excel or Sheets: Their collection/range acceptance, coercion and displayed error codes are not Numbers evidence. Re-test any imported DEVSQ formula using Apple’s explicit scalar-argument syntax.
Related functions and checked source links
Apple documentation and calculation method
- [A1] Function definition, argument types, restrictions and Apple examples: Apple DEVSQ reference; checked 2026-10-13, documentation edition 15.4.
- [A2] Related statistical function definitions: STDEV, STDEVP, VAR, VARP, AVERAGE; checked 2026-10-13.
- [R1] Function syntax and locale rules: Apple Functions overview; checked 2026-10-13.
- [R2] Table/range/cross-table references: Apple Refer to cells in formulas; checked 2026-10-13.
- [R3] Formula-error troubleshooting: Apple Review formula errors and follow best practices and Types of arguments and values; checked 2026-10-13.
- [R4] Compatibility limitation: Apple Formulas and Functions Help and Apple Numbers Mac release notes; checked 2026-10-13. Neither proves universal historical per-function availability.
- [C1] Mathematical verification: calculations are independently reproduced using precise rational/decimal arithmetic and/or Python standard-library numerical functions; using the exact input sets displayed above. This is not a native Numbers test.
Native-validation limitations: These formulas have not been executed in Numbers. Verify relevant blank/error/type behavior and displayed precision on the intended version and locale.