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 to use the date calculator
- 1
Pick a mode
Choose "Add or subtract" to move from a date, or "Days between dates" to measure a span.
- 2
Enter the dates
Pick the start date, then the amount and unit, or the end date. Today is filled in for you.
- 3
Read the answer
The result updates as you type. Copy the link to share or save the calculation.
How DateMath calculates dates
DateMath counts the days between two dates as their difference: the days after the start date up to and including the end date, or both ends when you tick the box. To add months or years, DateMath keeps the day number and moves to the last day of the month when that day doesn't exist. Days and weeks are exact counts, weekends included, and a week is always 7 days.
- The Gregorian calendar. DateMath treats every date as a Gregorian date, with its leap-year rule: a year divisible by 4 is a leap year, except century years not divisible by 400, so 2000 had a February 29 and 2100 will not. Source: Gregorian calendar.
- US federal holidays. DateMath skips the 11 annual holidays of 5 U.S.C. 6103 on the days they are observed for federal employees, as the US Office of Personnel Management (OPM) lists them: a Saturday holiday on the Friday before, a Sunday holiday on the Monday after. Source: 5 U.S.C. 6103, OPM federal holidays.
DateMath's date math is tested against more than 100 cases worked out by hand. Every worked example and table on the site is computed with the same code the calculators run, so a page and its calculator can't disagree.
Add or subtract days, weeks, months and years from a date
To add days to a date, open the "Add or subtract" tab, pick the start date, choose Add (+), type the number and keep the unit on Days: the new date appears at once, with its weekday. This free online date calculator works the same way for weeks, months and years, and Subtract (−) counts backward instead. The calculation runs in your browser, so the answer changes as you type.
Add days to a date
Days are added one calendar day at a time, so a date plus days lands where you would end up counting squares on a wall calendar, across month ends, year ends and February 29 in a leap year. Weekends count like any other day. A week is always 7 days, so adding 6 weeks gives the same date as adding 42 days. To skip weekends and holidays while adding, use the business days calculator, which adds business days instead.
Under the headline date, the result shows three more lines: the date in ISO format (YYYY-MM-DD, the form spreadsheets and many forms expect), the calendar days from the start date, and the day of the year with its ISO week number. The calendar-days line is the quick way to turn months or years into days: add 3 months and it shows how many days that is from your start date. For the week number on its own, or the dates of a given week, use the week number calculator.
Add months or years
Months and years move by calendar months, not by a fixed number of days. One month after the 15th is the 15th of the next month, whether that is 28, 29, 30 or 31 days later. When the day number does not exist in the target month, the result is that month's last day: January 31, 2027 plus 1 month is February 28, 2027. A year is 12 months, so 1 year after February 29, 2028 is February 28, 2029. The month-end table further down shows more of these cases.
Subtract days, weeks, months or years
Choose Subtract (−) to count backward: the date 30 days before a deadline, or the start of a period that ends on a known date. The same rules apply in reverse, so May 31, 2027 minus 3 months is February 28, 2027. The "Calendar days from the start" line is then negative, showing how far back the result is.
Find the end date from a start date and a duration
To go from a start date to an end date, enter the start date and add the duration in the unit it is given in: a 90-day period in days, a 6-month lease in months, a 2-year term in years. The result is the date exactly that long after the start. If the period counts the start date as day 1, its last day is one day earlier: day 10 of a period that starts on March 1, 2027 is March 10, 2027, while adding 10 days gives March 11, 2027. Deadlines written as "within 30 days of" an event usually leave out the day of the event itself, which is how the calculator counts; when a rule says otherwise, adjust by one day.
Adding and subtracting dates: examples
Months and years move to the same day number; when that day does not exist, the result is the last day of the month.
- 90 days after January 1, 2027Thursday, April 1, 2027
- 30 days before January 1, 2027Wednesday, December 2, 2026
- 6 weeks after March 15, 2027Monday, April 26, 2027
- 12 weeks before September 1, 2027Wednesday, June 9, 2027
- 6 months after August 31, 2027Tuesday, February 29, 2028
- 3 months before October 15, 2027Thursday, July 15, 2027
- 18 months after June 30, 2027Saturday, December 30, 2028
- 1 year after February 29, 2028Wednesday, February 28, 2029
- 10 years after May 20, 2027Wednesday, May 20, 2037
How many days are between two dates?
Subtract the earlier date from the later one. In the "Days between dates" tab, pick a start date and an end date, and the headline shows the date difference in days: the days after the start date up to and including the end date. January 1, 2027 to December 31, 2027 is therefore 364 days. If the end date is before the start date, the count is negative and a note says so. Under the headline, three lines break the same span down: years, months and days; weeks and days; and business days.
Counting both the start and the end date
Tick "Count both the start and the end date (adds 1 day)" when every day in the range counts as a whole day, such as the days of a trip, a course or a leave that runs from a first to a last day. Leave it unticked for durations, deadlines, the nights of a stay and anything measured from one date to another. The checkbox changes every line of the result: the day total, the years, months and days, the weeks, and the business days, which then include the start date when it is a business day. Most one-day disagreements between date calculators come down to this choice.
| Dates | Days | Days, both counted | Business days | Business days, 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 |
| December 20, 2027 to January 3, 2028 | 14 | 15 | 8 | 9 |
| January 1, 2027 to December 31, 2027 | 364 | 365 | 249 | 249 |
Years and months between dates
The "Years, months, days" line answers how many years or months are between two dates. DateMath counts the most whole calendar months that fit, shows each 12 of them as a year, and gives the rest in days. It uses the same month-end rule as adding, so adding the result back to the start date always lands on the end date. For a total in months, multiply the years by 12 and add the months.
| Dates | Years, months, days | Days |
|---|---|---|
| January 15, 2027 to March 15, 2027 | 2 months | 59 days |
| March 15, 2027 to August 2, 2029 | 2 years, 4 months, 18 days | 871 days |
| September 1, 2027 to June 15, 2028 | 9 months, 14 days | 288 days |
| January 31, 2027 to February 28, 2027 | 1 month | 28 days |
| February 28, 2027 to March 31, 2027 | 1 month, 3 days | 31 days |
| February 29, 2028 to February 28, 2029 | 1 year | 365 days |
Month ends follow from the adding rule. January 31, 2027 to February 28, 2027 is 1 month, because 1 month after January 31 is February 28, 2027. February 28, 2027 to March 31, 2027 is 1 month, 3 days, because 1 month after February 28 is March 28, 2027. For ages and birthdays, the age calculator gives the same breakdown with the next birthday; for spans with times of day, the date duration calculator adds hours and minutes.
Weeks between dates
The "Weeks and days" line divides the day count by 7: whole weeks first, then the days left over. It is the quick answer to "how many weeks until" a date, and it follows the checkbox, so a 14-day trip counted from its first to its last day shows as exactly 2 weeks.
Business days between two dates
The last line counts business days: Monday to Friday, without the 11 US federal holidays on the days they are observed. A holiday that falls on a Saturday is skipped on the Friday before, one that falls on a Sunday on the Monday after. Without the checkbox the count starts the day after the start date, the way a "within 10 business days" deadline counts; with it, the start date counts too, which matches Excel's NETWORKDAYS. Ranges longer than 100 years are not counted.
For example, from November 21, 2027 to January 2, 2028 the calculator looks at 42 days. 12 of them are weekend days, and these weekday holidays are left out:
- 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
That leaves 27 business days. State, local and company holidays are not included. To add business days to a date, count weekdays only, or see which holidays were skipped, use the business days calculator.
Days between dates: examples
The day count is the difference between the dates; business days leave out weekends and US federal holidays.
- December 1, 2026 to December 25, 202624 days (17 business days)
- February 1, 2027 to March 1, 202728 days (19 business days)
- June 1, 2027 to September 1, 202792 days (64 business days)
- September 1, 2027 to June 15, 2028288 days (197 business days)
- January 1, 2027 to January 1, 2028365 days (249 business days)
- January 1, 2027 to January 1, 20301,096 days (749 business days)
How to find the halfway date between two dates
Count the days between the two dates, halve the count, and add that many days to the start date. The calculator has no separate halfway mode, but its two tabs do it in three steps:
- In "Days between dates", enter both dates and read the day count, with the checkbox unticked.
- Divide the count by 2.
- In "Add or subtract", enter the start date, choose Add and enter the half count in days.
For example, March 1, 2027 to August 15, 2027 is 167 days. Half of that is 83.5 days, so the middle falls between two days: Sunday, May 23, 2027 and Monday, May 24, 2027 are equally close to it. Leave the checkbox unticked even when both the first and the last day count: the middle of a period is the same either way.
Month ends, leap years and other edge cases
Days and weeks are fixed lengths, so adding them never needs a rule. Months and years are not, and that is where date calculators can disagree. These are the rules this one follows.
The month-end rule
When you add months or years and the start day does not exist in the target month, the result is the last day of that month. Spreadsheet functions such as Excel's EDATE use the same rule. The rule keeps the day number; it does not track "the last day of the month", so 1 month after February 28, 2027 is March 28, 2027, not March 31.
| Start date | Change | Result | Calendar days |
|---|---|---|---|
| January 31, 2027 | Add 1 month | February 28, 2027 | 28 days |
| January 31, 2028 | Add 1 month | February 29, 2028 | 29 days |
| March 31, 2027 | Add 1 month | April 30, 2027 | 30 days |
| August 31, 2027 | Add 6 months | February 29, 2028 | 182 days |
| May 31, 2027 | Subtract 3 months | February 28, 2027 | 92 days |
| February 29, 2028 | Add 1 year | February 28, 2029 | 365 days |
| February 29, 2028 | Add 4 years | February 29, 2032 | 1,461 days |
It also means a month step is not always undone by the opposite step: January 31, 2027 plus 1 month is February 28, 2027, and that date minus 1 month is January 28, 2027. To get back to the original date, calculate from it again rather than from the result, or work in days.
Leap years
A leap year has 366 days, with February 29. In the Gregorian calendar a year divisible by 4 is a leap year, except century years, which are leap years only when divisible by 400. The calculator applies this rule to every date, so counts across February are exact: February 1, 2027 to March 1, 2027 is 28 days, February 1, 2028 to March 1, 2028 is 29 days. Leap years from 2024 to 2040: 2024, 2028, 2032, 2036, 2040.
| Year | Leap year | Days in the year | Days in February |
|---|---|---|---|
| 1900 | No | 365 | 28 |
| 2000 | Yes | 366 | 29 |
| 2024 | Yes | 366 | 29 |
| 2027 | No | 365 | 28 |
| 2100 | No | 365 | 28 |
Why 4 weeks is not 1 month
4 weeks is always 28 days; 1 month is 28 to 31 days, depending on the start date. From January 1, 2027, 4 weeks reaches January 29, 2027 and 1 month reaches February 1, 2027. The same holds for years: 52 weeks is 364 days, one day short of a common year and two short of a leap year. When a contract or a rule says "months", add months; when it says "weeks" or "days", add those.
Limits
- Dates run from the year 1 to 9999; a result outside that range is reported instead of shown.
- Amounts are whole numbers. For a month and a half, add 1 month and then 15 days in a second step, or use weeks or days.
- Dates are plain calendar dates without time zones. To add hours and minutes, use the time calculator.
- Business days are counted for ranges up to 100 years.
Converting days to months and months to days
A span in days turns into months only from a given start date, because months differ in length. The calculator converts both ways: add months in "Add or subtract" 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 |
Quick-reference tables
Days after and before a date
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 |
Days in each month
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 |
Date calculations in Excel and Google Sheets
Spreadsheets store dates as day numbers, so the same calculations are short formulas. With the start date in A2 and the end date in B2:
- Days between dates: =B2-A2 or =DAYS(B2, A2) gives the same count as the calculator without the checkbox; add 1 to count both dates.
- Add days or weeks: =A2+90 adds 90 days, =A2+7*6 adds 6 weeks.
- Add months or years: =EDATE(A2, 6) adds 6 months and =EDATE(A2, 12*2) adds 2 years, with the same month-end rule as the calculator. Format the cell as a date to see the result as one.
- Years and months between dates:=DATEDIF(A2, B2, "Y") gives whole years, "YM" the months after them and "MD" the days. The results can differ from the calculator's around month ends, and Microsoft advises against the "MD" unit because it can return wrong results.
- Business days: =NETWORKDAYS(A2, B2, holidays) counts the weekdays from the start date to the end date, both included, and skips only the holidays listed in the holidays range. With the observed US federal holidays in that range, it matches the calculator with the checkbox ticked.
What people use a date calculator for
- Deadlines and notice periods."Within 30 days" or "60 days' notice": add the days to the date of the notice or event. When the deadline is in business days, use the business days calculator.
- Contract, lease and subscription terms. Terms in months or years: add months, and the month-end rule shows where a term that starts on the 29th, 30th or 31st ends.
- Return windows, trials and warranties. A 30-day return window or a 1-year warranty: add the period to the purchase date.
- Invoices. Net 30 terms make payment due 30 days after the invoice date: add 30 days.
- Countdowns. Days until an event: "Days between dates" opens with today as the start, so enter the event date and read the days, or the weeks and days.
- Looking back. How long ago something happened: enter the past date as the start and today as the end.
- Trips, leave and events. The number of days from the first to the last day: tick the box to count both dates.
- Project schedules. Milestones a number of weeks apart: add weeks, and read the ISO week in the result for planning boards that work in week numbers.
Every calculation can be saved or shared with "Copy a link to this calculation": the link opens the calculator with the same dates and settings filled in.
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, which is the same as the difference between the two dates. 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 instead.
- How do I find a start date from an end date and a duration?
- Subtract the duration from the end date: in "Add or subtract", enter the end date as the start date, choose Subtract (−) and enter the amount and unit. For example, 30 days before March 31 is March 1.
- How many years and months 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 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.
- 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 is moved 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 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. Use "Days between dates" for the count and "Add or subtract" for the last step. 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 date calculator count?
- Monday to Friday, minus the US federal holidays on the days they are observed. For other options, such as counting weekdays only or adding business days to a date, use the business days calculator.