Days Left

How to count the days between two dates

By Raihan · · 3 min read

Days between dates
Days between
64
Counting both days
65
In weeks
9 weeks, 1 day
Weekdays (Mon–Fri)
47

The calculator starts at today and Christmas Day. Change either date and the numbers update straight away.

If you just needed the number, you’re done. If you want to know how to work it out yourself, or in a spreadsheet, or why your answer is one off from somebody else’s, read on.

The one-day difference, explained

This catches everyone out at some point, so it’s worth getting out of the way first.

Say you’re checking into a hotel on Friday and leaving on Sunday. That’s 2 nights. But if you’re going to a festival that runs Friday to Sunday, that’s 3 days. Same dates, different answers, and both are right.

A countdown uses the first one. If it’s Friday and your trip is on Sunday, you’ve got 2 days to go. Use the second one for things like holiday leave or how many days a course runs.

Counting by hand

You don’t need a calculator for most of these. The trick is to split it into three pieces: what’s left of the first month, the full months in the middle, and the days into the last month.

From 22 October to 25 December:

9 + 30 + 25 = 64 days.

You do need to know how long each month is. The rhyme works (“Thirty days hath September, April, June and November…”), and so does the knuckle trick: make a fist, and count the months across your knuckles and the gaps between them. Knuckles are 31 days, gaps are 30, except February. July lands on the last knuckle, so start again from the first one for August.

Leap years

February has 29 days in a leap year. A year is a leap year if it divides by 4, unless it divides by 100, in which case it isn’t, unless it also divides by 400. So 2028 is a leap year, 2100 won’t be, and 2000 was. 2026 and 2027 are normal years.

In Excel

Excel stores dates as numbers (days since the start of 1900), so you can just subtract them. With the start date in A2 and the end date in B2:

You wantFormula
Days between=B2-A2 or =DAYS(B2,A2)
Counting both days=B2-A2+1
Days from today=B2-TODAY()
Weekdays only=NETWORKDAYS(A2,B2)
Weekdays, skipping holidays=NETWORKDAYS(A2,B2,H2:H12)
Whole months between=DATEDIF(A2,B2,"m")
Whole years between=DATEDIF(A2,B2,"y")

A few things that trip people up:

In Google Sheets

Good news: it’s the same. =B2-A2, =DAYS(B2,A2), =NETWORKDAYS(A2,B2) and =DATEDIF(A2,B2,"d") all work in Google Sheets exactly as they do in Excel. =TODAY() updates each time the sheet recalculates, so a “days until” column keeps itself current.

If you’re writing code

The classic mistake is to subtract two timestamps and divide by 86,400,000 (milliseconds in a day). It works until a daylight saving change falls in between, and then one “day” is 23 or 25 hours long and your answer comes out as 63.96. Set both dates to midnight in the same time zone and round the result, or use your language’s date library to count calendar days directly.

When you need it every day

A calculator is great for a one-off. If you keep coming back to check how many days are left until something, a countdown app does the sum for you every morning. Days Left shows the days left on your Home Screen, along with the same breakdown as the calculator above: weeks and days, hours and weekends.

9:41Days Left event detail showing time left in weeks, days, hours and weekends
The same sums, every day, without the spreadsheet.

For the end of the year specifically, there’s a live year progress page, and a Christmas countdown that counts weeks, weekends and sleeps.

Quick answers

How do I calculate the number of days between two dates in Excel?

Subtract the earlier date from the later one, for example =B2-A2, and format the result as a number. You can also use =DAYS(B2,A2), which takes the end date first.

Should I include the start date when counting days?

It depends on the question. The difference between two dates doesn't include the start date. If you're counting days of an event, such as a three-day festival from Friday to Sunday, include both ends by adding one.

How do I count only weekdays between two dates?

In Excel or Google Sheets, use =NETWORKDAYS(start, end). It counts Monday to Friday and includes both the start and end dates. You can pass a range of holiday dates as a third argument to skip them.

How many days are there between today and Christmas?

Use the calculator on this page, which is set to today and Christmas Day by default. There's also a live Christmas countdown on this blog.