Date Difference Calculator
Find the exact difference between two dates.
Difference
2 years, 4 months, 22 days
Total days
873
Total weeks
124
Total months
28
Total hours
20,952
How to use Date Difference Calculator
What this calculator does
This date difference calculator measures the span between any two dates. It shows the headline result as a calendar breakdown — a number of years, months and days — and then expresses the same period as total days, total weeks, total months and total hours. A toggle lets you choose whether the end date counts as a full day, which switches the result between an exclusive gap and an inclusive range. The order of the two dates does not matter; the tool always reports a positive span from the earlier date to the later one. Every figure updates the moment you change an input, and the headline result has a copy button.
Why you might need it
Counting days by hand is slow and error-prone, especially across month and year boundaries. You might need to know how long a project ran, how many days a subscription has been active, how far away a deadline is, or the length of a trip or hotel stay. Contracts, leases and notice periods are often defined in days or whole months. Anniversaries and milestones are easier to plan when you can see a span in several units at once. A calculator that respects real month lengths and leap years gives a result you can rely on for all of these.
How to use it
- Enter the start date and the end date. They can be in any order.
- Decide whether to include the end date in the day count. Leave it off for a plain gap; turn it on for an inclusive range.
- Read the headline difference in years, months and days.
- Check the secondary cards for total days, weeks, months and hours.
- Press Reset to restore the default dates and toggle.
How it’s calculated
The calculator first sorts the two dates so the earlier one is the start. It then counts whole calendar years between them, then whole months, then leftover days. When the day-of-month of the later date is smaller than that of the earlier date, it borrows the real length of the preceding month, so February and 31-day months are handled correctly. The whole-unit totals come from the plain day gap: total days is the difference in days, total weeks is that divided by seven and rounded down, total hours is total days times 24, and total months is years times twelve plus leftover months. When the “include end date” toggle is on, the calculator adds one day to the end before measuring, turning an exclusive gap into an inclusive count.
Common pitfalls
The biggest source of confusion is the inclusive-versus-exclusive question. “From the 1st to the 5th” is four days as a gap but five days if both endpoints count — neither is wrong, they answer different questions, which is why the toggle exists. Another pitfall is expecting total months to equal total days divided by 30; because months vary in length, the calendar-accurate month count is the honest figure. Finally, remember that the headline months value is only the remainder after whole years are removed, so it is always between zero and eleven.
Tips and related calculations
When you need an inclusive figure — counting both the first and last day of a stay or billing period — switch the end-date toggle on before reading the totals. If one of your dates is a birth date and you want an age rather than a neutral span, an age calculator frames the same arithmetic around birthdays. To find a date a certain distance from a known date, a date add-and-subtract tool does the reverse operation. Because every calculation here runs locally with standard calendar rules, you can compare as many date pairs as you like, quickly and privately.
Frequently asked questions
Does it matter which date I put first?
What does 'include the end date' do?
Why doesn't total months simply equal total days divided by 30?
Are the dates I enter uploaded anywhere?
How are leap years handled?
Related tools
Age Calculator
Calculate exact age in years, months, and days.
Date Add & Subtract
Add or subtract days, months, and years from a date.
Time Zone Converter
Convert times across world time zones.
Timestamp to Date
Convert Unix timestamps into readable dates.
Percentage Calculator
Solve percentage problems in several modes.
Unit Converter
Convert between length, weight, volume, and more.