Date Difference Calculator – Days Between Two Dates
Use this date difference calculator to find the number of days between two dates, along with the difference in years, months, days and weeks. It accounts for leap years and different month lengths automatically.
By DevCalcHub Editorial Team · Last updated:
Formula
The difference is found by counting complete years, then remaining months, then remaining days between the two dates.
Difference = End Date − Start Date
Worked example
For a start date of 1 January 2024 and an end date of 31 December 2024:
Difference = 11 months, 30 days (365 total days)
How to use this date difference calculator
- Enter the start date.
- Enter the end date (on or after the start date).
- See the difference in years, months and days, plus the total number of days and weeks.
Is the end date included?
The calculator counts the days from the start date up to the end date, without counting the end date itself — the same way you would count nights in a hotel stay. From 1 January to 31 January is 30 days. If you need to count both the first and the last day (for example, for leave or rental days), add 1 to the total.
Common uses
- Counting days until an exam, a trip, a festival or a deadline.
- Working out a notice period or your last working day.
- Finding your exact age on a particular date — enter your date of birth as the start date. For age as of today, use the Age Calculator.
- Checking loan, deposit or subscription periods.
Days in each month and leap years
| Days | Months |
|---|---|
| 31 days | January, March, May, July, August, October, December |
| 30 days | April, June, September, November |
| 28 or 29 days | February (29 in a leap year) |
A year is a leap year if it is divisible by 4, except century years, which must be divisible by 400. So 2024 and 2028 are leap years, 2000 was a leap year, but 1900 was not. A normal year has 365 days and a leap year has 366.
Frequently asked questions
Does the calculator count leap years?
Yes. The calculation uses actual calendar dates, so leap years are automatically accounted for in the total day count.
Can I calculate the difference between a past and future date?
Yes, as long as the end date is on or after the start date. Enter any two valid dates to see the difference between them.
How many days are there between two dates including both dates?
Take the result from this calculator and add 1. For example, 1 January to 31 January is 30 days, or 31 days if you count both the first and the last day.
How do I calculate the number of weeks between two dates?
Divide the total number of days by 7. The calculator shows complete weeks automatically — 365 days is 52 complete weeks and 1 day.
Does the calculator count working days only?
No, it counts all calendar days, including weekends and holidays.
Related calculators
Enter details
Difference
0 yrs 11 mo 30 days
Total Days
365
Total Weeks
52