๐ Date Difference Calculator: Days Between Two Dates
By Shihab Mia ยท Updated 2026-07-07
Pick a start and end date to see the difference. The order does not matter.
A date difference calculator tells you exactly how much time sits between two dates. To find the number of days between two dates, subtract the earlier date from the later one: for example, from 1 January 2026 to 1 March 2026 is 59 days. Pick a start date and an end date above and you instantly see the gap as a total number of days, broken down into years, months and days, and counted as total weeks. The order does not matter. If you enter the later date first, the calculator takes the absolute value and still returns a clean, positive result.
What is the Date Difference Calculator?
The difference between two dates can be measured in several ways, and each answer is correct for a different purpose. The simplest measure is the total number of days, found by counting every calendar day from the start date up to the end date. This is the value you want for interest accrual, shipping windows, rental periods, or counting down to a deadline, because every day is treated equally and the count never resets. One full year is normally 365 days, or 366 when the span crosses a leap day, so a quick sanity check is that roughly every 365 to 366 days equals one year.
The second way is a calendar breakdown into years, months and days, which is how people naturally describe long spans such as an age or an anniversary. This is trickier than it looks because months range from 28 to 31 days and February changes with leap years. The breakdown works by lining up the day of the month first, borrowing days from the previous month when the end day is earlier than the start day, then settling the months and years. That is why the same total day count can map to a slightly different year, month and day breakdown depending on which months it crosses. This matches how spreadsheet functions such as Excel DATEDIF report the y, ym and md components.
The third measure is total weeks, which is simply the total days divided by seven. Seven goes into the day count a whole number of times plus a remainder, so the calculator shows the full weeks and the leftover days separately. For example, 100 days is 14 weeks and 2 days, and 365 days is 52 weeks and 1 day. Weeks are the natural unit for pregnancy tracking, training plans, notice periods and academic terms.
A fourth measure that competitors often hide behind a paywall or a second tab is business days, meaning weekdays from Monday to Friday with Saturdays and Sundays removed. A rough rule is that any 7-day week contains 5 business days, so a 30-day span holds about 21 to 22 working days before you subtract public holidays. Business days matter for invoice terms such as net 30, shipping estimates, court deadlines and payroll cut-offs. Holidays vary by country and region, so a working-day figure is always an estimate until you subtract the specific holidays that apply to you.
Inclusive versus exclusive counting is the single biggest source of confusion. This tool reports the gap between the two dates, an exclusive count. A hotel stay from the 1st to the 5th is 4 nights of difference but 5 days if you count both endpoints inclusively, so add one day when you need the inclusive total. To keep results consistent, each date is read at local midnight, which means a difference is always a whole number of days with no hidden hours or time-zone drift creeping in.
Under the hood the calculator relies on the proleptic Gregorian calendar and the ISO 8601 date standard, the same system used by databases and programming languages worldwide. Leap years follow the standard rule: every year divisible by 4 is a leap year, except century years, which must also be divisible by 400. That is why 2000 was a leap year but 1900 and 2100 are not, a detail that trips up naive by-hand calculations across long spans.
When to use it
- Counting down the exact days until a holiday, wedding, exam, product launch or due date.
- Working out an age in years, months and days from a birth date, or the age of an account, pet or asset.
- Checking how long a project, subscription, warranty or contract has run between two dates.
- Finding the number of weeks between two dates for a pregnancy, a training block, a course or a savings goal.
- Estimating business days for invoice terms such as net 30, delivery windows or notice periods.
- Verifying deadlines and elapsed time for visas, statutes of limitation, returns windows and free-trial periods.
How to use the Date Difference Calculator
- Choose the start date using the first date picker.
- Choose the end date using the second date picker.
- Read off the total days, the years, months and days breakdown, and the total weeks.
- If you accidentally enter the later date first, do not worry: the result is still shown as a positive difference.
- Use the "Set to today" buttons to fill either field with the current date quickly.
Formula & method
Worked examples
How many days from 1 January 2024 to 31 December 2024?
- 2024 is a leap year, so it has 366 days in total.
- Counting from 1 January up to 31 December covers all but one of those days.
- 366 - 1 = 365 days between the two dates.
- 365 / 7 = 52 weeks with 1 day left over.
Result: 365 days, which is 11 months and 30 days, or 52 weeks and 1 day
What is the age from 15 May 1990 to 19 June 2026?
- Line up the day of the month: 19 is later than 15, so no borrowing is needed (4 days).
- June (month 6) minus May (month 5) gives 1 month.
- 2026 minus 1990 gives 36 years.
- In total that is 13,184 calendar days, or 1,883 weeks and 3 days.
Result: 36 years, 1 month and 4 days (13,184 days total)
How many business days from Monday 1 June 2026 to Friday 12 June 2026?
- The full span from 1 June to 12 June is 11 days of difference (or 12 days inclusive of both endpoints).
- That range covers two weekends: Saturday and Sunday of 6 to 7 June.
- Remove those 4 weekend days from the 12 inclusive days.
- 12 - 4 = 8 working days, assuming no public holidays fall in the range.
Result: 8 business days (weekdays), before subtracting any public holidays
How the same span looks in different units
| Total days | Years, months, days | Weeks | Business days (approx) |
|---|---|---|---|
| 7 | 7 days | 1 week | 5 |
| 30 | 1 month, 0 days (typical) | 4 weeks, 2 days | 21 to 22 |
| 90 | about 3 months | 12 weeks, 6 days | 64 to 66 |
| 180 | about 6 months | 25 weeks, 5 days | 128 to 130 |
| 365 | about 1 year | 52 weeks, 1 day | 260 to 262 |
| 1000 | 2 years, 8 months (approx) | 142 weeks, 6 days | 714 to 716 |
Number of days in each month
| Month | Days |
|---|---|
| January, March, May, July, August, October, December | 31 |
| April, June, September, November | 30 |
| February (common year) | 28 |
| February (leap year) | 29 |
Spreadsheet functions for date differences
| You want | Excel or Google Sheets formula | Returns |
|---|---|---|
| Total days | =End - Start | Whole days between the dates |
| Whole years | =DATEDIF(Start, End, "y") | Complete years only |
| Years, months, days | =DATEDIF(Start, End, "y") & "y " & DATEDIF(Start, End, "ym") & "m " & DATEDIF(Start, End, "md") & "d" | Calendar breakdown |
| Total weeks | =(End - Start)/7 | Weeks, with a decimal remainder |
| Business days | =NETWORKDAYS(Start, End) | Weekdays, endpoints inclusive |
Common mistakes to avoid
- Confusing total days with the months-and-days breakdown. A span of 365 days is not the same as a flat "1 year" in every case, because crossing a leap year shifts the breakdown. Use total days when you need an exact count and the years, months, days view when you want a human description.
- Counting inclusive when you meant exclusive. The difference here is the gap between the two dates, not the number of days you are at a place. A trip from the 1st to the 5th is 4 days of difference but 5 days inclusive if you count both endpoints. Add one day if you need the inclusive total.
- Forgetting leap years. February has 29 days in a leap year, so any span that crosses 29 February gains a day compared with a non-leap span of the same dates. Remember that 2000 was a leap year but 1900 and 2100 are not. The calculator handles this automatically.
- Treating every day as a business day. Total days include weekends. If you need working days for an invoice or a delivery estimate, remove roughly 2 days per full week for Saturdays and Sundays, then subtract any public holidays that apply in your country.
- Ignoring time zones in your head. A difference in whole days only makes sense if both dates start at the same point in the day. This tool reads each date at local midnight so the answer is always a clean whole number of days with no time-zone drift.
Glossary
- Total days
- The number of full calendar days between the start and end date, counted equally regardless of month length.
- Calendar breakdown
- The difference expressed as years, months and days, the way people describe an age or a long anniversary.
- Business day
- A weekday from Monday to Friday. Business-day counts exclude Saturdays, Sundays and, usually, public holidays.
- Leap year
- A year with 366 days that adds 29 February. It occurs every 4 years, except century years not divisible by 400.
- Inclusive count
- A count that includes both the start and end dates. It is one larger than the plain (exclusive) difference between the dates.
- ISO 8601
- The international date standard that writes dates as YYYY-MM-DD, used by databases and calculators to avoid ambiguity.
- DATEDIF
- A spreadsheet function in Excel and Google Sheets that returns the difference between two dates in years, months or days.
Frequently asked questions
How do I calculate the number of days between two dates?
Enter the start date and the end date in the calculator above and it shows the total days instantly. By hand, subtract the earlier date from the later one, counting every calendar day and allowing for different month lengths and leap years.
Does the order of the dates matter?
No. If you put the later date in the start field by mistake, the calculator takes the absolute difference and still shows a positive result, so you always get a sensible answer.
How many business days are between two dates?
Business days are weekdays from Monday to Friday. Take the total days, remove about 2 days for each full week (the weekends), then subtract any public holidays. Roughly, a 7-day week holds 5 business days and a 30-day month holds 21 to 22.
How do I find the difference between two dates in Excel or Google Sheets?
For total days, use =End - Start. For a calendar breakdown use DATEDIF, for example =DATEDIF(Start, End, "y") for whole years. For working days use =NETWORKDAYS(Start, End), which counts weekdays and includes both endpoints.
Why does the years, months, days breakdown differ from total days divided by 365?
Months vary in length and leap years add a day, so a fixed 365-day year is only an approximation. The breakdown counts real calendar months, which is why it can differ slightly from a simple division.
Does this calculator count both the start and end dates?
It shows the gap between the two dates, an exclusive count, not an inclusive one. If you need to include both endpoints, for example to count days of a trip rather than nights, add one day to the result.
How does it handle leap years?
Automatically. Any span that crosses 29 February includes that extra day, so the total days and the breakdown both account for leap years. Leap years occur every 4 years, skipping century years unless they divide by 400.
How many weeks are between two dates?
The calculator divides the total days by seven and shows the whole weeks plus any leftover days. For example, 365 days is 52 weeks and 1 day, and 100 days is 14 weeks and 2 days.
How do I calculate someone's age from their date of birth?
Put the date of birth as the start date and today as the end date. The years, months and days breakdown is the exact age. Use the "Set to today" button to fill the end date quickly.
How many months are between two dates?
Read the years and months from the breakdown, or estimate by dividing the total days by about 30.44, the average month length. A 90-day span is close to 3 months and a 180-day span is close to 6 months.
Sources
- Calculate the difference between two dates (DATEDIF) , Microsoft Support