Calculate Days Until Due and Flag Overdue Tasks in Notion
How do I show days until due and flag overdue tasks with a Notion formula?
Add a formula property that subtracts today() from the Due date with dateBetween(prop("Due"), today(), "days"). A negative result means the task is overdue, zero means it is due today, and a positive number is the days left. Wrap it in a check that returns blank when Due is empty or Status is Done.
A Notion formula can turn a plain Due date into a label your team can scan: “Overdue by 4 days”, “Due today”, “Due in 14 days”, or nothing at all when a task has no date or is already Done. The core is dateBetween(prop("Due"), today(), "days"), which returns the number of days from today to the due date. Everything else in the formula decides which words to wrap around that number.
What does the days-until-due formula return for each task?
It returns one short text label per task, built from the gap between the Due date and today.
The arithmetic comes from dateBetween. Notion’s formula syntax reference describes it as returning “the difference between two dates” in a unit you choose, and its examples subtract the second date from the first. So with the Due date first and today() second, a due date in the future gives a positive number and a past due date gives a negative one. The same reference describes today() as the current date without the time, which keeps the count in whole days when your Due property holds dates only.
The formula then sorts each task into one of four outcomes:
- No Due date, or Status is Done: blank.
- Days below zero: “Overdue by N days” (or “1 day”).
- Days equal to zero: “Due today”.
- Days above zero: “Due in N days” (or “1 day”).
Blank is deliberate. A finished task that slipped past its date is not a problem anyone needs to act on, and a red “Overdue” on it trains people to ignore the column.
The formula to paste into the Notion property
Add a formula property to the task database and paste this in. Notion’s formulas help page gives the route: select the slider icon at the top of the database, then Edit properties, then New property, choose Formula, name it (for example Due label), and select Edit formula.
if(
empty(prop("Due")) or prop("Status") == "Done",
"",
let(
days, dateBetween(prop("Due"), today(), "days"),
ifs(
days < 0, "Overdue by " + format(abs(days)) + if(days == -1, " day", " days"),
days == 0, "Due today",
"Due in " + format(days) + if(days == 1, " day", " days")
)
)
)
Each piece is a documented function in the current formula language:
empty()returns true when a value is empty. The outerifuses it to skip tasks with no date.prop("Status") == "Done"compares the Status option to the textDone. ChangeDoneif your finished option has another name, such asComplete.let()stores the day count asdaysso the formula does not repeat thedateBetweencall four times.ifs()returns the value for the first true condition, and its last argument is the fallback. Here the fallback is the “Due in” case.format()turns the number into text before it is joined to the words. The reference shows+joining text, so converting the number first avoids mixing types.abs()drops the minus sign, so -4 reads as “Overdue by 4 days”.
The outer if runs before dateBetween, so a row with no date never reaches the subtraction. Every branch returns text, including the blank "", so the property has one consistent type.
If your property names differ, change "Due" and "Status" to match them exactly, including capitals.
Expected labels for the sample task list on 16 November 2026
Work the formula out by hand on a small list before you trust it on the real one. The table below assumes today is Monday 16 November 2026 and that Due holds dates without times.
| Task | Owner | Due | Status | days | Due label |
|---|---|---|---|---|---|
| Chase contractor invoices | Avery Example | 2026-11-12 | In progress | -4 | Overdue by 4 days |
| Renew the office domain | Riley Placeholder | 2026-11-15 | Not started | -1 | Overdue by 1 day |
| Book the quarterly team call | Morgan Sample | 2026-11-16 | In progress | 0 | Due today |
| Update the onboarding checklist | Avery Example | 2026-11-17 | Not started | 1 | Due in 1 day |
| Order laptops for new starters | Riley Placeholder | 2026-11-30 | Not started | 14 | Due in 14 days |
| Archive old project channels | Morgan Sample | 2026-11-10 | Done | (skipped) | blank |
| Draft the holiday cover rota | Avery Example | (empty) | Not started | (skipped) | blank |
Two rows are worth checking closely. “Renew the office domain” was due yesterday, so days is -1 and the singular branch gives “Overdue by 1 day”. “Archive old project channels” is six days past its date, but its Status is Done, so the outer if returns blank before any subtraction happens.
Because today() returns the current date, the same rows will read differently tomorrow: the call booking becomes “Overdue by 1 day” and the laptops drop to 13 days. You do not need to edit anything for that to happen.
Where the day count can drift from what people expect
Most surprises come from what is stored in the Due property, not from the formula.
Due dates with a time. If someone turns on the time option and enters 17:00, the subtraction is no longer between two plain dates. Notion’s reference does not say how partial days are rounded in that case, so a task due at the end of tomorrow may show a different count from one due at the start. Keep Due as a date-only property for this formula, or test a few rows with times before you rely on it.
Date ranges. A Due property set to a range holds a start and an end. The reference shows dateStart() and dateEnd() for picking one side. If you use ranges, replace prop("Due") inside dateBetween with dateEnd(prop("Due")) so the label counts down to the end of the range.
Time zones on a remote team. today() returns a date without a time, but the help pages do not state which time zone decides when that date changes. A teammate several hours ahead may see a task flip to “Overdue” before someone behind them does. If the label feeds a daily stand-up or reminder, agree which time zone counts as the deadline and check the behaviour with people in two regions. The same problem shows up in spreadsheets, and this guide to converting UTC handoff times to local time in Google Sheets covers how to pick one reference clock.
Status names. The comparison is exact text. If the finished option is called Done with a trailing space, or done in lower case, the check fails and finished tasks start showing as overdue. Copy the option name directly from the Status property settings.
Weekends and holidays. dateBetween counts calendar days. A task due on Monday reads “Due in 3 days” on Friday even though only one working day is left. If your team plans in working days, a spreadsheet with a holiday list is the better tool; see how to count workdays and set due dates in Google Sheets with holidays.
Sorting and filtering on the label
The label is text, which is good for reading and weak for sorting. Alphabetical order puts “Due in 14 days” before “Due in 2 days”, and “Overdue” rows land at the bottom.
If you want a view ordered by urgency, add a second formula property, Days left, that holds only the number:
if(empty(prop("Due")) or prop("Status") == "Done", 999, dateBetween(prop("Due"), today(), "days"))
Sort the view by Days left ascending. Overdue tasks come first because their numbers are negative, and tasks with no date or a Done status sit at the bottom under the placeholder 999. Show the Due label column for people and hide Days left if it adds clutter. The placeholder is arbitrary; pick any number larger than your longest planning horizon.
For a view that only shows overdue work, add a filter on Due label that keeps text containing “Overdue”, using whichever text match options your view’s filter menu offers. Because Done tasks return blank, they drop out of that view without a separate Status filter. A filter on Days left below zero does the same job with a number.
When a Notion formula is the wrong tool for overdue tracking
The formula marks tasks. It does not tell anyone. Nothing in this setup sends a message when a task tips into “Overdue”, and a label that nobody opens is easy to miss on a distributed team. If you need a daily nudge, pair the database with a reminder routine. The spreadsheet version in this guide to sending one daily task reminder from Google Sheets without repeat emails shows the logic for avoiding duplicate alerts, and the same idea applies if you later move the reminders closer to Notion.
It is also the wrong fit when due dates depend on working days, on per-person time zones, or on service-level clocks that pause outside business hours. Those rules get long and fragile inside a single property. Keep the Notion label for a quick visual signal and handle the stricter deadline logic where it can be tested properly.
For more on keeping deadlines visible when people work different hours, see the remote operations topic page.