How to count the days between two dates, add days, weeks or months to a date, and why calculators disagree: inclusive counts, month ends and leap years.
By Udit Agarwal · Updated October 17, 2026
To count the days between two dates, subtract the earlier date from the later one: 18 October 2026 to 25 December 2026 is 68 days. That figure leaves out the first day, so if both the first and the last day count, as with the days of a trip, add one to get 69. To find a future date, add days instead: 90 days from 18 October 2026 is Saturday 16 January 2027. When calculators disagree, the cause is usually inclusive counting, a month end or a leap year.
Three methods give the same answer:
=B2-A2 or =DAYS(B2, A2) returns the gap.The Date Duration Calculator gives the gap between any two dates in days and in years, months and days.
A count of days between two dates counts the gaps between them, and counting the dates themselves gives one more, just as a 10 cm ruler has 11 marks. A hotel stay from Monday 10 to Saturday 15 August 2026 is 5 nights but touches 6 dates.
| From | To | Days apart | Both days counted |
|---|---|---|---|
| 1 Mar 2026 | 31 Mar 2026 | 30 | 31 |
| 1 Jan 2026 | 31 Dec 2026 | 364 | 365 |
"Days until", "days since" and "days later" measure elapsed time, so they use the exclusive count. Days used are often counted inclusively: leave from Monday to Friday is 5 days, though Friday is only 4 days after Monday. Spreadsheet subtraction is exclusive, but the NETWORKDAYS function counts both ends, so its business-day total can be one higher than a count that leaves out the end date.
Adding is the same walk forwards. For 90 days from 18 October 2026, the 13 days left in October, 30 in November (43 so far) and 31 in December (74) leave 16 more, landing on 16 January 2027. Subtracting walks backwards: 90 days before 18 October 2026 is Monday 20 July.
Weeks are 7 days, which gives a quick weekday check. Whole weeks keep the weekday: two weeks after Sunday 18 October is Sunday 1 November. 90 days is 12 weeks and 6 days, so the weekday moves six places, from Sunday to Saturday. The Day of the Week Calculator finds the weekday of any date.
A month is not a fixed length: one month after 18 October 2026 is 31 days later, but one month after 18 February 2026 is only 28 days later. The trouble starts when the start day does not exist in the target month. 31 January plus one month would be 31 February, so software has to choose:
| Convention | 31 Jan 2025 + 1 month | Where you meet it |
|---|---|---|
| Clamp to the month's last day | 28 Feb 2025 | ArrayKit Date Calculator, spreadsheet EDATE, Java's LocalDate |
| Roll extra days into the next month | 3 Mar 2025 | JavaScript's Date.setMonth, spreadsheet DATE(2025, 2, 31) |
| Keep month-end dates at month end | 28 Feb 2025, and one more month gives 31 Mar | some financial payment schedules |
In a leap year, clamping gives 29 February and rolling over gives 2 March. Clamping, the choice made by EDATE and many date libraries, has side effects:
In the Gregorian calendar, used for civil dates in most of the world, a year divisible by 4 is a leap year, except century years, which must be divisible by 400.
| Year | Rule | Leap year? |
|---|---|---|
| 2024, 2028 | divisible by 4 | Yes |
| 2026 | not divisible by 4 | No |
| 1900, 2100 | century, not divisible by 400 | No |
| 2000, 2400 | century, divisible by 400 | Yes |
That is 97 leap years every 400 years, an average of 365.2425 days, close to the solar year of about 365.2422 days. Leap days also mean a year is not always 365 days: 1 March 2023 to 1 March 2024 is 366 days because it includes 29 February 2024, while the following year is 365. In the Date Calculator, 29 February 2024 plus one year clamps to 28 February 2025; some systems use 1 March. How Exact Age Is Calculated covers 29 February birthdays.
The Date Calculator applies this rule even to years before the calendar's introduction in 1582, so dates from before a country adopted it may not match the calendar used there at the time.
Calendar days count every day. Business days usually count Monday to Friday and skip public holidays, so "within 10 business days" means about two weeks.
The 90 days from Sunday 18 October 2026 to Saturday 16 January 2027 contain 65 weekdays and 25 weekend days. Christmas Day and New Year's Day both fall on Fridays in that span, so where both are holidays, 63 working days remain. Adding working days is a separate calculation: 10 business days after Monday 19 October 2026 is Monday 2 November.
The Date Calculator adds calendar days and reports the weekday and weekend split, but it does not skip holidays or add working days. The Business Days Calculator does both. It also counts working days between two dates with the end date excluded or included, and skips holidays from fixed-date presets for the US, UK, India and Germany or from dates you paste; movable ones such as Easter must be added by hand. Both tools treat Saturday and Sunday as the weekend.
The date depends on where you are. At 23:00 on Sunday 18 October 2026 in New York, it is 04:00 on Monday 19 October in London and noon in Tokyo, so for part of every day the cities disagree about what "90 days from today" means. The Date Calculator's Today button uses your device's date. For a deadline set at a clock time elsewhere, convert it first with the World Clock & Time Zone Converter.
Daylight saving causes a quieter error. On the days clocks change, a day lasts 23 or 25 hours, so software that divides a gap in milliseconds by 86,400,000 (one 24-hour day) can come out a day short. In New York, midnight on 1 March 2025 to midnight on 1 April 2025 is 31 calendar days but 743 hours, because clocks went forward on 9 March, and 743 hours rounds down to 30 days. The Date Calculator avoids this by working with calendar dates and ignoring the time of day. For hours between two clock times, use the Time Duration Calculator.
| Task | Start | Amount | Result |
|---|---|---|---|
| 90-day deadline | Sun 18 Oct 2026 | + 90 days | Sat 16 Jan 2027 |
| One month's notice | Sat 31 Jan 2026 | + 1 month | Sat 28 Feb 2026 |
| 30 days' notice | Sat 31 Jan 2026 | + 30 days | Mon 2 Mar 2026 |
| Two-year warranty | Mon 16 Nov 2026 | + 2 years | Thu 16 Nov 2028 |
"One month" and "30 days" end two days apart here. The warranty covers 731 days, not 730, because it includes 29 February 2028; check whether cover ends on that date or the day before.
The 90-day deadline lands on a Saturday, a case that official rules often cover. Rule 6(a) of the US Federal Rules of Civil Procedure, for example, excludes the day of the triggering event, counts every later day including weekends and holidays, and moves a last day that falls on a weekend or legal holiday to the next day that is neither. Monday 18 January 2027 is Martin Luther King Jr. Day, so that deadline would become Tuesday 19 January. Contracts and other rules differ, so check the wording that applies to you.
The Date Calculator finds the date a given amount of time before or after a start date. Pick a start date or press Today, choose Add or Subtract, and fill in any of Years, Months, Weeks and Days; the answer updates as you type. Blank fields count as zero, and only whole, non-negative numbers are accepted, so use Subtract to go back in time.
Years and months are applied first, clamped to the last day of a shorter month, then weeks and days. The result appears as YYYY-MM-DD and written out with its weekday, followed by the total calendar days moved, split into business days (Monday to Friday) and weekend days. The split counts from the earlier date up to, but not including, the later one, so Friday 23 October 2026 plus 3 days shows 1 business day and 2 weekend days. Each figure has a copy button.
It does not count the days between two dates you pick, skip holidays, add working days or handle times of day. The calculation runs in your browser, and the dates you enter are not sent anywhere.
How many days are there between two dates? Subtract the earlier date from the later one, month by month or with =B2-A2 in a spreadsheet. 18 October to 25 December 2026 is 68 days, or 69 if both the first and the last day count.
What date is 90 days from today? Add 90 days, taking each month at its real length. From 18 October 2026 it is Saturday 16 January 2027. Since 90 days is 12 weeks and 6 days, the answer always falls on the weekday before today's.
Should I count the first day? For elapsed time, such as "days until" or a deadline 30 days after an event, the first day is usually left out. For days of use, such as annual leave, both ends usually count. If a contract or rule says which, follow it.
What is 31 January plus one month? Usually 28 February, or 29 February in a leap year, because the ArrayKit Date Calculator, the spreadsheet EDATE function and many date libraries clamp to the end of the shorter month. Software that rolls the extra days over, such as JavaScript's built-in Date, gives 3 March instead (2 March in a leap year).
Is 2100 a leap year? No. Century years are leap years only when divisible by 400, so 2000 was one, but 1900 was not and 2100 will not be. The next leap years are 2028 and 2032.
How do I add days to a date in Excel or Google Sheets? Use =A2+90 for days, =EDATE(A2, 3) for three months with end-of-month clamping, and =WORKDAY(A2, 10) for ten working days.
All Date / Time tools · All guides