Calculate Days Remaining Until a Due Date
You have a due-date column and want a countdown next to each item — how many days are left before it's due, with anything already past due showing zero.
Excel & Google Sheets
This formula works in both Excel and Google Sheets.
How it works
Dates in spreadsheets are numbers, so B2-TODAY() gives the number of days between the due date and today. When the due date is still ahead, that's a positive count of days remaining. Once the date passes, the subtraction goes negative — so MAX(0, …) clamps it and overdue items simply show 0. The countdown refreshes automatically every day the file is opened, because TODAY() always returns the current date. Note the order: it's the mirror image of a days-overdue formula, which subtracts the other way.
When to use it
Use this for renewal reminders, project countdowns, contract expirations, and warranty windows — anywhere "how long do I have?" drives the next action.
Common mistakes
Did this formula help?
Engine-verified against the sample data aboveLast reviewed 2026-07-08