SharePoint Document Issues

How to Calculate Positive or Negative Delivery Days in SharePoint

Nimra MalikNimra Malik Oct 7, 2026 868 views

Question details

The user needs a SharePoint calculated column formula to accurately display early or late delivery days without the value dynamically changing every day.

How to Calculate Early or Late Delivery Days in SharePoint
Product
Microsoft SharePoint
Device & OS
not provided
Scenario
Tracking project or item delivery statuses (early or late) using specific completion dates rather than rolling daily dates.
Observed behavior
When using TODAY() or NOW() in formulas, the calculation changes every day, breaking fixed historical tracking. A static result based on completion dates is needed.
Before you start

Ensure you have 'Designer' or 'Owner' permissions for the SharePoint list to add or modify calculated columns. Carefully note the exact internal names of your date columns before writing the formula.

Solution 1Recommended

Use Date Completed Instead of TODAY() for Fixed Delivery Days

By referencing the actual recorded completion date rather than a dynamic date function, the calculated delivery days will remain permanently fixed for accurate historical records.

Dynamic functions like TODAY() recalculate whenever the item is updated or viewed under certain conditions, making them unsuitable for static historical tracking. Referencing a fixed 'Date Completed' column solves this issue.

1
Navigate to List Settings

Open your SharePoint list, click on the gear icon (Settings) in the top right corner, and select 'List settings'.

2
Create a Calculated Column

Scroll down to the Columns section and click on 'Create column'. Enter a name for your new column (e.g., 'Delivery Variance') and select 'Calculated (calculation based on other columns)'.

3
Enter the Formula

In the formula box, input the following IF statement: =IF([Status Outcome]="Late",[Hire Date]-[Date Completed],IF([Status Outcome]="On Time",DATEDIF([Date Completed],[Hire Date],"d"),"")). Note: You must replace bracketed names with your exact column names.

4
Configure Output Data Type

Below the formula box, set 'The data type returned from this formula is' to 'Number', adjust decimal places if necessary, and click 'OK' to save your new column.

Use Date Completed Instead of TODAY() for Fixed Delivery Days
Verify Column Names: If SharePoint rejects your formula with a syntax error, double-check that your internal column names perfectly match. For example, 'Hired Date' and 'Hire Date' are different.
Free Microsoft Office alternative

Analyze Exported SharePoint Lists Easily with WPS Office

While SharePoint manages your live lists, analyzing exported list data, creating complex reports, and formatting charts is often easier in a dedicated spreadsheet application. WPS Office offers a free, lightweight alternative to Microsoft Excel with high compatibility for all your exported SharePoint data.

  1. 1. Export List Data: In your SharePoint list, click 'Export' from the top command bar and choose 'Export to Excel'.
  2. 2. Open with WPS Spreadsheet: Launch WPS Office and open the downloaded .iqy or .xlsx file to view your SharePoint data offline.
  3. 3. Apply Advanced Formulas: Use WPS Spreadsheet's built-in formula library to perform advanced date tracking and calculations securely on your desktop.
100% compatible with Microsoft Excel (.xlsx) and CSV files exported from SharePoint.Familiar user interface with a comprehensive set of date and time functions including DATEDIF.Lightweight installation that runs smoothly even on older hardware.Completely free to use with built-in PDF conversion tools.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my SharePoint calculated column give a syntax error?

This typically happens if the column names in your formula do not perfectly match the internal column names in your list. Ensure you use exact matches, distinguishing between slight variations like 'Hire Date' and 'Hired Date'.

Can I use TODAY() in a calculated column for historical data?

It is not recommended. TODAY() updates dynamically, meaning your delivery days calculation will change continuously. Always use a static column like 'Date Completed' for fixed historical records.

How does DATEDIF work in SharePoint formulas?

The DATEDIF function calculates the difference between two dates. For example, DATEDIF([Start Date], [End Date], "d") returns the exact number of days between the two specified dates.

How can I display negative days in a SharePoint list?

Standard date subtraction (e.g., [Expected Date] - [Actual Date]) will naturally yield a negative number if the actual completion date occurs after the expected date. Set the calculated column to return a 'Number' to display the minus sign correctly.