Date Duration Calculator
CalculatorFind the exact duration between two dates — a full years/months/days breakdown, plus totals in days, weeks, and hours. Toggle whether the end date itself should count.
When enabled, the end date itself is counted as a full day — useful for counting hotel nights or rental days rather than pure elapsed time.
All calculation happens in your browser — nothing is sent to a server.
About this tool
About Date Duration Calculator
"How many days between these two dates" is one of the most common date questions there is — for contracts, deadlines, anniversaries, or just curiosity. This calculator gives the full picture: a calendar-aware years/months/days breakdown of the gap between two dates, plus the same duration expressed as total days, weeks, and hours, with an option to count the end date itself as part of the span.
Enter a start and end date in either order — the calculator automatically treats the earlier one as the start. The years/months/days breakdown is computed by advancing full calendar years and then full calendar months from the start date for as long as they fit, with whatever days are left over as the remainder, so it correctly handles tricky cases like month-end dates and leap-day anniversaries. Toggle "include end date" to add one full day to the span, useful for counting hotel nights or rental days rather than pure elapsed time.
Use this to count the days until a deadline or event, to work out someone's exact age in years/months/days, to calculate a rental or subscription period, or alongside the Business Days Calculator on this site when you need a working-days count instead of a calendar-days count.
Instant, fully client-side calculation — no data ever leaves your browser. The years/months/days breakdown always sums back exactly to the total-days figure shown alongside it, so the numbers stay internally consistent even across leap years and variable-length months.
Key Features
- Full years/months/days breakdown between any two dates
- Also shows total days, total weeks, and total hours
- Order-independent — enter the dates in either order
- Optional "include end date" toggle for inclusive-range counting
- Correctly handles month-end dates and leap-day anniversaries
- 100% browser-based, no data ever transmitted
FAQ
Date Duration Calculator — Frequently Asked Questions
Why would I toggle "include end date"?
Without it, the calculator measures pure elapsed time — the same convention used by age calculators, where today minus today is 0 days. With it enabled, the end date itself counts as a full day of the span, which matches how hotel nights, rental periods, or "how many days was I there" questions are usually counted — the same start and end date becomes a 1-day span instead of 0.
How is the years/months/days breakdown calculated?
The calculator advances the start date forward by whole calendar years for as long as it doesn't pass the end date, then by whole calendar months on top of that, and whatever days are left over become the day count. This avoids a subtle bug in the more naive "subtract the calendar fields" approach, which can produce wrong or even negative-feeling results for ranges like January 31 to March 1, since February doesn't have 31 days to borrow from.
Does it matter which date I enter first?
No — enter the dates in either order and the calculator automatically treats the earlier one as the start, so the result is always a non-negative duration.
How does this handle leap years?
Every day-count total (total days, weeks, hours) accounts for every leap day that falls inside the range automatically, since the underlying math works in absolute calendar days rather than assuming fixed year lengths. For the years/months/days breakdown, a start date of February 29 rolls to February 28 the following year (since Feb 29 doesn't recur), with the extra day folded into the days remainder so the totals stay consistent.
What's the difference between this and the Business Days Calculator?
This tool measures calendar time — every day counts, weekends and holidays included. The Business Days Calculator instead counts only working days, skipping weekends and any holidays you specify. Use this one for "how long until/since" questions and the Business Days Calculator for scheduling or deadline questions phrased in working days.
Tips
- Enable "include end date" if you're counting nights, rental days, or anything else that should count both endpoints
- The years/months/days figures and the total-days figure always agree — use whichever unit fits your context
- For deadlines phrased in business days instead of calendar days, use the Business Days Calculator instead
- This tool never transmits your data — the whole calculation runs in your browser
Explore more
Related Tools
Other tools that might be useful for your workflow