DEVSQ Function (OpenOffice Calc)
Calculate sums of squared deviations in Apache OpenOffice with DEVSQ, including variance links, offset invariance and regression-residual distinctions.
Verification status: Eight reference formulas were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, after XLSX import, with retained ODS results. Other explanatory calculations are independent references. How formula examples are checked
Quick answer: =DEVSQ(A4:A8) returns approximately 10 for the worksheet below.
Availability and version history
- Introduced: First release not established. The OpenOffice.org 3.3 appendix documents DEVSQ; that is historical presence evidence.
- Supported in: Apache OpenOffice 4.1.16; no final supported release established.
- Scope: Desktop Calc. Formulas below use English names and semicolon argument separators, with complete numeric example ranges.
- Checked: October 14, 2026. The eight reference formulas were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, using XLSX import and hard recalculation. Source and independent arithmetic were also checked.
Meaning and units
DEVSQ sums squared distances from the arithmetic mean of the supplied observations. Its units are the square of the original units. The result is an unnormalized sum of squares, not a variance or standard deviation. Function entry.
Syntax and data requirements
=DEVSQ(Number1 [; Number2; …])
Supply one or more numeric values or ranges. Each included number contributes one observation. A single numeric observation or a constant sample has zero deviation. The worked cases use complete numeric values so direct-text, blank-array and error coercion are not being assumed. The release calculation logic is the authority for these contracts.
Reproducible worksheet
Enter this compact set of numeric observations starting in row 4. Column D is Y shifted by 10; C and E are exact straight-line transformations of X. Keep these labels outside the formula ranges.
| Row | A: X | B: Y | C: negative line | D: shifted Y | E: positive line | F: constant |
|---|---|---|---|---|---|---|
| 4 | 1 | 2 | 10 | 12 | 3 | 7 |
| 5 | 2 | 4 | 8 | 14 | 5 | 7 |
| 6 | 3 | 5 | 6 | 15 | 7 | 7 |
| 7 | 4 | 4 | 4 | 14 | 9 | 7 |
| 8 | 5 | 5 | 2 | 15 | 11 | 7 |
These eight formulas were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, after XLSX import. Saved ODS values match independent arithmetic; results below are rounded to twelve decimal places.
| Formula | Expected result, approximately |
|---|---|
=DEVSQ(A4:A8) |
10 |
=DEVSQ(B4:B8) |
6 |
=DEVSQ(C4:C8) |
40 |
=DEVSQ(D4:D8) |
6 |
=DEVSQ(E4:E8) |
40 |
=DEVSQ(F4:F8) |
0 |
=DEVSQ(5) |
0 |
=DEVSQ(1;2;4;8) |
28.75 |
Practical calculation
For X=1,2,3,4,5, the mean is 3 and squared distances are 4,1,0,1,4. =DEVSQ(A4:A8) returns 10. For Y=2,4,5,4,5, the mean is 4 and the sum is 6.
With those five Y observations, population variance is =DEVSQ(B4:B8)/COUNT(B4:B8), giving 1.2. Sample variance uses =DEVSQ(B4:B8)/(COUNT(B4:B8)-1), giving 1.5. The denominator choice depends on the intended statistic; DEVSQ does not make that choice for you.
Advanced checks and interpretation
A common shift leaves DEVSQ unchanged: Y and Y+10 both give 6. Multiplying every observation by 2 multiplies DEVSQ by 4. Squared-unit scaling matters when comparing measurements expressed in different units.
Do not confuse DEVSQ(Y) with regression residual sum of squares. Here the fitted line y=2.2+0.6×x leaves residual sum of squares 2.4, while DEVSQ(Y)=6. To calculate the former, construct actual residuals from fitted values and sum their squares. DEVSQ applied to a residual column subtracts its own mean again, so it is only equivalent when the residuals genuinely sum to zero.
Boundaries and troubleshooting
Use COUNT and inspect the same numeric range to keep the analysis population visible. Referenced labels or blanks are not substitute observations, while genuine zeros must remain included. Error values and direct text inputs are not silently validated by these complete-data examples. Avoid hiding a calculation failure as zero spread.
Keep original values and units alongside the derived statistic. Rounding the source observations or intermediate mean can change a spread or standardized score; round for presentation after calculation.
Official evidence and checking scope
The saved ODS retained the tested formulas and numeric inputs. A deliberately stale SUM result and an uncached SUM formula confirmed recalculation. Native evidence covers the eight reference formulas in the stated 4.1.16 build; other explanatory calculations are independent references. Other releases, locales and import formats were not tested.