To compare a date in Excel with today, use the TODAY() function: for a date in A2, =A2=TODAY() checks whether it is today, =A2<TODAY() checks whether it is before today, and =A2>TODAY() checks whether it is after today. These comparisons update as the current date changes, so they are useful for tracking due dates, appointments, and deadlines.
How Excel dates compare with today
Excel stores recognized dates as numbers, with the time of day represented as a fractional part. The cell may display a familiar date such as 3-Nov-2026, but Excel compares the underlying value, not the way it looks on the worksheet. TODAY() returns the current date with no time component. As a result, a date stored as a real Excel date can be compared directly with it.
For example, suppose A2 contains 2-Nov-2026, A3 contains 3-Nov-2026, and A4 contains 4-Nov-2026. If today is 3-Nov-2026, then the comparison is true for A2<TODAY(), true for A3=TODAY(), and true for A4>TODAY(). The cell’s date format does not change these results; it only changes how the value is displayed.
The key practical distinction is between a real date value and text that merely looks like a date. If Excel has stored an entry as text, a comparison may not behave as expected. Check the data before troubleshooting the comparison formula.
Use a formula to identify past, current, or future dates
A comparison formula returns TRUE or FALSE. That is useful for calculations and filters, but you may prefer a readable status in a report. With a due date in A2 and a status formula in B2, enter:
=IF(A2<TODAY(),"Past",IF(A2=TODAY(),"Today","Future"))
If today is 3-Nov-2026 and A2 contains 2-Nov-2026, the result is Past. A date of 3-Nov-2026 returns Today, while 4-Nov-2026 returns Future. Copy the formula down column B to classify the other dates in the list. The words in quotation marks are labels; you can replace them with terms such as Overdue, Due today, and Upcoming.
For a task list, a blank date should usually remain blank rather than being classified as past. With due dates in A2:A100 and the status formula in B2, use:
=IF(A2="","",IF(A2<TODAY(),"Overdue",IF(A2=TODAY(),"Due today","Upcoming")))
This checks for an empty A2 first. It avoids showing a status for a row that has no due date. Copy it down as needed. If your worksheet uses a different column or starts on a different row, adjust the references to match your layout.
Check whether a date falls within a deadline window
Some schedules need more than a past-or-future test. To flag dates due within the next seven days, including today, use a range comparison. With the due date in A2 and the formula in B2, enter:
=AND(A2>=TODAY(),A2<=TODAY()+7)
If today is 3-Nov-2026, this returns TRUE for dates from 3-Nov-2026 through 10-Nov-2026, inclusive. It returns FALSE for dates before today or more than seven days ahead. Add an empty-cell check if your range includes blank rows. With a due date in A2, use:
=IF(A2="","",AND(A2>=TODAY(),A2<=TODAY()+7))
The number 7 represents seven calendar days, not seven working days. For business-day deadlines, weekends and holidays require a different approach; do not treat adding seven days as equivalent to counting seven workdays.
Highlight dates with conditional formatting
Conditional formatting can color dates that are past, today, or upcoming without adding a status column. To highlight overdue dates in a range, select the cells, then choose Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format. Set the rule formula and choose a format, such as a red fill.
For a selected range A2:A100, with A2 as the top-left cell of the selection, use:
=A2<TODAY()
Excel adjusts the relative row reference for each cell in the selected range. To highlight dates that are exactly today instead, use the following rule for the same selected range:
=A2=TODAY()
To apply a rule to a whole row based on its due date, select the rows you want formatted and anchor the date column. If the due dates are in column C and the first selected row is row 2, use:
=$C2<TODAY()
The dollar sign fixes the column while allowing the row number to change. Check the rule’s “Applies to” range in Conditional Formatting Rules Manager if the wrong cells are highlighted. On Excel for Mac, the Conditional Formatting command is also on the Home tab; labels and dialog layout can vary slightly by release. Excel for the web provides conditional formatting too, though some rule-editing options differ from desktop Excel.
Account for dates that include a time
A cell can contain both a date and a time even when its number format displays only the date. For example, a value might represent 3-Nov-2026 at 2:00 p.m. That value is later than the midnight value returned by TODAY(), so a direct equality test against TODAY() returns FALSE. A direct less-than test can also classify a time on today’s date as later than today.
If you want to compare only the calendar date and ignore the time, use INT, which removes the fractional time portion. With a date and possible time in A2, use:
=INT(A2)=TODAY()
This returns TRUE for any time on today’s date. To identify dates earlier than today while ignoring their times, with the same layout use:
=INT(A2)<TODAY()
If the time matters, do not remove it. Use NOW() instead of TODAY() when the question concerns the current date and time, such as whether a timestamp has passed the current moment. TODAY() is intended for date-level comparisons; NOW() includes the current time.
Fix text dates and unexpected results
When a comparison gives a surprising answer, first check whether Excel recognizes the value as a date. Text dates can come from imported files, copied web data, or inconsistent regional formats. A cell aligned differently from nearby dates may be a clue, but alignment alone is not definitive because formatting can override the default.
- Change the cell’s number format to a date format. If the displayed value does not change, the entry may be text rather than a date serial.
- Try sorting the column from oldest to newest. If date-like entries sort in a strange order, some may be text.
- Check for leading apostrophes, extra spaces, or mixed formats such as day-month-year in one row and month-day-year in another.
If the text follows a format Excel can recognize under your regional settings, a helper column can convert it. With a text date in A2 and a conversion formula in B2, use:
=DATEVALUE(A2)
Format B2 as a date and check that the resulting day and month are correct before using it in comparisons. DATEVALUE interprets text according to the system’s date conventions, so ambiguous text such as 04/05/2026 can mean different dates in different locales. For structured imports, Excel’s Data > Text to Columns wizard can also convert a column; select the appropriate date order in the wizard rather than guessing.
Also check for blanks, errors, and calculation settings. A formula that refers to an empty cell can produce a misleading comparison, which is why a blank check is useful. If TODAY() appears not to update, confirm that calculation is set to automatic under Formulas > Calculation Options > Automatic. TODAY() updates when Excel recalculates the workbook; it is not a continuously ticking clock.
Choose the comparison that matches the question
Before writing a formula, decide what “compare to today” means for the task. These common interpretations are different:
- Is it today? Use equality, such as A2=TODAY().
- Has the date passed? Use less than, such as A2<TODAY(). This excludes today.
- Is it due today or earlier? Use less than or equal to, such as A2<=TODAY().
- Is it in the future? Use greater than, such as A2>TODAY(). This excludes today.
- Is it today or later? Use greater than or equal to, such as A2>=TODAY().
Be precise about the boundary. A task due today is not overdue under the usual date-only definition, so “overdue” commonly means strictly earlier than today. If your organization treats a task as overdue at a particular time on its due date, a date-only comparison cannot express that policy; the data needs a deadline time as well.
Frequently Asked Questions
Does Excel have a TODAY comparison function?
No separate comparison function is needed. Use the comparison operators less than, equal to, or greater than with TODAY(), such as A2<TODAY() to test whether a date is before today. TODAY() supplies the current date; the operator defines the comparison.
How do I check if a date is overdue in Excel?
For a real date in A2, use =A2<TODAY(). It returns TRUE when the date is before today and FALSE when it is today or later. For a readable label, use an IF formula and add a blank check if the column contains empty rows.
Why does a date from today not equal TODAY()?
The cell may contain a time as well as a date. Since TODAY() returns midnight, a timestamp later today is not exactly equal to it. Compare INT(A2) with TODAY() to ignore the time, or compare the complete date-and-time value with NOW() if the time is important.
Will TODAY() update automatically tomorrow?
It updates when Excel recalculates the workbook, including normal recalculation in automatic calculation mode and when the workbook is opened or recalculated. It does not refresh continuously while the file sits open. Check the calculation mode if the displayed date seems stale.
Can I compare dates from another worksheet?
Yes. Reference the date cell on the other sheet in the comparison. For example, if the date is in A2 on a sheet named Schedule, the reference is =Schedule!A2<TODAY(). If the sheet name contains spaces, surround it with single quotation marks, as in ='Project Schedule'!A2<TODAY().
Related
- Comparison Excel Sheet Template: Build a Clear Side-by-Side
- Comparison Plot in Excel With R²: Steps and Meaning
- Company Invoice Template in Excel: Setup and Tips
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel Formula Solver: Goal Seek, Solver, and How to Use ThemExcel does not have a worksheet function called “formula solver.” To make Excel find an input that produces…
- How to Copy Formulas in Excel to Other Rows: Step by StepTo copy a formula into rows below it in Excel, select the cell that contains the formula and…
- Excel Cell Fill Shortcut: Fill Down, Fill Right, and ColorIn Excel for Microsoft 365 on Windows, press Ctrl+D to fill down from the top cell of a…
- Excel Formula for File Path: Get the Workbook LocationIn Excel for Microsoft 365 on Windows, use =CELL("filename",A1) to return the saved workbook’s path, file name, and…
- Data Validation List Formula: Excel Examples and SetupIn Excel, a data validation list formula goes in Data > Data Validation > Settings > Allow: List…
- Count Unique Records in Excel: Formulas and PivotTablesTo count distinct values in a column in Microsoft Excel for Microsoft 365, put this formula in an…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.