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.
| Start date | Change | Result | Days later |
|---|---|---|---|
| January 31, 2027 | + 1 month | February 28, 2027 | 28 days |
| January 31, 2028 | + 1 month | February 29, 2028 | 29 days |
| August 31, 2027 | + 6 months | February 29, 2028 | 182 days |
| May 31, 2027 | − 3 months | February 28, 2027 | 92 days |
| February 29, 2028 | + 1 year | February 28, 2029 | 365 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.
| Dates | Days | Both counted | Business days | Business, both counted |
|---|---|---|---|---|
| March 1, 2027 to March 5, 2027 | 4 | 5 | 4 | 5 |
| June 1, 2027 to June 30, 2027 | 29 | 30 | 20 | 21 |
| November 22, 2027 to November 29, 2027 | 7 | 8 | 4 | 5 |
| January 1, 2027 to December 31, 2027 | 364 | 365 | 249 | 249 |
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.
| Months | Calendar days | From January 1, 2027 |
|---|---|---|
| 1 month | 28 to 31 | 31 days |
| 2 months | 59 to 62 | 59 days |
| 3 months | 89 to 92 | 90 days |
| 6 months | 181 to 184 | 181 days |
| 9 months | 273 to 276 | 273 days |
| 12 months | 365 to 366 | 365 days |
| 18 months | 546 to 550 | 547 days |
| 24 months | 730 to 731 | 731 days |
| Days | Years, months, days | Weeks and days | End date |
|---|---|---|---|
| 30 days | 30 days | 4 weeks, 2 days | January 31, 2027 |
| 60 days | 2 months, 1 day | 8 weeks, 4 days | March 2, 2027 |
| 90 days | 3 months | 12 weeks, 6 days | April 1, 2027 |
| 180 days | 5 months, 29 days | 25 weeks, 5 days | June 30, 2027 |
| 365 days | 1 year | 52 weeks, 1 day | January 1, 2028 |
| 500 days | 1 year, 4 months, 14 days | 71 weeks, 3 days | May 15, 2028 |
| 1,000 days | 2 years, 8 months, 26 days | 142 weeks, 6 days | September 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 | After | Before |
|---|---|---|
| 7 days | Friday, January 8, 2027 | Friday, December 25, 2026 |
| 14 days | Friday, January 15, 2027 | Friday, December 18, 2026 |
| 30 days | Sunday, January 31, 2027 | Wednesday, December 2, 2026 |
| 45 days | Monday, February 15, 2027 | Tuesday, November 17, 2026 |
| 60 days | Tuesday, March 2, 2027 | Monday, November 2, 2026 |
| 90 days | Thursday, April 1, 2027 | Saturday, October 3, 2026 |
| 100 days | Sunday, April 11, 2027 | Wednesday, September 23, 2026 |
| 120 days | Saturday, May 1, 2027 | Thursday, September 3, 2026 |
| 180 days | Wednesday, June 30, 2027 | Sunday, July 5, 2026 |
| 270 days | Tuesday, September 28, 2027 | Monday, April 6, 2026 |
| 365 days | Saturday, January 1, 2028 | Thursday, 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 | Days in 2027 | Days in 2028 | Day of the year on the 1st, 2027 |
|---|---|---|---|
| January | 31 | 31 | 1 |
| February | 28 | 29 | 32 |
| March | 31 | 31 | 60 |
| April | 30 | 30 | 91 |
| May | 31 | 31 | 121 |
| June | 30 | 30 | 152 |
| July | 31 | 31 | 182 |
| August | 31 | 31 | 213 |
| September | 30 | 30 | 244 |
| October | 31 | 31 | 274 |
| November | 30 | 30 | 305 |
| December | 31 | 31 | 335 |
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.