Date Calculator

Count the days between two dates, or add and subtract days, weeks, months or years from any date. The date difference also comes as years, months and days, as weeks, and as US business days; the answer updates as you type, and you can copy a link to share the exact calculation.

Pick a start date and a whole number.

How DateMath counts days and months

The days between two dates are their difference: the days after the start date up to and including the end date, or both ends when you tick the box. Days and weeks are exact counts, weekends included. Months and years keep the day number, and when that day doesn't exist in the target month, DateMath takes the month's last day.

It follows the Gregorian calendar and the US federal holidays. Their rules and sources, and how DateMath tests its results, are on the About page.

Adding days, weeks, months or years

Days are added one calendar day at a time, across month ends, year ends and February 29, so 90 days after January 1, 2027 is April 1, 2027. Weekends count like any other day; to skip them, add business days in the business days calculator. A week is always 7 days.

Months are different, because they run from 28 to 31 days. One month after the 15th is the 15th of the next month, and when that day number doesn't exist the result is the month's last day. Excel's EDATE follows the same rule. A month step isn't always undone by the opposite step: January 31, 2027 plus 1 month is February 28, 2027, and that minus 1 month is January 28, 2027.

Month ends and leap days
Start dateChangeResultDays later
January 31, 2027+ 1 monthFebruary 28, 202728 days
January 31, 2028+ 1 monthFebruary 29, 202829 days
August 31, 2027+ 6 monthsFebruary 29, 2028182 days
May 31, 2027− 3 monthsFebruary 28, 202792 days
February 29, 2028+ 1 yearFebruary 28, 2029365 days

Under the date, the result gives the same date as YYYY-MM-DD, the days from the start (the quick way to turn 3 months into days for your own date) and the ISO week number.

Counting the days between two dates

The headline is the later date minus the earlier one. To check it by hand, take the days left in the start month, add the whole months between, then the end date's day number. From March 15, 2027 to June 10, 2027: 16 days left in March, 30 in April, 31 in May and 10 in June make 87 days.

The same span is shown as years, months and days (March 15, 2027 to August 2, 2029 is 2 years, 4 months, 18 days), as weeks and days, and as business days. Adding the years, months and days back to the start always lands on the end date.

Should both the start and the end date count?

Most one-day disagreements between date calculators come from this. Leave the box unticked for deadlines, durations and the nights of a stay. Tick it when every day from the first to the last counts, as for a trip, a course or a leave: it adds exactly one day, and business days then include the start date, which matches Excel's NETWORKDAYS.

Days and business days, with and without counting both dates
DatesDaysBoth countedBusiness daysBusiness, both counted
March 1, 2027 to March 5, 20274545
June 1, 2027 to June 30, 202729302021
November 22, 2027 to November 29, 20277845
January 1, 2027 to December 31, 2027364365249249

How many days since a date

Enter the past date as the start and today as the end: the headline gives the days since, and the lines under it the same span in years, months and days, weeks and business days. August 1, 2026 to October 1, 2026 is 61 days. To go the other way, from a number of days to a date, use the days from today calculator.

Seeing the span on a calendar

Below every result, DateMath draws the span on month calendars: the days in it are shaded, the start and the end are marked, and the US federal holidays are listed under each grid. You see at once which weekends and holidays fall inside a deadline, without counting squares. A span of up to three months gets every month; a longer one gets its first and last month, and a line says how many are left out.

Take November 21, 2027 to January 2, 2028: 42 days on three grids. They show the holidays that fall on weekdays in the span:

  • Thanksgiving Day, observed on Thursday, November 25, 2027
  • Christmas Day, observed on Friday, December 24, 2027
  • New Year's Day, observed on Friday, December 31, 2027

Without them and 12 weekend days, the span has 27 business days, the number on the result's last line.

Leap years, and why 4 weeks is not a month

Every count follows the Gregorian leap-year rule, so February has 29 days in years divisible by 4, except century years not divisible by 400: 2000 had a February 29 and 2100 won't. February 1, 2028 to March 1, 2028 is 29 days, a year earlier 28 days.

4 weeks is always 28 days, while 1 month is 28 to 31: from January 1, 2027, 4 weeks reaches January 29, 2027 and 1 month February 1, 2027. When a contract says months, add months; when it says weeks or days, add those. Dates run from the year 1 to 9999, and amounts are whole numbers.

Converting days to months and months to days

Days turn into months only from a given start date, because months differ in length. Add months and read "Calendar days from the start" for days, or enter both dates in "Days between dates" and read "Years, months, days" for months. Rules of thumb such as 30 days to a month drift: 180 days from January 1, 2027 is 5 months, 29 days, not 6 months.

How many days a number of months is, over every start date from 2027 to 2030
MonthsCalendar daysFrom January 1, 2027
1 month28 to 3131 days
2 months59 to 6259 days
3 months89 to 9290 days
6 months181 to 184181 days
9 months273 to 276273 days
12 months365 to 366365 days
18 months546 to 550547 days
24 months730 to 731731 days
Days as years, months and days, counted from January 1, 2027
DaysYears, months, daysWeeks and daysEnd date
30 days30 days4 weeks, 2 daysJanuary 31, 2027
60 days2 months, 1 day8 weeks, 4 daysMarch 2, 2027
90 days3 months12 weeks, 6 daysApril 1, 2027
180 days5 months, 29 days25 weeks, 5 daysJune 30, 2027
365 days1 year52 weeks, 1 dayJanuary 1, 2028
500 days1 year, 4 months, 14 days71 weeks, 3 daysMay 15, 2028
1,000 days2 years, 8 months, 26 days142 weeks, 6 daysSeptember 27, 2029

Days after a date, and days in each month

The dates a common number of days after and before January 1, 2027, weekends and holidays included; for any other start date, enter it in the calculator.

Days from January 1, 2027
DaysAfterBefore
7 daysFriday, January 8, 2027Friday, December 25, 2026
14 daysFriday, January 15, 2027Friday, December 18, 2026
30 daysSunday, January 31, 2027Wednesday, December 2, 2026
45 daysMonday, February 15, 2027Tuesday, November 17, 2026
60 daysTuesday, March 2, 2027Monday, November 2, 2026
90 daysThursday, April 1, 2027Saturday, October 3, 2026
100 daysSunday, April 11, 2027Wednesday, September 23, 2026
120 daysSaturday, May 1, 2027Thursday, September 3, 2026
180 daysWednesday, June 30, 2027Sunday, July 5, 2026
270 daysTuesday, September 28, 2027Monday, April 6, 2026
365 daysSaturday, January 1, 2028Thursday, January 1, 2026

February is the only month whose length changes. From March on, every day of a leap year has a day-of-year number one higher than the same date in a common year.

Month lengths in 2027 and 2028
MonthDays in 2027Days in 2028Day of the year on the 1st, 2027
January31311
February282932
March313160
April303091
May3131121
June3030152
July3131182
August3131213
September3030244
October3131274
November3030305
December3131335

The same calculations in Excel or Google Sheets

With the start date in A2 and the end date in B2:

  • Days between: =B2-A2, the same as the calculator without the box ticked; add 1 to count both dates.
  • Add days or months: =A2+90 adds 90 days, =EDATE(A2, 6) adds 6 months with the same month-end rule.
  • Years and months: =DATEDIF(A2, B2, "Y") and "YM". Microsoft advises against the "MD" unit, which can return wrong days.
  • Business days: =NETWORKDAYS(A2, B2, holidays) counts both ends and skips only the holidays you list, so it matches the calculator with the box ticked once the observed federal holidays are in that range.

For ages, the age calculator gives the same breakdown with the next birthday; for spans with times of day, the date duration calculator.

Frequently asked questions

How do I calculate the date difference between two dates?
Subtract the earlier date from the later one: open "Days between dates", pick both dates and the calculator shows the number of days. It counts the days after the start date up to and including the end date. Tick "Count both the start and the end date" to add the start day as well, for example when both days of an event count.
How do I add days to a date?
Open "Add or subtract", pick the start date, choose Add (+), type the number of days and keep the unit on Days; the new date appears with its weekday. Every calendar day counts, weekends included, so 90 days after January 1, 2027 is April 1, 2027. Choose Subtract (−) to count back, for example to find a start date from an end date.
How many years, months and days are between two dates?
Read the "Years, months, days" line under the day count in "Days between dates". It gives the whole years, then the whole months, then the remaining days, so January 15 to March 15 is exactly 2 months. For a total in months, multiply the years by 12 and add the months.
How many weeks are between two dates?
Divide the days between them by 7: the whole weeks, then the days left over. The "Weeks and days" line does this, so January 1, 2027 to March 1, 2027 is 59 days, which is 8 weeks and 3 days.
What happens when I add a month to January 31?
You get the last day of February: February 28, or February 29 in a leap year. When the target month is shorter than the start day, the date moves to the last day of that month. Spreadsheet functions such as Excel's EDATE follow the same rule.
Is adding 4 weeks the same as adding 1 month?
No. 4 weeks is always 28 days, while 1 month moves to the same day number in the next month, which is 28 to 31 days later depending on the month.
When should I count both the start and the end date?
When every day from the first to the last counts as a whole day, such as the days of a trip, a course or a leave. Leave the box unticked for spans measured from one date to another, such as deadlines, durations or the nights of a stay. Ticking it adds exactly 1 day, so June 1 to June 30 becomes 30 days instead of 29.
How many calendar days are between two dates, and how many business days?
Calendar days count every day, weekends and holidays included; that is the headline number. Business days count Monday to Friday without the US federal holidays, on the last line. March 1, 2027 to March 31, 2027 is 30 calendar days and 23 business days with both ends counted.
How many days are 3 months or 6 months?
It depends on the start date: 3 months is 89 to 92 days and 6 months is 181 to 184 days. Add the months in "Add or subtract" and the "Calendar days from the start" line shows the exact number for your date.
How do I find the halfway date between two dates?
Count the days between the dates, halve the count, and add that many days to the start date. When the count is odd, the middle falls between two days, so pick the one you prefer.
Does the calculator count leap years?
Yes. It uses the Gregorian calendar, so February has 29 days in years divisible by 4, except century years that are not divisible by 400 (2000 was a leap year, 2100 will not be).
Which business days does the calculator count?
Monday to Friday, minus the US federal holidays on the days they are observed. To count weekdays only or add business days to a date, use the business days calculator.
Can I put the result in my calendar?
The calculator shows the result on a month calendar, with the days of the span shaded and the US federal holidays listed. To save a date to Google Calendar, Apple Calendar or Outlook, the time calculator's "Add to calendar" button makes an event file for any date and time.