What is a Date Difference Calculator?
The date difference calculator computes the number of days, weeks, or months between two dates — used for contract terms, work days, and interest accrual periods.
How it's calculated
The basic calculation is end date minus start date. Whether the start date is included changes the result by one day.
Inclusive vs. exclusive date counting
Legal and financial contexts often distinguish whether the starting day counts. Many legal systems default to excluding the start date — for example, 'within 7 days of the contract date' would typically exclude the signing day itself and start counting the next day. Conventions vary significantly by jurisdiction and by the specific wording used ('from' vs. 'starting'), so it is worth checking the applicable rule for contracts, interest calculations, and deadlines.
Good to know
- January 1 to January 3 spans 3 calendar days, but the date difference is only 2 — the source of confusion around trip-length phrases like '2 nights, 3 days.'
- Leap year rules have three layers: divisible by 4 is a leap year, but divisible by 100 is not, unless it is also divisible by 400.
- That rule keeps the calendar drift to roughly 1 day per 3,000 years. The older Julian calendar drifted about 1 day every 128 years, which is why the 1582 switch to the Gregorian calendar required skipping 10 days entirely — October 4 was followed directly by October 15.
- Interest calculations use different day-count conventions — actual calendar days versus a simplified 30-day month — which can meaningfully change the interest owed, an important detail in bond markets.
- The same weekday falls exactly 7 days later, but the same calendar date one year later shifts by one weekday (two in a leap year), since 365 divided by 7 leaves a remainder of 1.
Common date-counting scenarios
| Situation | How it's counted |
|---|---|
| Trip length ("2 nights, 3 days") | Both start and end dates included (date difference + 1) |
| Contract deadlines ("within 7 days of signing") | Often excludes the start date, counting begins the next day |
| Days worked | Counts each actual attendance date directly |
| Interest accrual period | Either actual elapsed days or a flat 30-day month, depending on the agreement |
Frequently asked questions
Q. Should I include the start date?
It depends on the context. Many legal date calculations exclude the start date, while trip lengths or work days typically include it.
Q. How are months calculated?
Since months vary in length, exact division does not work cleanly. Typically, one month is counted as the interval until the same date recurs.
Q. How do I identify a leap year?
Divisible by 4 is a leap year, except centuries (divisible by 100) are not, unless also divisible by 400.