Days Between Dates Calculator

Days from one date to another, also in weeks, months and years, with the end date counted or not and every step shown.

Inputs

These are example values. Change any of them to calculate your own.

Try:

Always counted.

Monday, November 16, 2026

Counted only if ticked below.

Friday, April 30, 2027

Adds 1 day, so both dates count: for a lease, a stay or an event that runs through its last day.

Results

Days between the dates

165 days

From Monday, November 16, 2026 up to Friday, April 30, 2027, not counting the end date. Counting both dates: 166 days.

Weeks and days
23 weeks, 4 days23.57 weeks
Months and days
5 months, 14 daysWhole calendar months, then days
Years, months, days
0 years, 5 months, 14 daysFrom November 16, 2026 to April 30, 2027
Hours
3,960 hours237,600 minutes, at 24 hours a day
Start date is a
MondayNovember 16, 2026, counted
End date is a
FridayApril 30, 2027, not counted
Counted days on the calendar

Not drawn: December 2026 to March 2027, 4 whole months in which all 121 days are counted.

  • Counted day
  • Start or end date
  • Dashed: not counted

How this was calculated

  1. Counted days: from and including Monday, November 16, 2026 up to, but not including, Friday, April 30, 2027.
  2. Days counted, month by month: 15 (November 16–30) + 31 (December) + 31 (January) + 28 (February) + 31 (March) + 29 (April 1–29) = 165 days.
  3. Weeks: 165 ÷ 7 = 23 weeks with 4 days left over (23 × 7 = 161).
  4. Whole months: November 16, 2026 + 5 months = April 16, 2027, on or before April 30, 2027; one more month, May 16, 2027, would be after it.
  5. Days left over: April 16, 2027 to April 30, 2027 = 14 days. So the span is 0 years, 5 months, 14 days.
  6. Hours: 165 × 24 = 3,960 hours, or 237,600 minutes.
  7. No February 29 falls among the counted days.
  8. In Excel or Google Sheets, with the start date in A1 and the end date in B1: =B1-A1 gives 165. =DATEDIF(A1,B1,"M") gives 5 whole months. Excel stores the two dates as the serial numbers 46342 and 46507.
Days counted in each month
MonthFirst dayLast dayDays countedDays in monthRunning total
November 2026Nov 16Nov 30153015
December 2026Dec 1Dec 31313146
January 2027Jan 1Jan 31313177
February 2027Feb 1Feb 282828105
March 2027Mar 1Mar 313131136
April 2027Apr 1Apr 292930165

Assumptions

  • The start date is counted and the end date is not. That gives the same number as counting from the day after the start through the end date.
  • Each date counts as a whole day: times of day and time zones are not used.
  • Months are calendar months counted forward from the earlier date. When that day is missing from a month (the 29th to 31st), the month mark falls on the month’s last day.
  • Hours are days × 24, so the hour gained or lost when clocks change for is not counted.
  • Weekends and holidays count like any other day. For working days only, use a business days calculator.
  • Dates follow the Gregorian calendar, extended backward for dates before 1582.

Calculated in your browser. This site doesn't send the numbers you enter anywhere. “Continue in” links pass them to the next calculator within this browser tab only.

Updated Report a problem with this calculator

How many days are there between two dates?

Subtract the earlier date from the later one. The difference is the number of days from the start date up to the end date: the start date counts, the end date doesn’t, unless you choose to count it too. Enter both dates and the calculator gives that number as you type, along with weeks, months, years and hours, the weekday of each date and a calendar that marks the counted days. To find the date that lies a given number of days away instead, use an add-or-subtract-dates calculator.

  • Start date and End date: type or pick any dates from the year 1 to 9999. The line under each field names the weekday and spells out the month, so 03/04 can’t be misread as April 3 when you meant March 4.
  • Include the end date: tick it when both dates belong to the period, as with a lease, a stay or an event that runs through its last day. It adds 1 day. The section below explains when to use it.
  • Use today as start and Use today as end, under the result, put today’s date on your device into either field. Swap dates turns the two dates around.

The Try buttons load a one-year lease with both dates counted, a span across February 29, 2024, a range that starts on January 31, and an end date before the start date. To compare date ranges, press Save for comparison, change the dates and save again; each later range shows how many days it adds or loses.

Worked example: November 16, 2026 to April 30, 2027

  1. Counted days: from and including Monday, November 16, 2026, up to but not including Friday, April 30, 2027.
  2. Month by month: 15 (November 16–30) + 31 (December) + 31 (January) + 28 (February; 2027 is not a leap year) + 31 (March) + 29 (April 1–29) = 165 days.
  3. Weeks: 165 ÷ 7 = 23 weeks with 4 days left over, because 23 × 7 = 161.
  4. Months: November 16, 2026 plus 5 months is April 16, 2027, and one more month, May 16, would pass the end date. April 16 to April 30 is 14 days, so the span is 5 months, 14 days (0 years, 5 months, 14 days).
  5. Hours: 165 × 24 = 3,960 hours.
  6. Counting both dates: 166 days, or 23 weeks and 5 days. The months-and-days count then runs to May 1, the day after the end date: 5 months, 15 days.

The calendar in the result shows November 16 to 30 and April 1 to 29 shaded, with April 30 outlined but not shaded, and notes that December through March, 121 days, are counted in full.

Should you count the start date, the end date or both?

Count one of them for a gap between two events, and both for a period that includes its first and last day. The default here counts the start date and not the end date. That gives the same number as starting the day after the start date and counting through the end date, which is how many deadlines are counted: U.S. federal court rules, for example, leave out the day of the event that starts a period and count its last day. By that rule, a 30-day period that starts on November 16, 2026 ends on Wednesday, December 16, 2026, and this calculator shows those two dates 30 days apart.

Tick Include the end date when every date from the first to the last is part of what you are counting:

  • A lease or contract. Press Lease, both dates counted. January 1 to December 31, 2027 is 364 days apart, but a lease covering both dates runs 365 days, and the breakdown reads exactly 1 year, 0 months, 0 days.
  • Days spent somewhere. Arriving on Wednesday, June 3, 2026 and leaving on Wednesday, June 10 is 7 nights but 8 days in the place. Some rules count the days: the IRS substantial presence test, for example, counts any day a person is in the United States at any time during the day, with exceptions it lists. Check the rule that applies to you; this calculator counts the dates you give it.
  • The same date twice is 0 days apart, or 1 day with the end date counted.

A hotel booking is the opposite case: nights are the plain difference, so leave the box unticked.

How many weeks or months are between two dates?

For weeks, divide the days by 7 and keep the remainder: 165 days is 23 weeks and 4 days (23.57 weeks as a decimal). For months, count whole calendar months forward from the start date and then the days left, as in step 4 of the example.

Dividing the days by an average month gives a different kind of answer. 165 ÷ 30.44 is about 5.42 “average months”, which is not the same as 5 months and 14 days on the calendar. The months-and-days and years-months-days tiles are calendar counts; use them when a contract, a warranty or a subscription is written in months.

Why “one month” can mean 28 to 31 days

Because months have different lengths, a calendar month is measured from a day of the month to the same day of a later month. When that day doesn’t exist, the month ends on the last day of the shorter month.

Press Month end, Jan 31 to load January 31 to March 1, 2023. There is no February 31, so January 31 plus 1 month is February 28, 2023, and one day more reaches March 1: 1 month, 1 day, which is 29 days. In 2024 the same dates are 30 days apart, because the month mark is February 29, yet the breakdown is again 1 month, 1 day. For the same reason, January 31 to February 28, 2023 is exactly 1 month (28 days), while January 31 to February 27 is 27 days and no whole month.

This is the month-end rule used by date software such as Python’s dateutil. A tool that waits for a 31st before counting a month says “0 months, 28 days” for January 31 to February 28; the day count is the same either way. Whenever a month end moves a month mark, the steps under the result say so.

Does the count include leap days?

Yes. Every February 29 between the dates is counted, and the steps say how many fall among the counted days. Press Leap day, 2024 to load February 28 to March 1, 2024: the answer is 2 days, because 2024 has a February 29. The same dates in 2023 are 1 day apart.

Century years are the exception people forget. A year divisible by 4 is a leap year, except a century year, which is one only if it is divisible by 400. So February 28 to March 1 is 1 day in 1900 and 2 days in 2000. From January 1, 2000 to September 23, 2026 is 9,762 days, including 7 leap days (2000, 2004, 2008, 2012, 2016, 2020 and 2024).

How many days until, or since, a date?

Put today in one of the fields. For “how many days until”, press Use today as start and enter the future date as the end date; for “how many days since”, enter the past date as the start date and press Use today as end. Today comes from your device, so it matches the calendar where you are.

The page opens with the example’s dates, and the end date stays at April 30, 2027 until you change it. Once you change the start date, a note above the result names the end date if it still holds the example. For a clock that counts down the hours and minutes too, Continue in the Countdown to a Date opens a live countdown to your end date.

Counting days between dates in Excel or Google Sheets

Put the start date in cell A1 and the end date in B1.

  • =B1-A1 gives the days between them: 165 in the example. =DAYS(B1,A1) gives the same number in Excel and Google Sheets; note that DAYS takes the end date first.
  • =B1-A1+1 counts both dates: 166.
  • =DATEDIF(A1,B1,"M") gives the complete months: 5. DATEDIF returns #NUM! when the start date is later than the end date, and Microsoft recommends against its “MD” unit for the leftover days.

The subtraction works because Excel stores dates as serial numbers, with January 1, 1900 as 1: November 16, 2026 is 46342 and April 30, 2027 is 46507, and 46507 − 46342 = 165. Excel treats 1900 as a leap year for compatibility with an older program, so a count that crosses February 1900 comes out one day long there. The steps under the result show the formulas with your own numbers for dates from March 1, 1900 on.

Need business days instead?

This page counts every day, weekends and holidays included. For working days only, press Continue in the Business Days Calculator under the result (offered for dates up to 100 years apart). It opens a business days calculator with the same two dates and the same dates counted, where you choose the weekend days and list the holidays that apply to you.

Reading the result

  • The headline is the number of days, negative when the end date is before the start date. The line under it names both dates with their weekdays and gives the count under the other choice for the end date.
  • Weeks and days, Months and days and Years, months, days are the same span in larger units. Hours are the days times 24.
  • Start date is a and End date is a give each weekday and say whether that date is counted.
  • Counted days on the calendar draws the months involved (the first and last when there are more than three): shaded days are counted, the start and end dates are outlined, and a dashed outline marks an end date that isn’t counted.
  • The steps add up the days, split them into weeks and months, name any month end or leap day involved and give the spreadsheet formula.
  • The table lists the days counted in each month, or in each year for spans longer than 24 months, with a running total. Download it as a CSV file to keep it.

Assumptions and limitations

  • Every date counts as a whole day. Times of day and time zones are not used.
  • Hours are days × 24, so the hour gained or lost when clocks change for daylight saving time is not included.
  • Dates follow the Gregorian calendar, extended backward before its introduction in 1582. A date copied from a record kept in the older Julian calendar needs converting first; for dates in 1582 or earlier the result carries a reminder.
  • Dates from January 1 of the year 1 to December 31, 9999 are accepted. With the end date included, the later date can be at most December 30, 9999.
  • Months follow the month-end rule described above. Other calculators and spreadsheets can split the same span into months and days differently, though the number of days agrees.
  • Which days count for a lease, a visa, a tax test or a court deadline is set by the rules for that purpose, not by this calculator.

Common mistakes

  • Keeping the example’s end date. Change both dates, or press Use today as end when counting up to today.
  • Adding 1 by habit. Nights in a hotel, days until an event and a deadline counted from the day after are the plain difference. Add 1 only when both the first and last dates belong to the period.
  • Multiplying years by 365. January 1, 2000 to January 1, 2026 is 26 years but 9,497 days, not 26 × 365 = 9,490, because 7 leap days fall in between.
  • Dividing days by 30 for months. Months run 28 to 31 days, so days ÷ 30 drifts from the calendar; use the months-and-days count.
  • Mixing up day and month. 03/04/2027 is March 4 in the U.S. and April 3 in much of the world. The line under each date field spells out the month and weekday, so check it.
  • Typing a two-digit year. A year entered as 26 is the year 26, not 2026. The field points this out; type all four digits.

Questions

What happens if the end date is before the start date?

The result is negative, for example -165 days from April 30, 2027 back to November 16, 2026, and a note says the end date is the earlier one. The weeks, months and years show the size of the gap marked “earlier”, so they match the dates the right way round. Nothing is swapped without asking; press Swap dates to count forward instead.

Can I count the time between two dates and times of day?

This page counts whole calendar days and ignores the time of day. For hours and minutes between two clock times, use a time duration calculator; for a live count to a moment in a particular time zone, the Countdown to a Date link under the result carries the end date over.

Sources

  1. Introduction to Calendars U.S. Naval Observatory, Astronomical Applications Department The Gregorian calendar, introduced in 1582, makes every year divisible by 4 a leap year except century years, which are leap years only when divisible by 400. So 1900 was not a leap year and 2000 was.
  2. ECMAScript Language Specification, 21.4.1.1 Time Values and Time Range Ecma International TC39 Browsers count dates in the proleptic Gregorian calendar (its leap-year rule applied to every year, including those before 1582) and treat every day as exactly 86,400 seconds. This calculator counts dates the same way.
  3. relativedelta dateutil documentation When adding months lands on a day the month doesn’t have, the last day of the month is used instead (January 31, 2003 plus 1 month is February 28, 2003). The months-and-days breakdown here steps months the same way.
  4. DAYS function Microsoft Support DAYS(end_date, start_date) returns the number of days between two dates. Excel stores dates as serial numbers, with January 1, 1900 as serial number 1 and January 1, 2008 as 39448.
  5. DATEDIF function Microsoft Support The “M” unit gives the number of complete months in the period; a start date later than the end date gives
  6. DAYS function Google Docs Editors Help In Google Sheets, DAYS(end_date, start_date) returns the number of days between two dates and factors in leap days.
  7. Excel incorrectly assumes that the year 1900 is a leap year Microsoft Learn For compatibility with Lotus 1-2-3, Excel treats 1900 as a leap year, which it was not; all later leap years, including century years such as 2100, are handled correctly.
  8. Federal Rules of Civil Procedure, Rule 6(a), Computing Time Legal Information Institute, Cornell Law School For a period stated in days, exclude the day of the event that starts it, count every day including weekends and legal holidays, and include the last day (moving to the next business day if the last day is a weekend or legal holiday).
  9. Substantial presence test Internal Revenue Service For this test a person is treated as present in the U.S. on any day they are physically in the country at any time during the day, with listed exceptions such as days in transit.