calculatorsname
Date difference
Enter a start date and an end date to see how many whole days separate them, how that splits into weeks, and the same gap expressed as years, months and days.
Runs locally in your browser
How it works
Each date is converted to midnight in UTC and the two are subtracted, then divided by the number of milliseconds in a day. Using a fixed midnight rather than your local clock means a daylight-saving change can never add or remove an hour and turn 59 days into 60. Weeks are the day count divided by seven with the remainder kept, so 60 days reads as 8 weeks and 4 days. The calendar breakdown is worked out month by month — counting back to the same day of the month — instead of dividing by an average month length, which would drift on February and on 31-day months. Dates are counted as whole days: the start day is day zero, so the same date twice is 0 days.
Worked example
From 01/01/2024 to 01/03/2024: 1 January to 1 February is 31 days, and 1 February to 1 March 2024 is 29 days because 2024 is a leap year, so 31 + 29 = 60 days. In weeks that is 8 weeks and 4 days, because 8 × 7 = 56 and 60 − 56 = 4. Measured month by month the same gap is 2 months and 0 days.
Questions and answers
Everything runs in your browser: your text, file or value is never uploaded anywhere.