ONLYOFFICE DEVSQ: Sum Squared Deviations and Check Variance
Calculate squared deviations from the mean, reproduce the official example and distinguish the total from population or sample variance.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =DEVSQ(8,10,10,12) has an independently expected result of 8. DEVSQ sums squared distances from the arithmetic mean; it does not divide that total by the number of observations.
Availability and version history
- Introduced: The first introduction release and date are not established by the checked sources.
- Availability: Currently documented in ONLYOFFICE’s rolling function help; no final supported-version endpoint is established.
- Scope: Shared Spreadsheet Editor documentation. Exact availability in individual Docs, Desktop and mobile builds is not established by this page.
- Checked: October 14, 2026, against the official DEVSQ reference. Examples were independently calculated and compared with the vendor screenshot; these cases were not tested in the native application.
Syntax and the centering step
=DEVSQ(number1, [number2], ...)
The official reference documents one required numeric argument and optional additional arguments, up to 255. A range is shown in its worked screenshot. The square brackets mark optional syntax and are not entered in the worksheet.
The calculation is the sum of (value - mean)^2 over the numeric dataset. Subtract the arithmetic mean before squaring. Squaring the original values answers a different question.
For 8, 10, 10, 12, the mean is 10. The deviations −2, 0, 0, 2 have squares 4, 0, 0, 4. Their sum is 8. If the inputs are lengths in millimeters, the result is in square millimeters.
Reproduce every intermediate value
In a blank sheet, enter Measurement, Deviation and Squared deviation in A1:C1. Put 8, 10, 10, 12 in A2:A5. Enter Mean in E1 and =AVERAGE(A2:A5) in E2; expect 10.
Enter =A2-$E$2 in B2 and =B2^2 in C2. Fill B2:C2 through row 5.
| Row | A: Measurement | Expected B | Expected C |
|---|---|---|---|
| 2 | 8 | -2 | 4 |
| 3 | 10 | 0 | 0 |
| 4 | 10 | 0 | 0 |
| 5 | 12 | 2 | 4 |
Put =DEVSQ(A2:A5) in E4 and =SUM(C2:C5) in E5. Both independent expected results are 8. The fixed $E$2 reference keeps all deviations centered on the same dataset mean.
For contrast, =8^2+10^2+10^2+12^2 in E6 gives 408, the sum of the original squares. That is not DEVSQ. The distinction is important when a formula appears plausible but is missing its centering step.
Relate the total to variance
This four-observation example lets you inspect the divisors explicitly. In E8 enter =E4/4; expect 2. This is the population-variance calculation when those four observations are the complete population being described.
In E9 enter =E4/(4-1); expect approximately 2.6666666667. This is the usual sample-variance calculation using n−1 for a sample of four. Neither divisor is built into DEVSQ itself.
Choose the statistical interpretation before applying a divisor. These identities do not establish sampling quality, independence of measurements or every edge case of another variance function. The sample form needs more than one observation.
Advanced: quantify a changed observation
Keep A:E unchanged. In G1:I1 enter Measurement, Deviation and Squared deviation. Put 8, 10, 10, 20 in G2:G5. Enter =AVERAGE(G2:G5) in K2; expect 12.
Enter =G2-$K$2 in H2 and =H2^2 in I2; fill H2:I2 through row 5. Expected deviations are -4, -2, -2, 8; expected squares are 16, 4, 4, 64.
In K4 enter =DEVSQ(G2:G5) and in K5 enter =SUM(I2:I5); both independently expected results are 88. The largest distance contributes 64 of the total, illustrating the effect of squaring. An average absolute deviation uses a different weighting of distances.
Translation and scaling checks
Enter 108, 110, 110, 112 in A12:A15 and =DEVSQ(A12:A15) in E12. Expect 8, unchanged after adding the same constant to every input.
Enter 16, 20, 20, 24 in G12:G15 and =DEVSQ(G12:G15) in K12. Expect 32: doubling the values doubles the deviations and multiplies their squares by four. A unit conversion by a factor of k scales this sum by k².
Reproduce the official screenshot
On a separate sheet, put 34, 769, 76, 89, 98 across A1:E1 and 244, 445, 677, 56, 13 across A2:E2. Enter =DEVSQ(A1:E2) in E3. Independent arithmetic gives 709512.9, matching ONLYOFFICE’s displayed result.
Troubleshooting and related functions
The short entry does not detail how all text, blanks, Boolean values or source errors are treated in every argument form. Use complete numeric observations for these examples; do not silently turn absent measurements into zeros. Very large inputs or nearly equal large values also require attention to numerical precision.
Check that the selected range contains only the intended sample and that each row uses the same mean. AVERAGE finds that center, SUM combines the squared-distance column, and AVEDEV measures average absolute distance in the original units.