π
Daily Life
π
π
Days Between Dates Calculator: How to Count Date Differences
Learn how to calculate the number of days between two dates. Covers the formula, leap year handling, business days vs calendar days, and practical examples.
⏱️ 7 min read🦉 365tool.net🌍 For everyone worldwide
Counting the number of days between two dates is one of the most practical date calculations in everyday life β project deadlines, contract durations, payment due dates, age calculations, and event planning all depend on it. The calculation seems simple but has subtle complications around leap years and month lengths that trip people up.
The Julian Day Number Method
The most reliable way to calculate days between any two dates is to convert both to a running day count (Julian Day Number) and subtract. While the full Julian Day formula is complex, a simplified version works for modern dates:
For any date (Year Y, Month M, Day D) after March 1, 1900:
- If M β€ 2: set Y = Y β 1 and M = M + 12
- A = floor(Y / 100)
- B = 2 β A + floor(A / 4)
- JDN = floor(365.25 Γ (Y + 4716)) + floor(30.6001 Γ (M + 1)) + D + B β 1524.5
- Days between = JDN2 β JDN1
In practice, you'll use a calculator for this. But understanding the underlying logic helps you verify results.
The Practical Subtraction Method
For dates within the same year, you can count days using the "day of year" approach:
Days between = Day-of-year (end date) β Day-of-year (start date)
Day of year reference (non-leap year)
| Month |
Days in month |
Day range |
First day of month = Day # |
| January | 31 | 1β31 | 1 |
| February | 28 (29 leap) | 32β59 | 32 |
| March | 31 | 60β90 | 60 |
| April | 30 | 91β120 | 91 |
| May | 31 | 121β151 | 121 |
| June | 30 | 152β181 | 152 |
| July | 31 | 182β212 | 182 |
| August | 31 | 213β243 | 213 |
| September | 30 | 244β273 | 244 |
| October | 31 | 274β304 | 274 |
| November | 30 | 305β334 | 305 |
| December | 31 | 335β365 | 335 |
Same-year example
March 15 to November 28 (non-leap year):
- March 15 = day 60 + 14 = day 74
- November 28 = day 305 + 27 = day 332
- Days between: 332 β 74 = 258 days
Cross-year example
October 10, 2025 to March 5, 2026:
- Days remaining in 2025 (from Oct 10): 365 β (274 + 9) = 365 β 283 = 82 days
- Days in 2026 to March 5: 60 + 4 = 64 days (March 5 = day 64)
- Total: 82 + 64 = 146 days
Calendar Days vs. Business Days
Calendar days count every day including weekends and holidays. Business days (working days) count only MondayβFriday, excluding public holidays.
Rough conversion: Business days β Calendar days Γ (5/7) = Calendar days Γ 0.714
Example: 30 calendar days β 21β22 business days (depending on how many weekends fall within the period).
For legal and financial contracts, "days" almost always means calendar days unless explicitly stated as "business days" or "working days."
Common Date Difference Use Cases
- Loan terms: Interest accrues on calendar days. A 30-day loan from Feb 1 matures on March 2 (or March 3 in a leap year).
- Project deadlines: Determining if a project started Jan 15 with a 90-day timeline ends on April 15 (exactly 90 calendar days).
- Age calculation: How many days since a specific birth date β the foundation of precise age-in-days calculations.
- Historical research: How many days between a historical event and today, or between two historical events.
- Pregnancy: Pregnancy duration is tracked as 280 days (40 weeks) from the last menstrual period.
❓ Frequently Asked Questions
How do I calculate the number of days between two dates?▼
For dates in the same year: convert both to day-of-year numbers and subtract. March 15 = day 74, November 28 = day 332, difference = 258 days. For cross-year calculations: count remaining days in the first year, then add days elapsed in the second year. Online calculators handle leap years and month lengths automatically.
What is the difference between calendar days and business days?▼
Calendar days count every day including weekends and public holidays. Business days count only MondayβFriday, excluding holidays. There are roughly 5/7 as many business days as calendar days (about 71%). Legal and financial documents typically mean calendar days unless they specify "business days" or "working days."
How do leap years affect date calculations?▼
Leap years add one extra day (February 29) to the year, making them 366 days instead of 365. Any date calculation crossing February of a leap year must account for this extra day. A year is a leap year if divisible by 4, except century years which must be divisible by 400. 2024 and 2028 are leap years; 1900 and 2100 are not.
How many days are in each month?▼
31 days: January, March, May, July, August, October, December. 30 days: April, June, September, November. 28 days (29 in leap years): February. A useful mnemonic: make a fist and count knuckles (high = 31 days) and valleys (low = 30 or 28), starting with January on the first knuckle and July on the last.
How do I calculate days remaining until a future date?▼
Find today's day-of-year number, find the target date's day-of-year number, and subtract. If the target date is in a future year, add the remaining days of the current year (365 minus today's day number) plus the day number of the target date in its year. July 4 is day 185 of 2026; September 22 is day 265 β difference is 80 days.