StringToolsStringTools

Date Difference Calculator

Calculate days, weeks, months, and years between two dates — or add/subtract days from any date. Perfect for project deadlines, event planning, and contract dates.

Mitul MandankaFounder, Progragon Technolabs · 15+ years building software
Updated June 20266 min read
Start Date
End Date

Result

Pick both dates to see the difference.

TL;DR

This calculator counts the gap exclusively — the start date is day zero, not day one. So 1 January to 10 January is 9 days, not 10. If you need the start day to count too (notice periods, hotel nights, "how many days am I attending"), add 1 for an inclusive total. Months and years are counted by the calendar (15 Jan to 15 Feb is exactly 1 month), not as fixed 30-day blocks. The tool also shows total weeks and total hours, all computed live in your browser.

Inclusive vs exclusive counting (the source of every "off by one" argument)

When two people get a different answer for "how many days between these dates," it is almost always because one counted the start day and the other did not. There are two valid conventions:

  • Exclusive — count the nights between, or the number of midnights crossed. This is what this tool returns and what date arithmetic (subtracting one date from another) gives you.
  • Inclusive — count both endpoints, as if you were counting the days you appear on a calendar. This is exclusive + 1.

Neither is "more correct" — it depends on what you are measuring. A hotel charges per night (exclusive). A festival pass for "Friday through Sunday" covers 3 days (inclusive). The table below shows both side by side.

Start → EndExclusive (this tool)Inclusive (+1)
1 Jan → 1 Jan (same day)0 days1 day
1 Jan → 2 Jan1 day2 days
1 Jan → 10 Jan9 days10 days
1 Jan → 31 Jan30 days31 days
Fri → Sun (festival pass)2 days3 days

Rule of thumb: if the question is "how long until X" or "how many nights," use the exclusive number shown above. If the question is "how many days am I counted as present," add 1.

Calendar days vs business days

This calculator returns calendar days — every day counts, including weekends and public holidays. Many real-world deadlines are stated in business days (also called working days): Monday to Friday only, often minus public holidays.

As a quick conversion, a 7-day calendar week contains 5 business days, so business days run at roughly 5/7 (about 71%)of calendar days over a full week. The catch is that the exact figure depends on which weekday you start on and which holidays fall in the window — there is no clean formula, which is why "within 10 business days" can land anywhere from 12 to 16 calendar days later.

Business days promisedCalendar days (no holidays)Typical real-world span
3 business days3–5 daysup to ~1 week
5 business days7 days1 calendar week
10 business days14 days2 weeks (12–16 with holidays)
20 business days28 daysabout 1 month
~21–22 business days~30–31 daysa typical working month

Worked example: 1 January 2025 (a Wednesday) to 31 January 2025 is 31 calendar days but only 23 business days. To work out a business-day deadline precisely, use the Add / Subtract mode to step forward in calendar days, then skip the weekends and holidays in your window.

How this tool counts months and years

The headline result (for example 1y 2m 5d) uses calendar months, not fixed 30-day blocks. It walks forward by whole years, then whole months, then counts the leftover days — the same way you would say someone is "2 years and 3 months old." A month therefore has a variable length (28 to 31 days):

  • 15 January → 15 February is exactly 1 month (even though that month is only 31 days, or 28 the other way).
  • If the end day-of-month is smaller than the start day-of-month, the tool borrows days from the previous calendar month — so the remaining days are always real days, never a 30-day approximation.
  • The separate Total Months stat is the same calendar-month count expressed as a single number (1 year 2 months = 14 total months).

This matters because the "30 days = 1 month" shortcut drifts badly over time: 12 blocks of 30 days is only 360 days, five days short of a real year. For interest, contracts, and age, the calendar-month method this tool uses is the one that matches legal and everyday usage.

Which counting method each common task needs

The right convention depends entirely on the task. This cheat sheet maps the most common reasons people open a date calculator to the method that gives the answer you actually want.

TaskUseWhy
Notice period (e.g. 30 days' notice)Inclusive, calendar daysMost contracts count the day notice is given
Age in years/months/daysCalendar months (y/m/d result)Matches how age is spoken and recorded
Days until an event / countdownExclusive total days"Days to go" excludes today
Hotel / accommodation costExclusive (= nights)You pay per night, not per date
Project timeline / sprint lengthBusiness daysWork happens on weekdays only
Return / refund windowInclusive, calendar days"Return within 14 days" counts the purchase day
Visa / passport validityInclusive, calendar daysThe expiry day is usually still valid

Questions people ask about date math

Does the calculator include both the start and end date?

No — it counts exclusively. The start date is day zero, so the result is the number of full days from the start to the end. For example, 1 January to 10 January returns 9 days. If you need both endpoints counted (an inclusive total, like counting the days you are present), add 1 to the result.

How many days is "30 days' notice" in real terms?

If notice is given on, say, 1 June and the period is 30 calendar days inclusive of the start day, it runs through 30 June, and you are free from 1 July. Always check the exact wording: some contracts say "clear days" (excluding both the start and end day) or use a full calendar month rather than 30 days. Use the Add / Subtract Days mode to land on the precise end date.

Does it count business days or calendar days?

Calendar days — every day counts, including weekends and holidays. Over a full week, business days are about 5/7 of calendar days, so 10 business days is roughly 14 calendar days (a little more if a public holiday falls in the window). For an exact business-day deadline, step forward in calendar days and skip the weekends and holidays in your range.

Are months counted as 30 days or as real calendar months?

Real calendar months. The years/months/days result steps by whole years, then whole months, then counts leftover days, so 15 January to 15 February is exactly 1 month even though that span is 31 days. This matches how age, contracts, and interest are normally counted — unlike the "30 days = 1 month" shortcut, which loses about five days a year.

How does it handle leap years?

Leap days are handled automatically because the calculation uses real calendar dates, not a fixed 365-day year. A span crossing 29 February will include that extra day in the total. For example, 28 February 2024 to 1 March 2024 is 2 days, because 2024 was a leap year and 29 February sat between them.

Does the order of the two dates matter?

No. The tool always shows the distance between the two dates as a positive number, automatically treating the earlier date as the start. To move forward or backward from a single date instead, switch to the Add / Subtract Days mode.

Related Tools