Skip to main content

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.

Best for

Calculate days until a due date.

What it returns

If A2 is a future due date, the formula returns the remaining calendar days.

Copy formulas

Excel formula
=IF(A2="", "", A2-TODAY())
Google Sheets formula
=IF(A2="", "", A2-TODAY())
Excel / Google Sheets difference

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

TaskOwnerStatusDue DateHours
Import leadsMayaComplete2026-01-063
Clean headersNicoIn Progress2026-01-082
Review budgetMayaComplete2026-01-124
Publish reportIrisBlocked2026-01-151
What it returns

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 pieceRole in the formula
IF(A2="", "", ...)Prevents a blank due-date cell from producing a large negative number.
A2The 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

Future due date
=IF(A2="", "", A2-TODAY())

Excel: Set A2 to =TODAY()+10. Returns: 10

Overdue due date
=IF(A2="", "", A2-TODAY())

Google Sheets: Set A2 to =TODAY()-3. Returns: -3

Blank due date
=IF(A2="", "", A2-TODAY())

Excel: Leave A2 empty. Returns: blank

Common errors and fixes

IssueLikely causeFix
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 dateThe 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 unexpectedlyThe 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

AlternativeWhen to use it
Days Between Dates FormulaUse when both date endpoints should be explicit rather than anchored to TODAY.
Workdays Between Dates FormulaUse when weekends and holidays should be excluded from the remaining-day count.

Related formulas

Official references

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.