Date DifferenceFree online date & time calculator — instant results, no sign-up

Count the days, weeks and months between two dates.

Inputs

Days
30
Weeks4.29
Months (approx.)0.99
Years (approx.)0.082
DirectionEnd date is after start date

Sign in to save results and favorites.

About the Date Difference

The Date Difference calculator counts the elapsed calendar days between a start date and an end date, then expresses that interval in weeks and approximate months and years. It also identifies whether the end date is before, after, or the same as the start date. With the default dates, 2026-10-23 and 2026-11-22, the interval is 30 days.

Start date
The calendar date from which the interval is measured, entered in YYYY-MM-DD format, with a default of 2026-10-23.
End date
The calendar date to which the interval is measured, entered in YYYY-MM-DD format, with a default of 2026-11-22.

Formula and method

Δ = ordinal(E) − ordinal(S); D = |Δ|; W = D / 7; M ≈ D / (365.25 / 12); Y ≈ D / 365.25. Direction is determined by the sign of Δ: positive means after, negative means before, and zero means the same date.
  • SStart date.
  • EEnd date.
  • ordinal(d)The integer day number of calendar date d, using a consistent calendar-day reference.
  • ΔSigned difference in calendar days between the end and start dates.
  • DNonnegative elapsed interval in days.
  • WElapsed interval in weeks, using seven days per week.
  • MApproximate elapsed interval in months, using 30.4375 days per month.
  • YApproximate elapsed interval in years, using 365.25 days per year.

Convert both dates to calendar-day numbers and subtract the start value from the end value. Use the absolute difference for the interval and retain the sign for the direction. Divide the day count by seven for weeks and by average month and year lengths for the approximate conversions. For 2026-10-23 to 2026-11-22, the day difference is 30; rounding weeks and months to two decimal places and years to three gives 4.29 weeks, 0.99 months, and 0.082 years.

Worked example

These are the calculator's starting values and the results it actually produces for them.

Inputs

  • Start date1970-01-01
  • End date1970-01-31

Results

  • Days30
  • Weeks4.29
  • Months (approx.)0.99
  • Years (approx.)0.082
  • DirectionEnd date is after start date

How to use the Date Difference

  1. 1Enter the Start date, or keep the default 2026-10-23.
  2. 2Enter the End date, or keep the default 2026-11-22.
  3. 3Read Days for the elapsed calendar-day count and Direction for the order of the dates.
  4. 4Read Weeks for the day count expressed in seven-day units.
  5. 5Use Months (approx.) and Years (approx.) as average-length conversions rather than counts of complete calendar months or years.

Reading your result

For the default inputs, Days = 30 means 30 calendar days elapse from 2026-10-23 to 2026-11-22, without counting both endpoints inclusively. Weeks = 4.29 expresses the same interval in weeks, not four weeks and 29 days. Months (approx.) = 0.99 expresses the interval using an average month length, not an exact calendar-month count. Years (approx.) = 0.082 expresses the interval using an average year length. Direction = End date is after start date indicates that the interval runs forward in the calendar.

Limitations

This is a date-only calculation, not a measurement of hours or seconds; time of day, time zones, and daylight-saving changes are outside its scope. Days include weekends and holidays, so the result is not a business-day count. Both endpoints are not counted inclusively. Calendar months and years vary in length; the approximate conversions use fixed averages of 30.4375 and 365.25 days, respectively. These averages are consistent with the supplied rounded example, but that example alone cannot uniquely establish the implementation's conversion constants.

Common questions

Why do the default dates produce 30 days rather than an inclusive count?+

The calculator measures elapsed days by subtracting the start date from the end date. For 2026-10-23 to 2026-11-22, that difference is 30 days; it does not add an extra day to count both dates.

Why does the default interval show 0.99 months instead of one month?+

Months (approx.) divides the 30-day interval by an average month length rather than counting calendar-month boundaries. Using 30.4375 days per month gives 0.99 after rounding.

What happens if the end date is earlier than the start date?+

The interval describes the size of the gap, while Direction indicates that the end date is before the start date. If the dates are identical, the interval is zero and the direction indicates the same date.

Does Days exclude weekends or holidays?+

No. Days counts every elapsed calendar day. Use a business-day calculator if you need to exclude weekends or a particular holiday calendar.

Does the calculator save my information?+

Calculations run in your browser. While signed in, inputs and results are automatically recorded in account history; saving a result creates a separate saved record.

Further reading

You might also like

Results are estimates for informational purposes and are not financial, medical or legal advice.