NETWORKDAYS Function (LibreOffice Calc)

Date & Time Intermediate LibreOffice Calc Introduced in LibreOffice 3.0
date business-days scheduling project-management holidays calendar counting

The NETWORKDAYS function returns the number of working days between two dates, excluding weekends and optionally holidays. It is essential for project planning, SLA tracking, payroll, and business calendars.

Compatibility

What the NETWORKDAYS Function Does

  • Counts working days between two dates
  • Automatically excludes weekends
  • Optionally excludes holidays
  • Includes both start and end dates in the count
  • Works with serial dates or text dates

It is designed to be accurate, business‑aware, and ideal for planning and analytics.

Syntax

NETWORKDAYS(start_date; end_date; [holidays])

Arguments

  • start_date:
    The beginning date.

  • end_date:
    The ending date.

  • holidays (optional):
    A range of dates to exclude.

Basic Examples

Count working days between two dates

=NETWORKDAYS("2024-01-01"; "2024-01-31")

Using cell references

=NETWORKDAYS(A1; B1)

Count working days excluding holidays

=NETWORKDAYS(A1; B1; C1:C10)

Count working days until today

=NETWORKDAYS(A1; TODAY())

Advanced Examples

Count working days in a month

=NETWORKDAYS(DATE(YEAR(A1);MONTH(A1);1); EOMONTH(A1;0))

Count working days in a quarter

=NETWORKDAYS(A1; EDATE(A1;3)-1)

Count working days in a fiscal year

=NETWORKDAYS(DATE(YEAR(A1);4;1); DATE(YEAR(A1)+1;3;31))

Count working days between two timestamps (ignore time)

=NETWORKDAYS(INT(A1); INT(B1))

Count working days from text dates

=NETWORKDAYS(DATEVALUE(A1); DATEVALUE(B1))

Count working days from imported CSV timestamps

=NETWORKDAYS(DATEVALUE(LEFT(A1;10)); DATEVALUE(LEFT(B1;10)))

Count working days from Excel serial dates stored as text

=NETWORKDAYS(DATE(1899;12;30)+VALUE(A1); DATE(1899;12;30)+VALUE(B1))

Count working days remaining in the year

=NETWORKDAYS(TODAY(); DATE(YEAR(TODAY());12;31))

Count working days elapsed in the year

=NETWORKDAYS(DATE(YEAR(TODAY());1;1); TODAY())

Holiday Handling

Holiday list example

C1 C2 C3
2024‑01‑01 2024‑02‑19 2024‑04‑01

Use:

=NETWORKDAYS(A1; B1; C1:C3)

Holidays must be real dates

Use DATEVALUE if imported as text.

Holidays override weekends only if they fall on weekdays

Edge Cases and Behavior Details

NETWORKDAYS returns an integer

Accepts:

  • Real dates
  • Serial numbers
  • DATEVALUE outputs
  • ISO date strings

Invalid text → Err:502

Time components are ignored

Start and end dates are inclusive

Negative results allowed if end_date < start_date

NETWORKDAYS always uses Saturday–Sunday weekends

For custom weekends, use NETWORKDAYS.INTL.

NETWORKDAYS of an error → error propagates

Common Errors and Fixes

Err:502 — Invalid argument

Cause:

  • Text not recognized as a date
  • Holidays contain invalid values

Fix:

  • Wrap with DATEVALUE
  • Clean text with TRIM or SUBSTITUTE
  • Ensure holidays are real dates

Wrong result due to text dates

Fix:

  • Normalize with DATEVALUE

Holidays not excluded

Cause:

  • Holiday list contains text, not dates

Fix:

  • Convert with DATEVALUE or VALUE

Best Practices

  • Use NETWORKDAYS for standard business‑day counting
  • Use NETWORKDAYS.INTL for custom weekend definitions
  • Normalize text dates with DATEVALUE
  • Store holidays in a dedicated range or named range
  • Use NETWORKDAYS with EDATE/EOMONTH for period analysis
  • Use NETWORKDAYS with ROW() or SEQUENCE() for schedules
NETWORKDAYS is your business‑day counting engine — perfect for project timelines, SLAs, payroll, logistics, and any workflow that depends on accurate working‑day totals.

Related Patterns and Alternatives

  • Use NETWORKDAYS.INTL for custom weekends
  • Use WORKDAY for business‑day offsets
  • Use WORKDAY.INTL for custom weekend offsets
  • Use DATE for constructing comparison dates
  • Use DAYS for calendar‑day differences

By mastering NETWORKDAYS and its companion functions, you can build powerful, reliable, and fully business‑aware date‑analysis workflows in LibreOffice Calc.

Copyright 2026. All rights reserved.