How to Calculate Days in Excel

"Calculate the days" sounds like one question, but a spreadsheet usually means one of several different things by it: how many days sit between two dates, how many days are left until a deadline, how many days are already gone since a start date, or simply how many days a given month has. Excel has a clean formula for each of these, but reaching for the wrong one — or the right one with a formatting slip — is how a countdown cell ends up showing a date like 1/15/1900 instead of a number, or a "days left" column silently stops updating.

This guide walks through the core day-counting formulas in Excel — DAYS, TODAY-based countdowns, and EOMONTH — what each one is actually for, and the mistakes that quietly break them.

Quick Answer

To calculate the number of days between two dates in Excel, use =DAYS(end_date,start_date), which returns a plain day count without the formatting quirks of direct subtraction. To count down to a future date, use =B2-TODAY(), and to find how many days are in a given month, use =DAY(EOMONTH(A2,0)).

What is a "days" formula, and what are the options?

"Calculate days" in Excel usually maps to one of three distinct questions, each with its own dedicated tool.

If the goal is business days only, rather than every calendar day, NETWORKDAYS handles that separately by excluding weekends and optional holidays from the count.

Why the right days formula matters

Each of these formulas answers a slightly different question, and mixing them up produces a number that looks plausible but answers the wrong thing.

📊 Quick stat A month-length figure that's hardcoded as 30 days undercounts a 31-day month by roughly 3%, and overcounts February by 2 to 3 days — enough to shift a prorated charge or an accrual calculation that's supposed to be exact.

Step-by-step: calculating days in Excel

Method 1: Days between two dates (DAYS function)

  1. Enter both dates in separate cells. Make sure both are stored as real dates, not text — for example, A2 as the start date and B2 as the end date.
  2. Type the DAYS formula, end date first.
    =DAYS(B2,A2)
  3. Press Enter. The result is a plain number of calendar days, without the date-formatting issue that direct subtraction sometimes carries over.

Method 2: Days remaining or days elapsed (TODAY())

  1. For days remaining until a future date:
    =B2-TODAY()
  2. For days elapsed since a past date:
    =TODAY()-A2
  3. Format the result cell as Number. Since TODAY() is a date value, the subtraction result can inherit Date formatting, so switch the cell to Number or General.

Method 3: Number of days in a specific month (EOMONTH)

  1. Use EOMONTH to find the last day of the month.
    =EOMONTH(A2,0)
  2. Wrap it in DAY to get just the day count.
    =DAY(EOMONTH(A2,0))
  3. Press Enter. The result is the total number of days in the month that contains the date in A2, whether that's 28, 29, 30, or 31.
Just need a day count, not a spreadsheet? Rebrixe's free Days Calculator gives the exact number instantly, no formulas required.
Calculate Days →

Common mistakes with days formulas

1. Reversing the arguments in DAYS

DAYS expects the end date first and the start date second, like =DAYS(B2,A2); swapping the order returns a negative number instead of the expected count.

2. Hardcoding TODAY() instead of using the function

Typing today's literal date into a cell freezes the countdown at that value, while =TODAY() recalculates automatically every time the workbook opens, which is what a "days remaining" column actually needs.

3. Forgetting the second argument in EOMONTH

EOMONTH(A2,0) returns the last day of the current month, but changing that second argument shifts the target month — for instance, 1 moves one month forward and -1 moves one month back, so leaving it out or guessing at it points the formula at the wrong month entirely.

4. Mixing DAYS360 into a calendar-accurate report

DAYS360 assumes every month has 30 days, which is useful for certain accounting standards but will disagree with DAYS or plain subtraction on any month that isn't exactly 30 days long, so the two shouldn't be combined in the same total.

💡 Pro tip If a days formula shows a date instead of a plain number, the fix is almost always the same one: change the result cell's format to Number or General rather than adjusting the formula itself.

Real-world formula examples

A few common scenarios and the formula each one needs.

Subscription renewal
Days remaining until renewal
=B2-TODAY()
Recalculates automatically so the countdown always reflects the current date.
Contract duration
Total days between start and end
=DAYS(B2,A2)
Returns a plain day count for the full span of a contract or agreement.
Rent proration
Days in the billing month
=DAY(EOMONTH(A2,0))
Finds the exact number of days in that month, whether 28, 30, or 31.
Invoice aging
Days since invoice date
=TODAY()-A2
Shows how many days have passed since a fixed past date, updated daily.

DAYS vs TODAY() vs EOMONTH

A side-by-side look at how the three approaches compare in Excel.

Factor DAYS function TODAY()-based EOMONTH + DAY
Answers Gap between two fixed dates Gap to/from the current date Length of a given month
Updates automatically No Yes No
Needs cell reformatting Rarely Sometimes Rarely
Best for Contract length, tenure spans Countdowns, aging reports Proration, billing cycles

Skip the spreadsheet: free days calculator

If the only thing needed is a day count, the Rebrixe Days Calculator works entirely in your browser: enter a start and end date, get the exact number of days instantly. No formulas, no account, no data sent anywhere.

Free Days Calculator Enter two dates, get the exact day count instantly.
Open Days Calculator →

Frequently asked questions

The DAYS function, written as =DAYS(end_date,start_date), returns the number of calendar days between two dates directly, without needing to reformat the result cell the way plain subtraction sometimes requires.
Subtract TODAY() from the target date, like =B2-TODAY(), which recalculates automatically every time the sheet is opened so the countdown always reflects the current date.
Wrap EOMONTH inside DAY, like =DAY(EOMONTH(A2,0)), which finds the last day of the month containing the date in A2 and returns it as a plain day count such as 28, 30, or 31.
The result cell has inherited Date formatting from one of the source cells, so Excel displays the day count as a date serial number; switching the cell format to Number or General shows the plain count instead.
DAYS counts actual calendar days exactly as they occur, while DAYS360 assumes every month has 30 days and is used mainly for accounting systems that calculate interest on a 360-day year.
Subtract January 1st of the relevant year from the date in question, such as =A2-DATE(YEAR(A2),1,1), which returns how many days have passed since the year began.
Yes. NETWORKDAYS counts only working days between a start and end date, automatically skipping Saturdays and Sundays, and it accepts an optional holiday range to exclude those dates too.

Get the exact day count in seconds

Skip the formulas entirely — the Rebrixe Days Calculator handles leap years and month lengths automatically, no spreadsheet required.

Launch the Days Calculator → Add or Subtract Days →
← Back to blogs