How many days until the deadline? How long have you been at your job? Counting days between dates sounds trivial until you hit months of different lengths, leap years and the eternal question of whether to count the last day.

The simplest method
Convert both dates to a day count and subtract them. Doing it by hand, count the days remaining in the first month, add the full months between, then add the days in the last month.
From 10 March to 25 April:
- Rest of March: 31 − 10 = 21 days
- April up to the 25th: 25 days
- Total: 46 days
Should you include the end date?
This is the source of most off-by-one errors:
- Excluding the end date gives the difference: 10 March to 11 March is 1 day.
- Including the end date counts every calendar day on the calendar: 10 March to 11 March is 2 days.
Use inclusive counting for things like hotel stays or "days of leave", where both the first and last day count. Use exclusive counting for elapsed time.
Years, months and days
Sometimes you want "2 years, 3 months and 5 days" rather than a raw day count. Full months are counted from the start date, and the leftover days are shown separately. From 31 January to 1 March is 1 month and 1 day, because the month ends on 28 February (29 in a leap year).
Watch out for these
- Leap years. February has 29 days in years divisible by 4 — except century years not divisible by 400 (2100 is not a leap year).
- Months of different lengths. They range from 28 to 31 days, so "30 days later" isn't "one month later".
- Time zones. When times are involved, an event can land on different dates in different places. Working with plain calendar dates avoids this.

Let a calculator do it
The Date Difference Calculator shows the gap in years, months and days, plus total days and weeks. Tick "Include the end date" if both ends should count. It's all calculated in your browser.
Everyday uses
- Countdown to a trip, exam or due date.
- Length of a contract or notice period.
- How many days overdue an invoice is.
- Exact age — try the Age Calculator.
FAQ
How many days are in six months? It depends which months — from 1 January to 1 July is 181 days (182 in a leap year).
How do I count only weekdays? Use the Business Days Calculator, which skips weekends and holidays.
What happens if my start date is after my end date? The result is the same size, just reversed. The calculator swaps them for you and says so.
Try it now
Open the free Date Difference Calculator and enter two dates.
Related reading
Read How to Calculate Your Exact Age and How to Count Business Days Between Two Dates. Browse the full blog for more guides.
