---
title: "Calculate Project Duration"
slug: "calculate-project-duration"
updated: 2025-06-11T20:58:44Z
published: 2025-06-11T20:58:44Z
canonical: "documentation.encodify.com/calculate-project-duration"
---

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

# Calculate Project Duration

## Date Calculations

---

Once the Event App has been configured, you can use specific calculations to determine duration taking into consideration non-working days.

The below table provides an overview of the 3 calculation formulas available:

| durationWorkingDays(<StartDateValue>, <EndDateValue>, <IncludeStartValue>, <IncludeEndValue>) | Integer | Duration expressed in number of days excluding configured non-working days with possibility to define if start/end date or both should be included in duration calculation. For the formula to work, Events app must be configured for the site. Follow [this](/v1/docs/events) link to access configuration guide. **Works only with Date and date-time fields.* *In case of date-time fields, only date is used in calculation, hours and minutes are ignored. Week-year, month-year fields may return inconsistent results.* |
| --- | --- | --- |
| addWorkingDays(<StartDateValue>, <AmountOfDays>, <IncludeStartValue>) | Date | Function adds specifed number of days excluding non-working days, with parameter to define if start date should be included in calculation. For the formula to work, Events app must be configured for the site. Follow [this](/v1/docs/events) link to access configuration guide. **Works only with Date and date-time fields.* *In case of date-time fields, only date is used in calculation, hours and minutes are ignored. Week-year, month-year fields may return inconsistent results.* |
| subtractWorkingDays(<StartDateValue>, <AmountOfDays>, <IncludeStartValue>) | Date | Function subtracts specifed number of days excluding non-working days, with parameter to define if start date should be included in calculation. For the formula to work, Events app must be configured for the site. Follow [this](/v1/docs/events) link to access configuration guide. **Works only with Date and date-time fields.* *In case of date-time fields, only date is used in calculation, hours and minutes are ignored. Week-year, month-year fields may return inconsistent results.* |

<editor360-custom-block data-preprocessing="true" data-sanitizationtags="h4"><div><blockquote style="background:#ddf7ff;border-left:4px solid #006a8a;overflow:auto;" data-block-id="9233a74c-fec0-4a4f-91b5-3e449f643613" class="infoBox" data-background="#ddf7ff" data-border="#006a8a"><div class="blockquote-title"><p data-block-id="b8de4f88-dbaf-4883-b8b3-62e27d666eee">Examples:</p></div><h4 data-block-id="3485e9be-4949-490f-80cb-879cf9b85664">Duration Calculation</h4><p data-block-id="4f6a7f32-6726-4cb5-a4c6-d1e0a1a00658">Formula: <strong><em>durationDays(${Start date}, ${End date}, true, true)</em></strong><br type="inline"><em>Project start date:</em> 01/01/2021<br type="inline"><em>Project end date:</em> 02/01/2021<br type="inline"><strong>Duration will be equal to 2.</strong><br type="inline"><br type="inline">Formula: <strong><em>durationDays(${Start date}, ${End date}, true, false)</em></strong><br type="inline"><em>Project start date:</em> 01/01/2021<br type="inline"><em>Project end date:</em> 02/01/2021<br type="inline"><strong>Duration will be equal to 1.</strong></p><p data-block-id="a6e818f2-c6b6-49c8-9f51-5e87c57cba97"><br type="inline">Formula: <strong><em>durationDays(${Start date}, ${End date}, false, true)</em></strong><br type="inline"><em>Project start date:</em> 01/01/2021<br type="inline"><em>Project end date:</em> 02/01/2021<br type="inline"><strong>Duration will be equal to 1.</strong></p><p data-block-id="a97ec219-8ed6-4851-afe3-12878a5b8a40"><br type="inline">Formula:<strong><em>durationDays(${Start date}, ${End date}, false, false)</em> </strong><em>Project start date:</em> 01/01/2021<br type="inline"><em>Project end date:</em> 02/01/2021<strong> Duration will be equal to 0.</strong></p><h4 data-block-id="89588171-e0a0-4434-b088-7b6831ecf996">Adding/Subtracting days respecting non-working dates</h4><p data-block-id="a623ac53-4d8c-474a-b1eb-bed426eca97a">Formula: <strong>addWorkingDays(<em>${Start date}</em>, <em>${Integer}</em>, true)</strong><br type="inline"><em>Project start date:</em> 31/12/2020<br type="inline"><em>Days to add</em>: 3</p><p data-block-id="a8bb2d59-e51a-4ab2-9389-4e8f4b3f676e"><br type="inline"><em>Event start date:</em> 01/01/2021</p><p data-block-id="15b14cfe-c564-4105-9963-4803c9f5b79f"><em>Event end date:</em> 02/01/2021</p><p data-block-id="b3272500-bc5a-4c75-82fe-663571cd1fb7"><br type="inline"><strong>Resulting calculated date is 04/01/2021</strong></p><p data-block-id="99d40c00-918e-42e0-8204-fcac23178d1f"><br type="inline">Formula: <strong>subtractWorkingDays(<em>${Start date}</em>, <em>${Integer}</em>, true)</strong><br type="inline"><em>Project start date:</em> 31/12/2020<br type="inline"><em>Days to subtract</em>: 3</p><p data-block-id="651dec5b-c322-473a-bdc3-89065e8d1443"><br type="inline"><em>Event start date:</em> 29/12/2020</p><p data-block-id="74e4ccff-2368-4317-abdc-b62c7907be69"><em>Event end date:</em> 30/12/2020</p><p data-block-id="4d8c4f00-5d40-46be-b786-7af2908c0b32"><br type="inline"><strong>Resulting calculated date is 27/12/2020</strong></p><p data-block-id="06fae8f9-79dd-4a9f-ac95-f03b3043c265">Formula: <strong>addWorkingDays(<em>${Start date}</em>, <em>${Integer}</em>, false)</strong><br type="inline"><em>Project start date:</em> 31/12/2020<br type="inline"><em>Days to add</em>: 3</p><p data-block-id="a435fa1a-a3cb-4d39-96d9-fcb9c33d6a8e"><br type="inline"><em>Event start date:</em> 01/01/2021</p><p data-block-id="d37cec7b-f5a9-4810-8502-03048df8e9eb"><em>Event end date:</em> 02/01/2021</p><p data-block-id="5f88e729-e3d4-4081-86ed-863fb3b93983"><br type="inline"><strong>Resulting calculated date is 05/01/2021</strong></p><p data-block-id="3d8c8a5b-06c7-40df-aff7-d4e3a6264ac7"><br type="inline">Formula: <strong>subtractWorkingDays(<em>${Start date}</em>, <em>${Integer}</em>, false)</strong><br type="inline"><em>Project start date:</em> 31/12/2020<br type="inline"><em>Days to subtract</em>: 3</p><p data-block-id="ebc01db0-e61a-4823-bda6-39255e865f13"><br type="inline"><em>Event start date:</em> 29/12/2020</p><p data-block-id="000f8193-4006-4e76-8578-28c6884c5b9f"><em>Event end date:</em> 30/12/2020</p><p data-block-id="9b4d87ae-a9ef-44e0-bb57-3455df4c33da"><br type="inline"><strong>Resulting calculated date is 26/12/2020</strong></p></blockquote></div></editor360-custom-block>

> [!WARNING]
> Note!
> 
> When calculating duration or adding/subtracting days respecting non-working days, event duration is always calculated including start and end date.

> [!NOTE]
> Example:
> 
> Event start date: 01/01/2021 Event end date: 01/02/2021
> 
> Event duration (total number of days) is 2.

**Known Limitations:**

- Long numbers (more than 6 digits) cannot be used as increments in date calculation formulas;
- Event is ignorred if its Start date > End date.
