ABS Function (OpenOffice Calc)
The ABS function in OpenOffice Calc returns the absolute value of a number. Learn syntax, examples, behavior with negative numbers, common errors, and best practices.
Verification status: Consult the documentation, examples and any stated test scope below. How formula examples are checked
Availability and version history
- Introduced: Documented by Apache OpenOffice 4.1.16; original introduction not established.
- Availability: Supported in Apache OpenOffice 4.1.16, verified against its function registry. This identifies a supported release, not a final working version.
- Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
- Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.
ABS returns the magnitude of a real number. It changes a negative value to its positive counterpart and leaves positive values and zero unchanged. Use it to measure the size of a discrepancy while keeping the original signed difference in a separate column.
Syntax and arguments
=ABS(number)
number is one numeric value, cell reference or numeric expression. ABS returns a number, not formatted text. These formulas use English function names and Calc’s semicolon argument separator where another function needs several arguments.
| Formula | Expected result |
|---|---|
=ABS(-7) |
7 |
=ABS(12.5) |
12.5 |
=ABS(0) |
0 |
=ABS(8-13) |
5 |
ABS does not fix incorrect data or recover a missing measurement. Removing a sign is a mathematical operation, so use it only when direction is irrelevant.
Reproducible worksheet: deviations from a target
Enter the following numeric values in A1:C4. Keep column D for the signed difference and column E for its magnitude.
| Row | A: Item | B: Target | C: Actual |
|---|---|---|---|
| 2 | North | 100 | 112 |
| 3 | South | 100 | 94 |
| 4 | West | 100 | 100 |
In D2 enter =C2-B2 and fill through D4: the results are 12, -6 and 0. In E2 enter =ABS(D2) and fill through E4: the results are 12, 6 and 0. =SUM(E2:E4) returns 18; =AVERAGE(E2:E4) returns 6. These answer different questions from =ABS(SUM(D2:D4)), which returns 6 because the signed differences partly cancel.
For a tolerance check, =ABS(C2-B2)>10 returns TRUE for North and FALSE for the other two rows. A tolerance of 10 is a rule you choose, not an ABS default. Use >=10 if deviations exactly at the boundary must be flagged.
Advanced applications
- Financial variance: with defined numeric names
ActualandBudget,=ABS(Actual-Budget)measures the variance size. Retain the signed difference to distinguish underspending from overspending. - Distance on a number line:
=ABS(A1-A2)gives 15 when A1 is -6 and A2 is 9. It is not a geographic distance formula. - Measurement error: define
MeasuredandExpected, then use=ABS(Measured-Expected). For percentage error use=ABS(Measured-Expected)/ABS(Expected)only when Expected is nonzero and a relative measure makes sense. - Across sheets:
=ABS(Sheet1.A1)uses Calc’s sheet-reference notation. Quote a sheet name containing spaces, for example=ABS('January data'.A1). - Dates and times:
=ABS(A1-B1)measures a difference in days when A1 and B1 contain numeric datetimes. Multiply by 24 for hours. Do not apply ABS to a reversed start/end pair if that reversal is a data-entry error that should be corrected.
Applying ABS to a range
For a transparent worksheet, enter =ABS(A1) in B1 and fill down. For a fixed ten-row array, select B1:B10, enter =ABS(A1:A10), and confirm with Ctrl+Shift+Enter in desktop Calc. Do not assume the modern spill behavior of another spreadsheet.
To total ten absolute pairwise differences, =SUM(ABS(A1:A10-B1:B10)) is an array formula, also confirmed with Ctrl+Shift+Enter. Both source ranges must describe the same observations. A helper-column calculation makes each mismatch easier to inspect. The array-entry workflow has not been newly GUI-tested for this revision.
Errors, edge cases and troubleshooting
- ABS is not a range aggregation function with an “ignore text and errors” rule. An error in a referenced calculation remains a problem; inspect that upstream calculation.
- If a result is unexpectedly zero, check whether the source is zero, blank, or a formula returning an empty string. Those are different states. Use
ISNUMBER(A1)to check the intended numeric input rather than relying on implicit conversion. - Imported numeric-looking text should be converted deliberately using the correct decimal and grouping separators. Do not assume all text will produce zero.
- Cell formatting may show a rounded value while ABS uses the stored value. Increase displayed decimal places when diagnosing a tolerance comparison.
- A malformed reference, missing argument or unmatched parenthesis is a formula-entry issue. The displayed error depends on the exact formula; there is no single error code for every nonnumeric case.
Documentation and verification
The Apache OpenOffice ABS reference and the 4.1.16 numeric interpreter establish the magnitude operation. The examples above were independently calculated from the stated inputs; they are expected results, not a new native or GUI execution report. Current support, introduction and final-working-version scope remain as stated in the availability section.