Date Difference Calculator – Days Between Two Dates Calculator
Calculate the number of days, weeks, months and years between two dates with a step-by-step breakdown: calendar days, years - months - days, weekdays, weekend days and business days.
The calculator above counts the days between two dates, then breaks the result down into years, months, days, weeks, weekdays, weekend days and business days. Tick Include end date to count both endpoints, and tick Exclude weekends to get business days. Press Example to load Example 1 below.
📅 What is date difference calculation?
Calculating the number of days between two dates is a fundamental yet highly useful operation in daily life. It is the process of determining the time span (in days, weeks, months or years) between two specific dates.
This tool helps you:
- ✅ Calculate days remaining until an important event
- ✅ Determine working time for a project
- ✅ Calculate exact age in days
- ✅ Manage contract and warranty periods
- ✅ Plan travel and vacation time
📐 Date calculation formulas
Basic formula
Number every day with a continuous sequence that grows by exactly 1 each day. In astronomy and programming this sequence is the Julian Day Number (JDN). Let J₁ and J₂ be the JDN of the start date and the end date:
For example, the JDN of 01/01/2024 is 2,460,311 and that of 12/31/2024 is 2,460,676. The difference is 365; counting both ends gives 366 days. Leap years are already built into the sequence, so there is no need to add up months by hand.
In Excel/Google Sheets
Method 1: Simple subtraction
=B2 - A2Where A2 is the start date and B2 is the end date. Spreadsheets store dates as serial numbers, so this subtraction is exactly J₂ − J₁.
Method 2: DAYS function
=DAYS(B2, A2)This function returns exactly B2 − A2, so only one of the two endpoints is counted.
Method 3: DATEDIF function
=DATEDIF(A2, B2, "d")Parameter “d” stands for “days”.
Including both start and end dates
=B2 - A2 + 1Calculate business days (excluding weekends)
=NETWORKDAYS(A2, B2)This function counts both endpoints and automatically excludes Saturdays and Sundays.
💡 Detailed examples
Example 1: Days in a year
Problem: Calculate the number of days from 01/01/2024 to 12/31/2024, counting both ends. These are the dates loaded by the Example button.
Step 1: Identify the two dates
- Start date: 01/01/2024 (Monday)
- End date: 12/31/2024 (Tuesday)
Step 2: Calculate days
2024 is a leap year (divisible by 4 and not by 100), so it has 366 days.
Step 3: Detailed breakdown
- Total weeks: 366 = 7 × 52 + 2, i.e. 52 weeks and 2 days
- Total months: 12 months, exactly 1 year
- Business days (excluding weekends): 5 × 52 + 2 = 262 days, because the 2 leftover days are a Monday and a Tuesday
Example 2: Calculate exact age
Problem: A person was born on 03/15/2000. Calculate their age as of 10/20/2024.
Solution: Age is measured from birth, so the end date is not added. In the calculator, untick Include end date.
Step 1: Identify the time period: from 03/15/2000 to 10/20/2024.
Step 2: Calculate
- Total days: 8,985 days
- Breakdown: 03/15/2000 + 24 years 7 months = 10/15/2024, then 5 more days to 10/20/2024
Conclusion: The person is 24 years old (rounded down), exactly 24 years 7 months 5 days.
Example 3: Project duration
Problem: A project starts on 06/05/2024 (Wednesday) and ends on 09/28/2024 (Saturday). Calculate the number of business days (excluding weekends).
Step 1: Total days, counting both ends
Step 2: Count weekend days
16 whole weeks contain 2 × 16 = 32 weekend days. The last 4 days are 09/25 (Wednesday) to 09/28 (Saturday), adding 1 more weekend day. That makes 33 weekend days.
Step 3: Calculate business days
NETWORKDAYS(06/05/2024, 09/28/2024) in Excel also returns 83.
Example 4: Countdown to an event
Problem: Today is 10/20/2024. Calculate the days remaining until New Year 2025 (01/01/2025).
Solution: A countdown only counts day changes, so untick Include end date.
- From 10/20/2024 to 01/01/2025 = 11 + 30 + 31 + 1 = 73 days
- Breakdown: 2 months 12 days
- Equivalent: 73 = 7 × 10 + 3, i.e. 10 weeks and 3 days
🎯 Real-world applications
1. Project management
Calculate timelines, milestones and deadlines. Determine actual working days for proper resource allocation.
2. Human resources & payroll
Calculate working days, vacation days, probation periods and employee tenure.
3. Finance & banking
Calculate daily interest, determine investment periods, and count late payment days for penalties.
4. Legal & contracts
Determine contract validity periods, warranty periods and complaint statutes of limitations.
5. Healthcare
Calculate gestational age, expected delivery date, treatment cycles and quarantine periods.
6. Education
Calculate school days in a semester, exam preparation time and intervals between exams.
7. Travel
Plan itineraries, calculate vacation days needed and decide how early to book flights.
📊 Quick conversion table
| Time unit | Conversion to days | Example |
|---|---|---|
| 1 week | 7 days | 2 weeks = 14 days |
| 1 month | 28–31 days | About 30.44 days on average |
| 1 quarter | 90–92 days | 3 months |
| 1 regular year | 365 days | 52 weeks + 1 day |
| 1 leap year | 366 days | 52 weeks + 2 days |
🔍 Important notes
1. Leap years
Leap years have 366 days (February has 29 days). Years divisible by 4 are usually leap years, except years divisible by 100 but not by 400.
Examples:
- 2024: Leap year (divisible by 4)
- 2100: Not a leap year (divisible by 100 but not by 400)
- 2000: Leap year (divisible by 400)
2. Time zones
When calculating across different time zones, consider the time difference to avoid errors. The calculator on this page works with calendar dates only and does not depend on your device’s time zone.
3. Business days vs calendar days
Business days typically exclude weekends and holidays. Each country has a different holiday calendar; the calculator only excludes Saturdays and Sundays.
4. Including both endpoints
Depending on context, you may need to include both start and end dates (add 1 day) or just calculate the span between them. Project working days usually count both ends; age and countdowns do not.
🧮 Interactive quiz
Pick an answer. The explanation appears right below the question.
Question 1. From 01/01/2024 to 01/31/2024 (including both dates), the number of days is:
Correct answer: C. 31 days
Question 2. A project starts Monday (02/05/2024) and ends Friday (02/09/2024). The number of business days is:
Correct answer: B. 5 days
❓ Frequently asked questions (FAQ)
How do I calculate days between two dates in Excel?
The simplest way is subtraction: =B2-A2, where B2 is the later date and A2 is the earlier date. Or use =DAYS(B2,A2) for a clearer formula.
Should I include both start and end dates?
It depends on your purpose. To include both endpoints, add 1 to the result: =B2-A2+1. For example, from day 1 to day 5 is 5 days including both ends, not 4 days.
How do I exclude weekends when calculating days?
In Excel or Google Sheets, use =NETWORKDAYS(A2,B2). It counts both endpoints and automatically excludes Saturdays and Sundays. In the calculator at the top of this page, tick Exclude weekends.
How do leap years affect calculations?
Leap years have 366 days instead of 365 because February has 29 days. The calculator converts every date to a Julian Day Number, so February 29 is always counted correctly.
Can I calculate months or years between two dates?
Yes. Use =DATEDIF(A2,B2,"M") for whole months, or =DATEDIF(A2,B2,"Y") for whole years. Parameter "M" means months and "Y" means years.