CalcPad

Date Difference Calculator

Calculate the number of days, weeks, months, and years between two dates.

The starting year.

The starting month (1-12).

The starting day of the month.

The ending year.

The ending month (1-12).

The ending day of the month.

How to Calculate Days Between Two Dates

This calculator finds the exact difference between any two dates. It handles leap years, varying month lengths, and dates spanning centuries. The result is shown both as a total (days, weeks, months) and as a breakdown (X years, Y months, Z days).

The order of dates doesn't matter — the calculator always shows the absolute difference.

Common Date Calculations

People frequently need to calculate date differences for:

  • Project deadlines: How many working days until a due date.
  • Age verification: Exact age in years, months, and days.
  • Pregnancy tracking: Days since conception or until due date.
  • Lease and contract terms: Exact duration of rental or employment periods.
  • Event countdown: Days until a wedding, vacation, or graduation.
  • Historical research: Time elapsed between historical events.

Leap Years and Calendar Quirks

A year has 365 days — except leap years, which have 366. Leap years occur every 4 years, except for century years (1900, 2100) which are not leap years, unless divisible by 400 (2000 is a leap year). This is why precise date math is tricky to do by hand.

Month lengths also vary: 28-31 days. February has 28 days (29 in leap years). April, June, September, and November have 30. All others have 31.

Frequently Asked Questions

Does this calculator account for leap years?
Yes. The calculator uses JavaScript's built-in Date object, which correctly handles leap years, including the century-year exceptions. February 29 is properly counted in leap years.
How is the "months" difference calculated?
Months are calculated as calendar months. For example, January 15 to March 15 is exactly 2 months, regardless of whether February has 28 or 29 days. The remaining days after full months are shown separately.
Can I calculate business days (excluding weekends)?
This calculator shows total calendar days. To estimate business days, you can multiply the number of weeks by 5, then add any remaining weekdays. For example, 30 calendar days is roughly 4 weeks and 2 days, so about 22 business days.

Related Calculators