How many days between January 15 and August 22? How many months and days since your wedding? How long until your lease expires?
Date difference calculations seem simple but months have different lengths, leap years exist, and the results depend on whether you count the start date, end date, or both. Here's how to do it right.
Calculating Days Between Two Dates
The most precise way to express a date difference is in total days. Every day is exactly 24 hours — no ambiguity.
Method: Convert both dates to a day number, then subtract.
Example: January 15, 2026 to August 22, 2026
- January 15 = day 15 of the year
- August 22 = day 234 of the year
- Difference: 234 - 15 = 219 days
When dates span multiple years, add 365 (or 366 for leap years) for each full year crossed.
Calculating Months and Days
Breaking the difference into months and days is more intuitive but less precise — because months have different lengths.
Step 1: Count complete calendar months between the dates.
Step 2: Count remaining days in the partial month.
Example: March 10 to July 25
- Complete months: April, May, June, July = 4 months... wait
- Actually: March 10 to July 10 = 4 complete months
- Remaining: July 10 to July 25 = 15 days
- Result: 4 months and 15 days
Inclusive vs. Exclusive Counting
Should you count the start date? The end date? Both?
From January 1 to January 3:
- Exclusive (neither counted): 2 days
- Inclusive of end only: 3 days (Jan 1, 2, 3)
- Inclusive of both: technically 3 days between them
Most date calculators use exclusive counting — not counting either endpoint. Legal and financial contexts sometimes specify inclusive counting. When precision matters, clarify which method applies.
Leap Year Considerations
February 29 only exists in leap years. When calculating across February in different years:
- February 2024 has 29 days (leap year)
- February 2025 has 28 days (not a leap year)
- February 2026 has 28 days (not a leap year)
This matters for annual calculations. One year from February 15, 2024 to February 15, 2025 = 365 days. One year from February 15, 2023 to February 15, 2024 = 366 days (crosses the leap year).
Common Date Difference Use Cases
- Contract duration: Start date to end date in days or months
- Age calculation: Birthdate to today
- Deadline tracking: Today to due date
- Anniversaries: Original date to today in years and days
- Payment terms: Invoice date to payment due date
- Project timelines: Start to completion in working days
Calculate the exact difference between any two dates with our Date Difference Calculator.
Common Questions
Frequently Asked Questions
Calculators Mentioned in This Article
Related Articles
Age Difference Between Two People: How to Calculate It Accurately
Date Difference in Business Days vs. Calendar Days: What's the Difference?
How Long Ago Was It? Calculating Time Elapsed Since Any Past Date
Get calculator tips
Weekly guides. No spam. Free forever.
You're in! Check your inbox.