Date formula page
Days Until Due Date Formula
Use this when a task, invoice, or project row has one due date and you want days remaining.
Calculate days until a due date.
If A2 is a future due date, the formula returns the remaining calendar days.
Copy formulas
=IF(A2="", "", A2-TODAY())=IF(A2="", "", A2-TODAY())Excel and Google Sheets both recalculate TODAY automatically, so this formula reports calendar days from the current date to the due date and leaves empty due-date cells blank.
Example data
| Task | Owner | Status | Due Date | Hours |
|---|---|---|---|---|
| Import leads | Maya | Complete | 2026-01-06 | 3 |
| Clean headers | Nico | In Progress | 2026-01-08 | 2 |
| Review budget | Maya | Complete | 2026-01-12 | 4 |
| Publish report | Iris | Blocked | 2026-01-15 | 1 |
If A2 is a future due date, the formula returns the remaining calendar days.
How the formula works
- The blank guard keeps empty due dates from showing a number.
- A2 minus TODAY returns remaining days.
- Negative results mean the item is overdue.
| Syntax piece | Role in the formula |
|---|---|
| IF(A2="", "", ...) | Prevents a blank due-date cell from producing a large negative number. |
| A2 | The due date stored as a real spreadsheet date. |
| TODAY() | The current date used as the subtraction baseline. |
| A2-TODAY() | Returns the number of calendar days remaining; negative values are overdue. |
Verified examples
=IF(A2="", "", A2-TODAY())Excel: Set A2 to =TODAY()+10. Returns: 10
=IF(A2="", "", A2-TODAY())Google Sheets: Set A2 to =TODAY()-3. Returns: -3
=IF(A2="", "", A2-TODAY())Excel: Leave A2 empty. Returns: blank
Common errors and fixes
| Issue | Likely cause | Fix |
|---|---|---|
| The formula returns #VALUE! | A2 contains date-looking text rather than a real date serial. | Convert A2 to a real date before calculating the difference. |
| The result displays as another date | The result cell inherited a Date format even though the formula returns a day count. | Format the result cell as Number or General. |
| A negative number appears unexpectedly | The due date is earlier than today's date, so the task is overdue. | Treat the negative value as overdue days or wrap the result with a status label if the report needs one. |
When not to use this formula
- Do not use this formula for business-day countdowns; it includes weekends and holidays.
Alternatives
| Alternative | When to use it |
|---|---|
| Days Between Dates Formula | Use when both date endpoints should be explicit rather than anchored to TODAY. |
| Workdays Between Dates Formula | Use when weekends and holidays should be excluded from the remaining-day count. |
Related formulas
Official references
- TODAY function from Microsoft
FAQ
What does a negative result mean?
The due date has already passed; -3 means the item is three calendar days overdue.
Does TODAY update automatically?
Yes. TODAY recalculates with the spreadsheet, subject to the workbook's calculation settings.