Date Difference Calculator
Count the exact number of days, weeks, months and years between any two dates.
Last updated: October 18, 2026
How this calculator works
This calculator measures the exact span between two dates using Gregorian calendar arithmetic. Days are counted as full 24-hour periods. Months and years follow calendar anniversaries rather than fixed day counts, so February, leap years, and 30 or 31 day months are all handled exactly. Business-day counts exclude Saturdays and Sundays. All math runs in your browser using JavaScript Date objects.
Which count do you actually need
There are two correct answers to "how many days between these dates", and which one you want depends on what you are measuring. For week counts, try the weeks between dates calculator.
Elapsed days is the default here. It measures the gap, so 1 January to 10 January is 9 days. Use it for age, for deadlines counted from a start date, and for anything where you are asking how much time has passed.
Inclusive days counts both endpoints, giving 10 for the same pair. Use it when you are counting occupied dates: nights on a booking, days of a festival, or a rental period where both the first and last day are charged.
Legal and rental documents are often ambiguous about this. If the wording is "for a period of 10 days beginning 1 January", that is the inclusive count and the period ends on the 10th. If it says "within 10 days of 1 January", that is elapsed and the deadline is the 11th.
Why months and days are counted separately
The year, month and day breakdown is not a conversion of the total. It walks the calendar month by month, which is why 31 January to 28 February reads as 28 days rather than 1 month. A full month would require reaching 31 February, which does not exist.
This matters for notice periods. Three months notice given on 30 November ends on 28 February in a normal year and 29 February in a leap year, not on a fixed day count. If a document specifies 90 days rather than 3 months, the two land on different dates.
How to Calculate Date Difference
The most reliable way to count days between two dates is to walk through the calendar one month at a time, rather than multiplying years by 365. A calendar walk accounts for months of different lengths and for leap years automatically.
Step-by-step method
- Choose a start date and end date. Either date can be in the past or the future.
- Decide whether you want elapsed days or inclusive days. Elapsed days count how many days have passed between the two dates. Inclusive days count the start date and end date both (useful for event planning, where both the first and last day count).
- Subtract using calendar months. Count complete years, then complete months, then remaining days. This gives you a breakdown like "2 years, 3 months, 5 days" rather than just a raw number.
- Verify leap years. February has 28 days in most years and 29 days in a leap year. Any span that crosses a February in a leap year needs to account for the extra day.
Our calculator does all of this automatically. Enter your two dates, check or uncheck the "Include end date" box, and the result appears instantly.
When to use this calculator
- Project deadlines: Find out how many working days remain before a submission or delivery date.
- Age and eligibility checks: Confirm that a minimum age or waiting period has passed. This matters for driving licences, passport renewals, and insurance waiting periods.
- Lease and rental periods: A landlord or tenant can confirm the exact number of days in a tenancy to calculate a daily rent rate for partial months.
- Medical and prescription tracking: Count how many days remain in a course of medication or how long it has been since a procedure.
- Loan and interest calculations: Many loans charge interest on an exact day count. Knowing the precise number of days between disbursement and repayment gives you the accurate interest figure.
- Event planning: Count down to a wedding, birthday, reunion, or other milestone. Watch a future date approach with the countdown timer. Use the inclusive option so both the first and last day are included in your total. For year-focused spans with anniversaries, the years between dates calculator is more specific.
Calendar days versus business days
This calculator counts calendar days, which includes weekends and public holidays. If you need to know only weekdays (Monday to Friday), use the Business Days Calculator instead. For most planning purposes, calendar days are what you need.
The inclusive day rule
Whether to count inclusively depends on the question you are answering. If you want to know how many days have passed since a date, use elapsed counting (the default). If you want to know how many days a period covers, use inclusive counting. For example, a five-day event from Monday to Friday has five inclusive days but only four elapsed days between Monday and Friday.
How to use this date difference calculator
A good date difference calculator does more than subtract two numbers — it walks the real calendar, month by month. When you use this free date difference calculator, you get elapsed days, inclusive days, and a full years-months-days breakdown in one click. That makes this date difference calculator ideal for contracts, tenancies, and project plans where every day counts. Unlike rough estimates, a precise date difference calculator never miscounts February, so trust this date difference calculator for deadline-critical work. Counting back from today? The days ago calculator skips the second date.
For legal and financial questions, always confirm whether you need elapsed or inclusive counting — the two answers differ by exactly one day. This date difference calculator defaults to elapsed days, the standard for age and waiting periods. If your span crosses February in a leap year, the extra day is counted automatically, which is why a calendar-aware date difference calculator beats manual math. Bookmark this date difference calculator for HR, payroll, and rental calculations.
Whether you're planning a wedding, auditing a service history, or settling a warranty claim, an accurate date difference calculator removes all doubt. Enter any two dates — past or future — and this date difference calculator returns the exact span in seconds. Keep this date difference calculator handy; you'll use it more than you expect.
A date difference calculator answers one of the most common date questions there is: how many days are between two dates? Whether you are planning a project, counting down to a trip, or checking a contract term, this free tool gives you the exact gap in days, weeks, months, and years in a single click. No spreadsheet needed, no manual counting, and no off-by-one mistakes. Enter your two dates and the answer appears instantly.
How the Date Difference Calculator Works
Using the calculator takes less than ten seconds. You only need two dates, and the tool does the rest.
- Enter the start date. Pick any date from the calendar picker, or type it directly in a format like January 15, 2026 or 2026-01-15. This can be a date in the past or the future.
- Enter the end date. This is the second date you want to compare against. It also works for past or future dates, and it can come before the start date if you want to measure backwards in time.
- Read your results. The calculator shows the difference as total days, then breaks it down further into weeks, months, and years so you can see the answer in the unit that makes most sense to you. It also shows the day of the week for each date you entered.
The results are precise because the calculator uses real calendar rules. Leap years, months with different lengths, and February 29 are all handled automatically. This is the main reason a purpose-built tool beats counting on your fingers or guessing from a wall calendar.
What Counts as a Day Between Two Dates?
The most common point of confusion with any date difference calculation is whether the start and end dates themselves get counted. Verify either endpoint's weekday with the day of week calculator. Most calculators, including this one, use exclusive counting. That means the answer is the number of full days you would need to move forward from the start date to reach the end date.
Here is a clear example. From October 1 to October 3 is a difference of 2 days. You move from the 1st to the 2nd (one day), then from the 2nd to the 3rd (a second day). That is the standard answer.
Inclusive counting is the other method. It counts both endpoints. October 1, October 2, and October 3 make 3 days by that method. Some people expect this version when they count hotel nights or event days, since the 1st and the 3rd both feel like days you are "on." If you ever need the inclusive count, just add 1 to the calculator result. Knowing which method you want before you start saves a lot of confusion later.
A related question is what counts as the start of a day. Date difference tools work at whole-day resolution. The time of day is ignored, so 9 AM on Monday to 6 PM on Tuesday still counts as 1 day of difference, the same as midnight to midnight. If you need hours and minutes, a countdown timer is the better tool.
How to Calculate Days Between Two Dates by Hand
You can find the number of days between two dates without any tool. It takes a little care, but the method is simple once you see it.
- Count the remaining days in the start month. Subtract the start day from the number of days in that month. This gives you the days from the start date up to the end of the month.
- Add the full months in between. For each whole month between the start and end dates, add its total days. Remember that February has 28 days, or 29 in a leap year.
- Add the days in the end month. Take the day-of-month of your end date and add it.
- Check leap years. If February 29 falls anywhere inside your range, your total includes one extra day. A leap year is any year divisible by 4, except century years, which must be divisible by 400. So 2024 was a leap year, but 2100 will not be.
Here is a worked example. How many days are between March 10, 2025 and June 25, 2025?
| Step | Calculation | Days |
|---|---|---|
| Remaining days in March | 31 minus 10 | 21 |
| Full month of April | 30 | 30 |
| Full month of May | 31 | 31 |
| Days in June | 25 | 25 |
| Total | 21 + 30 + 31 + 25 | 107 |
The answer is 107 days. That is also 15 weeks and 2 days. The hand method works well for short ranges. For ranges spanning years, or when leap years get involved, the calculator above is faster and far less error prone.
One more hand example, this time crossing a leap day. How many days are between February 27, 2024 and March 2, 2024? February 2024 had 29 days because 2024 was a leap year. From the 27th to the 28th is one day, to the 29th is two, to March 1st is three, and to March 2nd is four. The answer is 4 days. Run the same pair of dates in 2023, a non-leap year, and you get 3 days, since February 29 never appears. This single-day swing is the classic trap in manual date math, and it is exactly why people double check February ranges with a calculator.
Date Difference in Excel and Google Sheets
Spreadsheets make this easy once you know the right formula. Both Excel and Google Sheets treat dates as serial numbers, so subtracting one date from another gives the number of days between them.
The simplest approach is plain subtraction. If your start date is in cell A1 and your end date is in cell B1, enter this formula:
=B1-A1
Then format the result cell as a plain number, not a date. For January 1, 2025 in A1 and December 31, 2025 in B1, this returns 364, which is the number of days between those two dates in a non-leap year.
The DATEDIF function gives you more control over the unit of the answer. Its structure is DATEDIF(start_date, end_date, unit), and the unit can be "D" for days, "M" for full months, or "Y" for full years. Some examples:
- =DATEDIF("2025-01-01","2025-12-31","D") returns 364, the total days.
- =DATEDIF("2025-01-01","2025-12-31","M") returns 11, the number of complete months.
- =DATEDIF("2020-06-15","2026-06-15","Y") returns 6, the number of complete years.
There is one quirk worth knowing. DATEDIF is an undocumented function in Excel, which means it does not appear in the formula autocomplete, but it works fine when you type it. In Google Sheets it is fully supported. Either way, quote your dates in YYYY-MM-DD format or reference cells that hold dates.
Common Uses
A date difference calculator turns up in more situations than most people expect. Here are the ones that come up most often. Age is the most common date difference; the age calculator answers it instantly. For the gap between two birthdays, use the age difference calculator.
Project planning. Managers break timelines into phases and need exact durations. Knowing that a phase runs 107 days instead of "about three months" changes staffing and deadline math.
Age gaps. Parents like to know the exact gap between siblings, or between themselves and their children. The months and years breakdown is the part people usually want here.
Pregnancy due dates. Doctors count gestational age in weeks from the first day of the last period. A calculator that converts a date range into weeks gives the same number a clinic would quote.
Contract durations. Leases, warranties, and service agreements are measured in days or months. An exact count removes arguments about when a term started or ended.
Travel countdowns. This is the fun one. People checking "how many days until my vacation" want the number fast, and they often recheck it daily. Bookmarking the calculator makes that a one-click habit.
Business day counts. If your question is specifically about working days, with weekends and holidays removed, use a dedicated business days calculator instead. The general date difference tool counts every calendar day.
How the calculation works
The calculator finds the total day count by converting both dates to milliseconds since the Unix epoch (January 1, 1970) and dividing the difference by 86,400,000, the number of milliseconds in a day:
total days = (end date minus start date) in milliseconds / 86,400,000
The months and days breakdown counts full calendar months first, then remaining days, which is more meaningful than dividing total days by 30. Both dates are anchored at local midnight so no phantom gap appears from timezone offsets.
Worked example
From March 1, 2026 to April 15, 2026:
- Total days: 45
- Weeks: 6 weeks and 3 days
- Calendar breakdown: 1 month and 14 days
- Business days: 33 (excluding weekends)
Notice how 45 days is not "1.5 months." Calendar months have real lengths, so the calendar breakdown (1 month, 14 days) tells you more than any division would.
Frequently Asked Questions
Related Calculators
If this tool was useful, you may also like the years between dates calculator for year-level comparisons, the months between dates calculator when you need month precision, or the days ago calculator to measure back from today. For working-day counts that skip weekends, try the business days calculator, and for personal milestones the age calculator breaks any birth date into exact years, months, and days.