How to Use the Date / Duration Calculator
Use this free date and duration calculator to quickly find the number of days between two dates — or to add and subtract time from any date. Whether you want to count down to an event, measure how long a project lasted, or find out what day falls 90 days from today, this tool has you covered.
To Calculate Days Between Two Dates
- Select Date Difference as the calculation mode.
- Choose your preferred date format: US (M/D/YYYY) or International (D/M/YYYY).
- Enter the Start Date.
- Enter the End Date.
- Click Calculate. The result shows the difference in years, months, weeks, days, hours, minutes, and seconds.
To Add or Subtract Time from a Date
- Select Add / Subtract Days as the calculation mode.
- Enter your Start Date.
- Enter the number of days (or weeks, months, years) to add. Use a negative number to subtract — for example, −10 subtracts 10 days.
- Select the unit (days, weeks, months, or years).
- Click Calculate to see the result date and day of the week.
How to Calculate Days Between Two Dates by Yourself
To manually calculate the days between, say, 4 September 1999 and 2 January 2003:
- Count full years: From 4 Sep 1999 to 4 Sep 2002 = 3 years. Days in those years (with one leap year, 2000): 2 × 365 + 366 = 1096 days.
- Count full months left: Oct, Nov, Dec 2002 = 31 + 30 + 31 = 92 days.
- Count remaining days: Days left in September from the 4th: 30 − 4 = 26. Plus 2 days into January = 28 days.
- Add: 1096 + 92 + 28 = 1216 days (or 1215 if excluding the end date).
Common Applications
- How many days until a deadline, exam, or event (wedding, vacation, birthday)
- Duration of a school year, project, or subscription
- Your exact age in years, months, days — or even seconds
- When you will turn one billion seconds old
- Which day of the week falls on any given date
- Planning a training program — e.g., what date is 6 weeks from today?
- Estimating a due date or conception date
- Calculating how long ago an event occurred
A Short History of the Calendar
Before modern calendars, most cultures tracked time by lunar phases and seasonal changes. The word calendar comes from the Latin calendae, the first day of the Roman month, marked by a new moon. Priests on the Capitoline Hill announced the days until the next month, and debts recorded in an accounting book called the kalendaria fell due on that day.
Julius Caesar reformed the Roman calendar in 46 BC, introducing a 365-day year with an extra leap day every four years — inspired by the Egyptian solar calendar. This Julian Calendar was a vast improvement, but its year was about 11 minutes too long. Over centuries, those minutes added up to days, which disturbed the Church's calculation of Easter.
Pope Gregory XIII commissioned mathematicians to fix the drift. Their solution: skip the leap day in century years, unless the year is also divisible by 400. The Gregorian Calendar was adopted by Catholic Europe in 1582. Britain and its colonies followed in 1752, and Greece — the last European holdout — switched in 1923. Today the Gregorian Calendar is used by most countries worldwide.
Frequently Asked Questions
- Does the calculator include the end date?
- By default, results count the days between the two dates (exclusive of the end date). To include it, add 1 to the total.
- What is the difference between US and International date formats?
- US format uses M/D/YYYY (month first), while International format uses D/M/YYYY (day first). The calculator accepts both, plus ISO format (YYYY-MM-DD) from the date picker.
- Does it account for leap years?
- Yes. PHP's
DateTimeclass fully accounts for leap years in all calculations. - Can I calculate working days?
- This calculator counts all calendar days. For working-day calculations, use a dedicated business day calculator.
- What is the maximum date range supported?
- The calculator supports any valid Gregorian calendar date range your browser and PHP can handle — typically from year 1 to year 9999.