---
title: "Use the NETWORKDAYS Function to Count Working Days Between Dates"
slug: "networkdays-function"
description: "Learn to use NETWORKDAYS to calculate working days between two dates, excluding weekends and optional holidays or specific weekdays."
updated: 2025-05-30T09:43:17Z
published: 2025-08-22T11:59:25Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://kb.pigment.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NETWORKDAYS function

## Description

Returns the number of working days between the two given dates. Optionally, you can exclude specific days of the week or holidays.

> [!WARNING]
> By default, all days of the week are considered as working days and no holidays are taken into account. This function can only be used with the native Pigment calendar and its time Dimensions. For more information on using the calendar, see [Set up your calendar](/v1/docs/set-up-calendar).

## Syntax

```plaintext
NETWORKDAYS(Date From, Date To, Working Days, Holidays)
```

- `Working Days` defines which days of the week are working and non working days. User must use a Metric (or property) of the Dimension `Day Of Week` ⇒ `boolean`
- `Date from` defines the first date to start counting from.
- `Date to` defines the last date to count up to.

> [!WARNING]
> This date is not included in the count.
- `Holidays` defines which dates are holidays. User must use a Metric (or property) with the Dimension `Day`⇒ `boolean`

## Return type

`Integer`

## Examples

| **Case** | **Results** | **Return Type** |
| --- | --- | --- |
| `NETWORKDAYS(DATE(2020, 12, 2), DATE(2020, 12, 7), DayOfWeek)` | 3 with `DayOfWeek` Metric considering Saturday and Sunday as non-working days. | `Integer` |

**Excel equivalent**: [NETWORKDAYS](https://support.microsoft.com/en-us/office/networkdays-function-48e717bf-a7a3-495f-969e-5005e3eb18e7)

**See also**: [DAYS](/v1/docs/days-function)

<style> p[data-block-id] {font-size:1rem;} ul li p[data-block-id] {margin-bottom: 0;} ul[data-type="taskList"] li div p[data-block-id] {margin-bottom: 0;} ol li p[data-block-id] {margin-bottom: 0;} table tbody th p[data-block-id] { margin-bottom: 0;} blockquote p[data-block-id] {margin-bottom: 0 !important;} &nbsp;p[data-block-id]:empty::after {content: "\00A0";} </style><style> p[data-block-id] {font-size:1rem;} ul li p[data-block-id] {margin-bottom: 0;} ul[data-type="taskList"] li div p[data-block-id] {margin-bottom: 0;} ol li p[data-block-id] {margin-bottom: 0;} table tbody th p[data-block-id] { margin-bottom: 0;} blockquote p[data-block-id] {margin-bottom: 0 !important;} &nbsp;p[data-block-id]:empty::after {content: "\00A0";} </style>
