How to Calculate Negative Days in Excel Without DATEDIF
Question details
The user wants to calculate the exact number of days between dates, including negative results when the start date is later than the end date, which the DATEDIF function does not support.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Calculating the difference in days between two dates, specifically to see how many days are left until a planned date or how many days have passed.
- Observed behavior
- The standard DATEDIF function returns an error or fails to calculate a result when the start date is greater than the end date.
Ensure that the cells containing your dates are formatted as 'Date', and the cell where you want the result to appear is formatted as 'General' or 'Number'.
Use Simple Subtraction to Calculate Days Until a Past or Future Date
Subtract today's date directly from your target date to get positive days for future dates and negative days for past dates without relying on complex functions.
The DATEDIF function is highly useful for finding the difference between dates, but it cannot output a negative number and will return a #NUM! error if the start date is later than the end date. Using basic arithmetic, you can subtract one date from another to quickly get both positive and negative results.
Click on an empty cell where you want the calculated days to appear.
Type the formula =D2-TODAY() (assuming cell D2 contains your planned target date) and press Enter.
Right-click the cell containing your formula, select 'Format Cells', and choose 'General' or 'Number' to display the value as the number of days instead of a date format.

Calculate Date Differences Effortlessly with WPS Office
WPS Spreadsheet handles all standard arithmetic and date calculation formulas seamlessly. You can easily calculate both positive and negative day differences without complex workarounds in a familiar, user-friendly interface.
- 1. Open your spreadsheet: Launch WPS Spreadsheet and open the document containing your dates.
- 2. Enter the formula: Click the target cell, type your subtraction formula (e.g., =A2-B2 or =A2-TODAY()), and press Enter.
- 3. Adjust cell formatting: Navigate to the Home tab on the ribbon, locate the Number Format drop-down, and select 'General' to view the negative or positive number of days.

Frequently Asked Questions
Why does DATEDIF return a #NUM! error in Excel?
The DATEDIF function returns a #NUM! error when the start date is strictly greater than the end date. It is designed only to calculate positive chronological differences between two dates.
How do I calculate the difference between two specific dates in different cells?
You can simply subtract the cell containing the earlier date from the cell containing the later date. For example, use the formula =B2-A2, where A2 is the start date and B2 is the end date. Ensure the result cell is formatted as General or Number.
Why is my date subtraction formula returning another date instead of a number?
This happens because Excel often automatically formats the formula result cell to match the source cells (Date). To fix this, right-click the cell, select 'Format Cells', and change the category to 'General' or 'Number'.
Can I use the NETWORKDAYS function to get negative working days?
Yes, unlike DATEDIF, the NETWORKDAYS function can return a negative number if the start date argument provided is later than the end date argument.




