# How to calculate the number of days until a deadline in Excel

Subtract today's date from the deadline: `=B2-$F$1`, with today's date in F1. Past deadlines come out negative.

**Excel:** `=B2-$F$1` (Excel 2013 and later)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E | F |
| --- | --- | --- | --- | --- | --- |
| Task | Deadline | Days left |  | Today | 2026-10-29 |
| Q3 tax filing | 2026-11-16 |  |  |  |  |
| Grant report | 2026-12-01 |  |  |  |  |
| Insurance renewal | 2026-10-29 |  |  |  |  |
| Board deck | 2026-11-03 |  |  |  |  |
| Lease option | 2027-01-15 |  |  |  |  |
| Vendor contract | 2026-10-20 |  |  |  |  |

Formula in C2, filled to C7: `=B2-$F$1`

Result: 18; 33; 0; 5; 78; -9

## How it works

Subtracting today from the deadline gives the days still to go, and a negative result tells you how many days late it is. F1 holds the date to count from; put `=TODAY()` there to make the sheet live, or type a date to see the plan as of that day.

## Other ways

- `=MAX(0,B2-$F$1)`: Shows 0 instead of a negative number once the deadline has passed. (Past deadlines show 0.)
- `=DAYS(B2,$F$1)`: The same result with DAYS. Note the order: deadline first.
- `=NETWORKDAYS($F$1,B2)-1`: Working days left, not counting today. (Counts Monday to Friday only.)

## Common mistakes

- With `B2-TODAY()` in every row the numbers change each day and can't be checked later. A single "today" cell is easier to audit and to test.
- If the result shows as a date, format the column as a number.
- A deadline with a time, like 5:00 PM, gives a fraction. Use `INT(B2)` in the subtraction.

## Questions

**How do I show "Overdue" instead of a negative number?**

`=IF(B2<$F$1,"Overdue",B2-$F$1&" days left")`.

**How do I count only business days left?**

`=NETWORKDAYS($F$1,B2,holidays)-1` skips weekends and holidays and leaves out today.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/days-until-a-deadline
