Date Calculator
Count how much time separates two dates, or move a date forwards and backwards by a set number of days, months or years.
Date Difference
Add or Subtract Time
The two things this calculator does
The tool runs two independent calculations, and you can use either one on its own. Nothing is shared between them, so filling in one section does not disturb the other.
1. The difference between two dates
Give it a start date and an end date and it returns the gap three ways at once: the total number of days, the same gap broken into whole years, months and days, and the total number of whole weeks. The calendar breakdown is worked out by stepping forward from the start date, taking as many whole years as fit without passing the end date, then as many whole months, then counting the leftover days one at a time. That is why the breakdown and the total do not look like simple multiples of each other: a month is a real calendar month here, not a fixed 30 days.
Total days = 953
Whole weeks = floor(953 / 7) = 136 (with 1 day left over, not shown separately)
Calendar breakdown = 2 years, 7 months, 10 days
The start date has to fall on or before the end date. If you put them the other way round the calculator says so rather than returning a negative number, and identical dates return zero.
2. Adding or subtracting time
Pick a base date, choose Add or Subtract, type a quantity, and choose days, months or years. The result is shown as a full date with its weekday, which is often the part you actually needed: knowing that a 90 day deadline lands on a Monday matters more than the number itself.
25 August 2026 + 90 days = Monday, 23 November 2026
Adding days is the safe operation. Months and years are where date arithmetic stops being obvious, so the next two sections deal with those.
Leap years, and the rule that actually catches people
Most people know that a year divisible by 4 is a leap year. The full Gregorian rule has two more clauses: century years are not leap years, unless they are divisible by 400. So 1996, 2024 and 2028 are leap years, 1900 and 2100 are not, and 2000 was, because 2000 divides by 400.
This matters for any span that crosses a century. Counting from 28 February to 1 March gives 2 days in 2000, because 29 February existed that year. The identical span in 1900 gives 1 day. The calculator gets both right because it works on real calendar dates rather than a 365 day approximation, so any span containing a 29 February automatically picks up the extra day.
One consequence worth knowing: adding one year to 29 February has no exact answer, because three years in four have no 29 February. This calculator clamps the result back to the last valid day, so 29 February 2024 plus 1 year gives 28 February 2025.
Why adding one month to 31 January is ambiguous
There is no universally correct answer to what 31 January plus one month is, because February has no 31st. Two conventions exist. Clamping moves the result to the last valid day of the target month, giving 28 February. Rolling forward keeps counting into the next month, giving 3 March in a normal year.
This calculator clamps. An impossible day lands on the last real day of the target month, which is the convention every mainstream date library uses and the one legal and accounting documents normally intend. It works the same way when you subtract, and it guarantees the answer is always inside the month you asked for.
| Input | Intermediate | Result from this calculator |
|---|---|---|
| 31 January 2026 + 1 month | 31 February 2026 (does not exist) | 28 February 2026 |
| 31 January 2024 + 1 month | 31 February 2024 (leap year) | 29 February 2024 |
| 31 March 2026 - 1 month | 31 February 2026 | 28 February 2026 |
| 29 February 2024 + 1 year | 29 February 2025 (does not exist) | 28 February 2025 |
Note that clamping is not reversible. Subtracting a month from 31 March gives 28 February, but adding a month back to 28 February gives 28 March, not the 31st you started on. Any day later than the 28th can absorb a shorter month this way. If a contract turns on the exact day, state the intended date explicitly or count in days instead of months.
Inclusive and exclusive counting differ by one
Ask how many days there are from 1 January to 31 January and you can defend two answers. Exclusive counting measures the gap between the two dates and gives 30. Inclusive counting counts both endpoints as days you occupied and gives 31.
This calculator counts exclusively. It subtracts the start from the end, so the start date is not counted and the end date is. If you need the inclusive figure, add 1 to the total.
Inclusive (days present, including both ends): 30 + 1 = 31 days
The distinction is not academic. Hotel nights, interest accrual and most notice periods are exclusive. Days spent in a country for visa or tax purposes are almost always inclusive, and a part day usually counts as a whole day.
Where this gets used
- Notice periods. Resigning on a 30 day notice: add 30 days to the date you hand the letter in and check whether the last day falls on a weekend.
- Payment terms. Net 30, net 60 and net 90 are day counts, not month counts, so add days rather than months to get the due date an invoice should carry.
- Project deadlines. Add the sprint length to a start date, or measure the real gap between a kickoff and a delivery date after the fact.
- Visa and travel limits. Rules such as 90 days in any 180 day window need an exact day count, and one miscounted day can invalidate a stay.
- Warranty and returns. Add the warranty length to a purchase date to see whether a claim is still inside the window.
Limitations to be aware of
Every date field is capped at today, in both sections, so you can only ever start from a date that has already happened. That makes the difference section a measure of spans in the past. Future dates are still reachable, but only as an answer rather than an input: add the days, months or years to a past or present date and the result can land years ahead. The calculator also counts calendar days, not working days: it has no idea about weekends or public holidays, so a 10 day result is 10 calendar days. And it uses the modern Gregorian calendar for every year, including years before the calendar was adopted, which makes historical dates before the 1580s unreliable.
Frequently asked questions
Why does the years, months and days breakdown not match the total days?
Because months have different lengths. The breakdown counts real calendar months, so 2 years, 7 months and 10 days can be 953 days or a slightly different number depending on which months and leap years the span crosses. The total days figure is the exact one.
How many weeks does it show, and what happens to the spare days?
It shows whole weeks only, calculated by dividing the total days by 7 and discarding the remainder. A 953 day span shows 136 weeks, and the one leftover day is not displayed. To recover it, subtract weeks times 7 from the total days.
Does it count business days?
No. Every result is in calendar days including weekends and holidays. If you need working days, a rough estimate is to multiply calendar days by 5 divided by 7, then subtract the public holidays in the range by hand.
Can I enter a start date that is after the end date?
The difference section will refuse it and show a message rather than returning a negative result. Swap the two dates, or use the subtract option in the second section to step backwards from a date.
Is 2100 a leap year?
No. It is divisible by 4 but it is a century year and it is not divisible by 400, so February 2100 has 28 days. The next century year that is a leap year is 2400. Many spreadsheets and older systems get 1900 wrong for compatibility reasons, so be careful when comparing results across tools for dates that far back.