SUM Function (LibreOffice Calc)
The SUM function in LibreOffice Calc adds numbers, cell ranges, or mixed arguments. Learn syntax, examples, common errors, and best practices.
Compatibility
▾| Excel | ✔ |
| Gnumeric | ✔ |
| Google_sheets | ✔ |
| Libreoffice | ✔ |
| Numbers | ✖ |
| Onlyoffice | ✔ |
| Openoffice | ✔ |
| Wps | ✔ |
| Zoho | ✔ |
What the SUM Function Does ▾
- Adds individual numbers
- Adds cell references
- Adds continuous or non‑continuous ranges
- Ignores empty cells automatically
- Works across sheets
- Works with named ranges
- Handles large datasets efficiently
It is designed to be fast, reliable, and flexible, even when working with thousands of rows.
Syntax ▾
SUM(number1; number2; ...)
LibreOffice Calc uses semicolons (
;) to separate arguments, not commas.
If you copy formulas from Excel, replace commas with semicolons to avoid
Err:508 or Err:504.
Basic Examples ▾
Add a range of cells
=SUM(A1:A10)
Adds all values from A1 through A10.
Add multiple ranges
=SUM(A1:A10; C1:C10)
Useful when your data is separated into blocks.
Add specific values
=SUM(5; 12; 19)
You can also mix numbers and cell references:
=SUM(A1:A10; 25; C5)
SUM can accept up to 255 arguments, including ranges, values, and references.
Advanced Examples ▾
Add values across sheets
=SUM(Sheet1.A1:A10; Sheet2.B1:B10)
Add values across sheets using 3D ranges
LibreOffice supports 3D references:
=SUM(Sheet1:Sheet5.A1)
This adds cell A1 across five sheets.
Add only visible cells (filtered data)
LibreOffice Calc does not have a SUMVISIBLE function, but you can use:
=SUBTOTAL(9; A1:A10)
Function code 9 means SUM.
Add values with conditions (SUMIF)
=SUMIF(A1:A10; ">50"; B1:B10)
Adds values in B1:B10 where A1:A10 is greater than 50.
Add values with multiple conditions (SUMIFS)
=SUMIFS(C1:C100; A1:A100; "North"; B1:B100; ">1000")
Common Errors and Fixes ▾
Err:508 — Missing parenthesis
Usually caused by:
- Missing
) - Using commas instead of semicolons
Err:504 — Parameter error
Occurs when:
- A text value is passed incorrectly
- A range reference is malformed
SUM returns 0 unexpectedly
Possible causes:
- Cells formatted as text
- Hidden apostrophes (
'123) - Imported CSV values not converted to numbers
Fix: Convert text to numbers:
Data → Text to Columns → OK
Best Practices ▾
- Use ranges instead of long lists of individual cells
- Keep numeric data formatted as numbers, not text
- Use
SUBTOTALwhen working with filtered data - Use
SUMIFSinstead of multiple SUM + IF combinations - Name ranges for cleaner formulas
Named ranges make formulas easier to read and maintain.
Example:
Example:
=SUM(Sales_Q1)