Expiry Dates in Excel: Days Left and Status Flags
By ExcelReady TeamUpdated 6 min read
The short answer
An expiry date formula in Excel usually has three parts. Work out the expiry date with =EDATE(B2,12) for 12 months after the issue date. Count the days left with =C2-TODAY(). Then flag the status with =IF(C2<TODAY(),"Expired",IF(C2-TODAY()<=30,"Expiring soon","OK")). Because TODAY updates daily, the tracker stays current by itself.
Key takeaways
- Expiry date from an issue date: =EDATE(B2,12) for 12 months, or =B2+90 for 90 days.
- Days left: =C2-TODAY(); a negative number means it has already expired.
- Status: =IF(C2<TODAY(),"Expired",IF(C2-TODAY()<=30,"Expiring soon","OK")).
- Check for Expired first, or every expired item also counts as expiring soon.
- Count expired items with =COUNTIF(C2:C50,"<"&TODAY()).
On this page+
A good expiry date formula in Excel answers three questions: when does it expire, how many days are left, and does it need attention? EDATE works out the date, TODAY counts the days, and IF turns the result into a clear flag like Expired or Expiring soon. This guide builds a certificate tracker step by step. The same formulas work for contracts, licences, stock and subscriptions.
How to calculate an expiry date from an issue date#
Add the validity period to the issue date. Which formula you need depends on how the period is stated:
| Validity | Formula | Issued 20/11/2024 expires |
|---|---|---|
| 12 months | =EDATE(B2,12) | 20/11/2025 |
| 2 years | =EDATE(B2,24) | 20/11/2026 |
| 90 days | =B2+90 | 18/02/2025 |
| End of month, 12 months on | =EOMONTH(B2,12) | 30/11/2025 |
EDATE adds whole months and keeps the same day of the month, which matches how most certificates and contracts are written. Adding days works because Excel stores dates as numbers that count days. EOMONTH suits items like payment cards that expire at the end of a month.
If the validity varies by row, put the number of months in its own column and use =EDATE(B2,E2). If the result shows a number like 46346, format the cell as a date (Windows: Ctrl+1; Mac: ⌘1).
How to count the days left until expiry#
Subtract TODAY() from the expiry date. TODAY returns the current date and updates whenever the file recalculates:
=C2-TODAY()On 1 November 2026, the certificate tracker shows:
| Certificate | Expires | Days left |
|---|---|---|
| First aid | 20/11/2026 | 19 |
| Forklift licence | 15/10/2026 | -17 |
| Fire warden | 01/06/2027 | 212 |
| Food hygiene | 05/12/2026 | 34 |
A negative number means the item expired that many days ago. If you'd rather show 0 for expired items, use =MAX(0,C2-TODAY()). The TODAY function guide explains how it recalculates, and counting the days until a deadline covers countdowns in more depth.
How to flag Expired, Expiring soon and OK#
Use nested IF to turn the dates into status words. IF tests a condition and returns one value if it's TRUE and another if it's FALSE. Nesting puts a second IF in the FALSE part:
=IF(C2<TODAY(),"Expired",IF(C2-TODAY()<=30,"Expiring soon","OK"))Read it in order:
- Is the expiry date before today? Then Expired.
- If not, is it 30 days away or less? Then Expiring soon.
- Otherwise, OK.
On 1 November 2026, First aid (19 days) shows Expiring soon, the Forklift licence shows Expired, and the other two show OK. Food hygiene is 34 days away, just outside the 30-day window.
The order of the tests matters. An expired item also has fewer than 30 days left, because its days-left number is negative. If you test "30 days or less" first, expired items show Expiring soon. Always check Expired first. The IF function guide and the guide to IF with dates cover more patterns.
In Excel 2019 or later, IFS reads more simply:
=IFS(C2<TODAY(),"Expired",C2-TODAY()<=30,"Expiring soon",TRUE,"OK")The final TRUE,"OK" catches everything else. IFS checks the tests from left to right and stops at the first TRUE, so the same rule applies: put the Expired test first.
Using a warning period from a cell#
Teams often want different warning periods, such as 60 days for licences that take time to renew. Put the number of days in a cell, for example H1, and use it in the formula: =IF(C2<TODAY(),"Expired",IF(C2-TODAY()<=$H$1,"Expiring soon","OK")). Change H1 and every status updates at once.
How to handle empty rows#
Add a blank check at the start, so empty rows stay empty. An empty expiry cell counts as 0, which is earlier than today, so the status formula would call it Expired:
=IF(C2="","",IF(C2<TODAY(),"Expired",IF(C2-TODAY()<=30,"Expiring soon","OK")))This matters in trackers where you leave rows ready for new items. The same idea applies to the days-left column: =IF(C2="","",C2-TODAY()).
How to highlight expired and expiring items#
Use conditional formatting with the same tests, so colours update every day. Select the table rows, for example A2:D50, and add two rules with Home > Conditional Formatting > New Rule > Use a formula:
| Rule | Formula | Fill |
|---|---|---|
| Expired | =AND($C2<>"",$C2<TODAY()) | Red |
| Expiring soon | =AND($C2>=TODAY(),$C2-TODAY()<=30) | Amber |
The $ before C makes every cell in the row check the expiry date in column C, so the whole row is coloured.
If the tracker has a status column, you can also format by the word itself: Highlight Cells Rules > Text that Contains > Expired. That keeps the logic in one place.
How to count expired and expiring items#
Use COUNTIF and COUNTIFS to put a summary at the top of the tracker. Join the operator to TODAY with &:
| Count | Formula | Result on 1 Nov 2026 |
|---|---|---|
| Expired | =COUNTIF(C2:C5,"<"&TODAY()) | 1 |
| Expiring in 30 days | =COUNTIFS(C2:C5,">="&TODAY(),C2:C5,"<="&TODAY()+30) | 1 |
If you have a status column, =COUNTIF(D2:D5,"Expired") is even simpler.
The same structure works for many trackers. A job application tracker counts days since you applied, and an order tracker flags late deliveries.
Common mistakes with expiry formulas#
Most problems come from test order, fixed dates or blank cells. Check these:
- Testing "soon" before "expired". Expired items then show as Expiring soon.
- Typing today's date by hand. A fixed date never updates. Use TODAY() in formulas. Use Ctrl+; (Mac: Control+;) only for dates that should stay fixed, such as the issue date; see inserting the current date with a shortcut.
- Adding 365 for a year. Leap years make it drift. Use EDATE with 12 months.
- Blank rows marked Expired. Add the
C2=""check. - Days left shows a date. Format the cell as General.
Practise it#
Expiry trackers combine date maths and IF logic, a pairing that comes up in many job tests. Practise counting days between dates in a live spreadsheet, then practise the IF function to build status flags. Each formula is checked instantly. Or try the exercise on this page first.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
F2 holds the check date (in a live tracker you'd use TODAY()). Click D2 and flag the certificate: Expired if C2 is before $F$2, Expiring soon if it expires within 30 days, otherwise OK. Use nested IF.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Status | Check date | |||||
| 2 | |||||||
| 3 | |||||||
| 4 | |||||||
| 5 | |||||||
| 6 | |||||||
| 7 | |||||||
| 8 |
Tip: Test for Expired first. Then, inside the second IF, check whether C2-$F$2 is 30 or less.
Practise this in a lesson
Frequently asked questions
How do I calculate an expiry date in Excel?
Add the validity period to the issue date. Use =EDATE(B2,12) for 12 months, =EDATE(B2,24) for two years, or =B2+90 for 90 days. Format the result as a date.
How do I calculate the days left until expiry?
Subtract today's date from the expiry date: =C2-TODAY(). A positive number is days left, 0 means it expires today, and a negative number means it has expired.
How do I flag items that are expiring soon?
Use nested IF: =IF(C2<TODAY(),"Expired",IF(C2-TODAY()<=30,"Expiring soon","OK")). Change 30 to the warning period you need.
How do I highlight expired dates in red?
Select the rows, choose Home > Conditional Formatting > New Rule > Use a formula, enter =AND($C2<>"",$C2<TODAY()) and pick a red fill.
Why does my expiry status show Expired for empty rows?
An empty expiry cell counts as 0, which is earlier than today. Add a blank check first: =IF(C2="","",IF(C2<TODAY(),"Expired",...)).