Contact

SUM Function (LibreOffice Calc)

Math Beginner LibreOffice Calc Introduction not established

The SUM function in LibreOffice Calc adds numbers, cell ranges, or mixed arguments. Learn syntax, examples, 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 LibreOffice 26.8.1.1; original introduction not established.
  • Availability: Supported in LibreOffice 26.8.1.1, 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.
The **SUM** function is one of the most widely used formulas in LibreOffice Calc. It allows you to add numbers, cell references, and entire ranges with a single, efficient expression. Whether you're totaling expenses, calculating inventory, or summarizing data across sheets, `SUM` is the foundation of spreadsheet arithmetic.

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 SUBTOTAL when working with filtered data
  • Use SUMIFS instead of multiple SUM + IF combinations
  • Name ranges for cleaner formulas
Named ranges make formulas easier to read and maintain.
Example: =SUM(Sales_Q1)

Reproducible example (tested in LibreOffice Calc)

This standalone example was calculated in LibreOffice Calc 25.2.3.2 and matched the expected value. It is a practical cross-check of one usage, not proof that every example elsewhere on this page is correct.

=SUM(2;3;5)

Expected result: 10.

Add numbers together; ranges can replace these literal inputs.

If the result differs, check the referenced cells, argument separators and number formatting. For more information, consult the LibreOffice Calc official help.