logo
search
SharePoint Document Issues

How to Count Days from Start to Completion in SharePoint

WPS Content ManagerWPS Content Manager Oct 8, 2026 869 views

Question details

The user needs a SharePoint calculated column formula to count the number of days between a start date and either today (for open tasks) or a completion date (for finished tasks), counting same-day completions as 1 day.

How to Count Days from Start to Completion in SharePoint
Product
Microsoft SharePoint
Device & OS
not provided
Scenario
Tracking task duration in a SharePoint list by calculating the days between start and completion or the current date.
Observed behavior
SharePoint does not automatically calculate conditional date differences that handle both open and completed tasks while treating same-day completions as 1 day without a specific custom formula.
Before you start

Ensure you have 'Date Started' and 'Date Completed' columns already created in your SharePoint list and that you have sufficient permissions to add and modify calculated columns.

Solution 1Recommended

Use a Calculated Column Formula in SharePoint

Apply a conditional IF and DATEDIF formula to dynamically calculate the days based on the task's completion status.

This solution uses SharePoint's native calculated column feature to check if the completion date is blank. If it is blank, it calculates the difference to TODAY(). If it is filled, it calculates the difference to the completion date, ensuring same-day tasks return 1 instead of 0.

1
Add a new column

Navigate to your SharePoint list, click on 'Add column', and select 'More...' at the bottom of the menu to open the classic column creation page.

2
Configure the calculated column

Enter a column name (e.g., 'Days Open') and select 'Calculated (calculation based on other columns)' as the data type.

3
Input the calculation formula

In the Formula box, paste the following code: =IF(AND(NOT(ISBLANK([Date Started])),ISBLANK([Date Completed])),DATEDIF([Date Started],TODAY(),"d"),IF(AND(NOT(ISBLANK([Date Started])),NOT(ISBLANK([Date Completed]))),IF([Date Started]=[Date Completed],1,DATEDIF([Date Started],[Date Completed],"d")),0))

4
Format the output

Under 'The data type returned from this formula is', select 'Number'. Set the number of decimal places to 0, then click 'OK' to save.

Use a Calculated Column Formula in SharePoint
Calendar Days vs. Weekdays: This formula counts total calendar days. To exclude weekends (working days only), you would need a more advanced solution like Power Apps or Power Automate.
Free Microsoft Office alternative

Manage and Calculate Task Data Offline with WPS Office

While SharePoint is great for online lists, calculating massive datasets, applying complex date formulas, or managing offline schedules is often easier in a dedicated spreadsheet tool. WPS Office provides a powerful, free alternative to Microsoft Office, fully compatible with Excel files, allowing you to use advanced date formulas seamlessly.

  1. 1. Organize data in WPS Spreadsheet: Open WPS Spreadsheet and create your 'Start Date' and 'Completion Date' columns.
  2. 2. Apply the date formula: In a new column, enter the formula: =IF(B2="", DATEDIF(A2,TODAY(),"D"), IF(A2=B2, 1, DATEDIF(A2,B2,"D")))
  3. 3. Calculate all tasks: Press Enter and drag the fill handle down to apply the calculation to all your tasks instantly.
Fully compatible with Microsoft Excel (.xlsx) formatsSupports advanced date formulas like DATEDIF and NETWORKDAYS seamlesslyLightweight, fast, and free to useFamiliar interface with a zero learning curve for Excel users
microsoft office alternative - wps office

Frequently Asked Questions

Can I exclude weekends from the SharePoint day count?

Yes, but not easily with a standard calculated column formula, as SharePoint lacks a native NETWORKDAYS function. You will need to build custom logic using Power Automate or Power Apps to calculate business days.

Why does my SharePoint calculated column show a syntax error?

Syntax errors often occur due to regional settings. If your SharePoint region uses a comma as a decimal separator, you must replace the commas in the formula with semicolons (e.g., =IF(..., DATEDIF(...;"d"); ...)).

Does the DATEDIF function work in modern SharePoint lists?

Yes, the DATEDIF function is fully supported in both classic and modern SharePoint lists for calculating the difference between two dates in calculated columns.

How do I make the formula return 0 if the Start Date is empty?

The provided formula handles this implicitly, but for safety, you can wrap your entire formula in an IFERROR function or add a leading condition: =IF(ISBLANK([Date Started]), 0, [Your Formula]) to handle empty start dates.