๐Ÿงฐ UtlKit

How to Calculate the Difference Between Two Dates โ€” Days, Weeks & Business Days

The Basic Idea

The difference between two dates is how far apart they are โ€” in days, weeks, months or years. The raw unit is the day: later date minus earlier date, counted in days. Everything else (weeks, months, business days) is a repackaging of that day count under a convention.

Worked example: 15 March 2026 to 1 December 2026

Count the days month by month from 15 March to 1 December:

  • 15 Mar โ†’ 31 Mar: 16 days
  • April: 30, May: 31, June: 30, July: 31, August: 31, September: 30, October: 31, November: 30 โ†’ 244 days
  • 1 December: +1

Total: 261 days (start date not counted, end date counted โ€” the standard subtraction).

Repackaged: 261 days = 37 weeks and 2 days. In calendar terms: 15 Mar to 1 Nov is 8 months, plus 16 days, so 8 months and 16 days.

Business days (Mondayโ€“Friday only): 261 days from a Sunday spans 185 full-week weekdays plus Monday and Tuesday of the last week โ€” 187 business days.

Days, Weeks, Months, Years โ€” the Conventions

  • Days โ€” simple subtraction. The only "exact" unit, but watch inclusive vs exclusive counting (below).
  • Weeks โ€” days รท 7. 261 days is 37.29 weeks, or 37 weeks 2 days.
  • Months โ€” count calendar months (15 Mar โ†’ 14 Apr is one month). Months have unequal lengths, so a "month" is never a fixed number of days. Some finance contexts use 30-day months; others use actual/actual.
  • Years โ€” 365 days, or 365.25 to account for leap years, or actual days across the range (finance: 360, 365, or 365.25 conventions such as 30/360).

Inclusive vs exclusive counting

"From Sunday to Friday" is 4 days by subtraction (Friday โˆ’ Sunday) but 5 days if you count both endpoints. A hotel stay from the 1st to the 3rd is 2 nights, not 3 days. Always state the convention โ€” in contracts and deadlines, "inclusive of both dates" changes the number by one.

Timezones

A "date" is only meaningful in a timezone. A meeting on 12 June in Tokyo and a deadline on 12 June in New York are different instants, and the day between two dates can shift if you compare "12 June in one zone" with "12 June in another" across a date boundary. Pick one timezone for the whole calculation and stick to it.

Tools That Do It For You

For the day/week/month/weekend breakdown, the Date Difference Calculator takes two dates and returns days, weeks, months, years, business days and the day of week for each date. For a specific case โ€” how old is someone? โ€” the Age Calculator anchors the end date to today and returns the exact age in years, months and days, handling leap days. For developers working in epoch time, the Unix Timestamp Converter gives you seconds: divide the difference by 86,400 to get days. All three run in your browser.

Common Pitfalls

  • Mixing conventions โ€” comparing "30 days" (banking 30/360) with "actual days" gives different answers on the same dates.
  • Forgetting the endpoint โ€” off-by-one errors are the most common date bug in code and contracts alike.
  • Leap years โ€” 2024 had 366 days; ranges crossing February in a leap year are one day longer than the calendar suggests.
  • Timezone drift โ€” converting to UTC first, then counting, avoids the "which day is it really?" argument.

Related Tools

Frequently Asked Questions

How do I calculate the number of days between two dates?

Subtract the earlier date from the later one in days, or count month by month. Example: from 15 March 2026 to 1 December 2026 is 16 days of March plus 244 days of April through November plus 1 December 1 = 261 days. A date calculator does this instantly and also gives weeks, months and business days.

What is the difference between calendar days and business days?

Calendar days count every day, including weekends and holidays. Business days count only Monday through Friday (and in formal usage, exclude public holidays too). For the 261-day example above, the business-day count is 187. Contracts and payment deadlines usually specify which one they mean.

Should I count the first date or the last one?

State it explicitly. "Days between A and B" usually excludes the start date and includes the end (plain subtraction gives that). "Inclusive of both dates" adds one day. A stay from the 1st to the 3rd is 2 nights under the standard convention; a contract that says "inclusive" would count 3. Always write which convention applies.

How do I calculate an exact age?

Take the age in years, months and days from the birth date to today: count full years first, then remaining full months, then leftover days. Example: born 15 March 1990, as of 1 December 2026 is 36 years, 8 months and 16 days. For leap-day birthdays (29 February), most systems celebrate on 28 February in common years and 1 March in leap years; legal treatment varies by jurisdiction.

Related Articles