Skip to content

Date Difference Calculator

Count the days, weeks, months, and years between two calendar dates.

The Date Difference Calculator counts the exact span between two dates, giving the total in days along with a breakdown in years, months, and days. It is the tool for contract terms, notice periods, project timelines, rental and lease durations, warranty windows, visa stays, pregnancy tracking, and any anniversary or countdown. Counting days by hand is error-prone because month lengths vary and leap days appear irregularly, and off-by-one mistakes are easy when it is unclear whether the start or end date should be included. This page sets out exactly what the tool counts, why the year-month-day breakdown can look unintuitive, how to adapt the result for inclusive counting used in many legal and commercial contexts, common pitfalls when checking a date span by hand, and the practical situations where getting this number exactly right actually matters.

Something looks wrong? Report an issue with this calculator

How to use this calculator

  1. Enter the start and end dates in either order.
  2. Choose whether to include the end date — 'count both endpoints' is what most people want for vacation or rental lengths.

How it works

The standard count measures midnight-to-midnight boundaries: from Monday to Tuesday is 1 day. Adding 1 gives the inclusive count used for 'how many nights and days does my trip span'.

The calendar span decomposes the interval into whole years, months, and leftover days — the same convention the age calculator uses.

Leap days are simply days; February 29 counts like any other date.

Worked example

From January 1, 2026 to March 1, 2026.

  1. 1January has 31 days, February 2026 has 28
  2. 231 + 28 = 59 (standard count)
  3. 3Inclusive count = 60

59 days between, or 60 days counting both dates.

Inclusive versus exclusive counting

By default the result counts the elapsed days between the two dates, so 1 March to 3 March is two days. Many legal, hotel, and payroll contexts count inclusively, treating that same span as three days because both endpoints are occupied.

If your context is inclusive, add one to the result. Check the wording of the contract or policy: phrases like "within 30 days" and "for 30 days" often imply different counting conventions, and a hotel booking of "3 nights" is a different span again from "3 days" because a night is counted between two dates rather than on either one.

This distinction is the single most common source of disputed date calculations. When a figure needs to withstand scrutiny — a penalty clause, a refund window, a rent-free period — state explicitly whether both dates are included rather than relying on the reader to infer the convention.

Why the year-month-day breakdown can look odd

Months are not a constant length, so a breakdown of "one month and two days" represents a different number of days depending on which month is involved. The tool anchors months to calendar positions rather than averaging, which matches how people and contracts describe durations, but it means the same total day count can produce different-looking breakdowns depending on the starting date.

When you need a strictly comparable figure — for interest accrual or scientific work — use the total day count rather than the year-month-day breakdown, since the breakdown is designed for readability rather than for arithmetic comparison between two different spans.

Calendar edge cases

Leap years fall inside a span whenever the range crosses a 29 February, adding one extra day to the total that would not exist in a naive 365-day-per-year estimate. Spans that begin or end on the last day of a month are also a common source of confusion, since "one month later" from 31 January is not a fixed calendar date in the way it is from, say, 10 January.

Time zones and daylight saving transitions do not affect a pure calendar-date difference, because the calculation works in whole days rather than hours. This is different from calculating an exact duration in hours between two timestamps, where a daylight saving change adds or removes an hour from that particular day.

Common mistakes when counting manually

The most frequent manual error is subtracting the day-of-month and month-of-year separately and forgetting to borrow from the year and month totals when the subtraction goes negative — for example computing the difference between 28 February and 3 March as "zero months and negative twenty-five days" instead of correctly borrowing across the month boundary.

A second common mistake is double-counting or under-counting the endpoints. If you manually list every date in a range and count entries, you naturally get an inclusive count; if you subtract the serial date numbers, you get an exclusive count. Confusing which method you used against which convention the situation requires is the root of most disputed calculations.

Practical uses

Common applications include calculating notice periods, tracking the days remaining on a warranty or visa, measuring project duration for reporting, checking eligibility windows, and counting down to an event such as a wedding, a delivery date, or a contract renewal.

For working-day spans that skip weekends, use the business days calculator instead, which applies a different counting rule and typically produces a noticeably smaller number than the calendar-day span for the same two dates.

Glossary of terms used here

Elapsed days refers to the number of full days that have passed between two dates, treating the start date as day zero. Inclusive count adds one to that figure to count both the start and end date as occupied days, which is the convention used in most rental agreements and many statutory notice periods.

A leap day is the extra 29 February inserted in leap years to keep the calendar aligned with the solar year; a span either does or does not contain one depending on the exact dates chosen, and this is handled automatically rather than requiring any manual adjustment on your part.

Weeks, months, and the units people actually mean

Days are unambiguous. Weeks are simply days divided by seven. Months are not fixed, so a difference expressed in months depends on which calendar months the span crosses.

This is why a gap of 30 days can be described as one month in February and slightly under a month in July. The calculator reports whole calendar months plus leftover days, which is the convention most contracts use.

When precision matters — interest, penalties, notice periods — use the day count rather than the month count.

Time zones, midnight, and daylight saving

Dates are counted here as whole calendar days in a fixed frame, so a clock change never adds or removes a day from the result.

If the two dates sit in different time zones, decide which zone the deadline is defined in before counting. A contract that expires at midnight in one city may already have expired in another.

For travel and shipping, the local calendar date at the destination is what matters, and crossing the date line can shift it by a full day.

Contract and notice-period counting

Many agreements say 'within 30 days of receipt', which normally excludes the day of receipt and includes the final day. Others count clear days, excluding both ends.

Where a deadline falls on a weekend or holiday, most rules move it to the next working day — but not all, so check the wording.

Read the definition before counting, then use the day figure here to confirm the exact date rather than estimating from a calendar.

Common mistakes

Off-by-one errors from mixing inclusive and exclusive counting. Deciding the convention first removes almost all of them.

Assuming 30-day months when estimating mentally, which drifts by five days across a year.

Forgetting leap days in spans that cross the end of February in a leap year.

Practical applications

Project planning, invoice terms, visa durations, warranty windows, rental notice, and medical follow-up intervals all depend on an exact day count.

Historical and genealogical work uses it to reconcile records, and event planning uses it for countdowns.

In payroll, the day count decides pro-rata pay for a partial period.

Verification

Check a short span by counting on a calendar. Check a long one by confirming the number of whole years, then adding the remaining days.

A useful cross-check: any span of exactly 52 weeks is 364 days, one short of a common year.

If the result surprises you, confirm the year fields — a mistyped year is far more common than a calculation error.

Inclusive and exclusive counting

Counting the days between two dates can include one endpoint, both, or neither, and the three conventions differ by up to two days.

Hire agreements and hotel stays usually count nights, which is the exclusive count, while notice periods often count both endpoints.

Stating the convention alongside the number avoids most disputes, since the arithmetic itself is rarely what people disagree about.

When a contract specifies clear days, both the first and last day are normally excluded from the count.

Time zones and daylight saving

A difference measured across time zones depends on which zone each date is expressed in, and can differ by a day at the boundaries.

Daylight saving transitions make some local days twenty-three or twenty-five hours long, so a difference in hours is not always a whole multiple of twenty-four.

Storing timestamps in UTC and converting only for display prevents almost all of these errors in software.

For purely calendar questions, ignore time of day entirely and compare dates, which is what most legal deadlines intend.

When this calculator is useful

  • Countdowns to events
  • Rental and booking lengths
  • Project durations
  • Contract notice periods

Frequently asked questions

Is the end date counted?

By default no — that matches how most date arithmetic works. Switch the toggle to 'Yes' to include both endpoints.

Does the order of dates matter?

No. The calculator always reports the absolute difference.

Does the result include both the start and end dates?

No, it counts elapsed days between them. Add one if your context counts both endpoints, as many legal and booking rules do.

Are leap years handled?

Yes. Any 29 February inside the span is counted, using the divisible-by-four rule with the century exception.

Can I use dates in the past?

Yes. Order does not matter; the tool reports the magnitude of the span between the two dates.

Why doesn't years times 365 match the day total?

Leap days add roughly one extra day every four years, so simple multiplication undercounts longer spans.

Does it exclude weekends or holidays?

No. Every calendar day is counted. Use the business days calculator for a working-day count.

Are my dates stored anywhere?

No. The calculation runs entirely in your browser.

How do I convert the result into weeks?

Divide the total day count by seven. Pregnancy tracking and infant milestones commonly use this conversion since weeks are the standard unit in those contexts.

Why do two calculators give me different totals for the same two dates?

They are almost always using different counting conventions — one inclusive and one exclusive — rather than making an arithmetic error. Check whether one day has been added to account for both endpoints.

Can I use this for a span that crosses a leap year boundary correctly?

Yes, the calculation checks every year the span passes through and correctly adds a day for each 29 February it contains, so multi-year spans remain accurate.

How are months counted when the lengths differ?

Whole calendar months are counted first, then the remaining days are reported separately.

Do leap years affect the result?

Yes. A span crossing 29 February includes that extra day automatically.

Does daylight saving change the day count?

No. Dates are counted as whole calendar days, so clock changes have no effect.

How do I count a notice period correctly?

Check whether the agreement counts clear days or calendar days, then apply that convention to the day figure shown.

Should I include both dates in the count?

It depends on the convention; nights exclude one endpoint, while notice periods often include both. State which you used.

Does daylight saving affect the count?

It can when measuring hours, since some local days are twenty-three or twenty-five hours long.

Last reviewed 2026-08-01. Formulas and assumptions are stated above; results are estimates for information and education. Report an error.