Date Difference Calculator
Calculate the exact number of days, weeks, months, and years between any two dates. Shows business days, total hours, and detailed breakdown.
Date Difference Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser — no data is sent to any server.
Formula: Days = End Date - Start Date (in milliseconds) ÷ 86,400,000
Worked example — 305 calendar days | 217 business days | 43 weeks 4 days
Formula
Days = End Date - Start Date (in milliseconds) ÷ 86,400,000
The calculator converts both dates to milliseconds since January 1, 1970 (Unix epoch), subtracts them, and converts the result to days. For the years/months/days breakdown, it calculates complete years, then complete months, then remaining days, borrowing from previous months when needed.
Worked Examples
Example 1: Project Deadline Calculation
Problem:How many days from March 1, 2025 to December 31, 2025?
Solution:March: 30 remaining days April-November: 30+31+30+31+31+30+31+30 = 244 days December: 31 days Total: 30 + 244 + 31 = 305 days Business days ≈ 217 (excluding weekends)
Result:305 calendar days | 217 business days | 43 weeks 4 days
Example 2: Age Calculation
Problem:Calculate exact age from birthday July 15, 1990 to March 21, 2026.
Solution:Years: 2026 - 1990 = 36, but July hasn't passed yet in 2026 So: 35 years, 8 months, 6 days Total days: 13,033 Total weeks: 1,861 weeks 6 days
Result:35 years, 8 months, 6 days | 13,033 total days
Frequently Asked Questions
How do I calculate the number of days between two dates?
To calculate days between two dates manually: convert both dates to the same format, subtract the earlier date from the later date, and convert the result from milliseconds to days by dividing by 86,400,000 (the number of milliseconds in a day). For example, between January 1 and March 15 of the same non-leap year: January has 31 days, February has 28 days, so the count is 31 (remaining Jan days) + 28 (Feb) + 15 (Mar days) = 74 days. Our calculator handles all the complexity including leap years, different month lengths, and timezone considerations automatically.
Does Date Difference Calculator account for leap years?
Yes, Date Difference Calculator fully accounts for leap years. A leap year occurs every 4 years (years divisible by 4), except for years divisible by 100, unless they're also divisible by 400. So 2024 is a leap year (divisible by 4), 1900 was not (divisible by 100 but not 400), and 2000 was (divisible by 400). February has 29 days in leap years instead of 28. The calculator uses JavaScript's Date object which correctly handles all these rules, ensuring accurate day counts across any date range including those spanning multiple leap years.
What is the difference between calendar days and business days?
Calendar days include every day — weekdays, weekends, and holidays. Business days (also called working days or weekdays) only count Monday through Friday, excluding Saturday and Sunday. Our calculator shows both counts. Note that Date Difference Calculator excludes weekends but does not exclude public holidays, which vary by country and region. For precise business day calculations involving holidays, you'd need to specify which country's holiday calendar to use. As a rough estimate, business days are approximately 71.4% of calendar days (5/7).
Should I include the end date in the count?
It depends on what you're calculating. For durations (how long something lasted), typically you don't include the end date — the difference between January 1 and January 2 is 1 day, not 2. For counting inclusive days (how many days including both the start and end), toggle on 'Include end day' — now January 1 to January 2 counts as 2 days. Use inclusive counting for things like medication schedules ('take for 7 days starting Monday' — Monday through Sunday = 7 inclusive days), hotel stays, or rental periods. Use exclusive for age calculations and time elapsed.
How do I calculate months between dates with different day counts?
Calculating months between dates is tricky because months have different lengths (28-31 days). Date Difference Calculator uses the standard approach: count complete months, then count remaining days. For example, from January 15 to March 10: January 15 to February 15 = 1 month, February 15 to March 10 = 23 days. Total = 1 month and 23 days. If the end day is less than the start day, we borrow from the previous month. This matches how most financial institutions and legal systems count months for contracts, loans, and leases.
Why doesn't Total Days line up with the years, months and days breakdown?
They are produced two different ways. Total Days is an elapsed count: both dates become milliseconds since the Unix epoch, are subtracted, and divided by 86,400,000. The breakdown subtracts the year, month and day components separately and borrows the length of the preceding month whenever the day component goes negative. Because that borrowed amount is 28, 29, 30 or 31 depending on where the span sits, the same elapsed total maps onto different breakdowns at different points in the year.
Does the Include end day toggle change every figure on the page?
No. It adds one to the total day count, and every figure derived from that total is recomputed — the weeks and remainder split, and the hour, minute and second lines. The years, months and days breakdown is computed straight from the two calendar dates, and the business-day count is produced by walking the interval, so neither shifts when the box is ticked. The day total then counts both endpoints, while the breakdown still measures the gap between them — pick whichever convention your contract or booking states.
What is a day-count convention, and why does 30/360 give a different answer?
Interest accrues by time, so lenders fix a convention rather than relying on the raw calendar. Under 30/360 every month is treated as 30 days and every year as 360, which makes manual interest arithmetic divide evenly. Actual/365 and actual/actual use real counts instead. From 1 February to 1 March, 30/360 credits 30 days where the calendar shows 28, so a lender's figure can legitimately differ from the count shown here.
What are clear days, and how do they differ from inclusive counting?
Clear days exclude both the day the period starts and the day it ends, so only the whole days in between count. A requirement for seven clear days' notice served on a Monday is not satisfied until the following Tuesday, since Tuesday through Monday are the seven clear days and neither the day of service nor the day of the event is counted. Many procedural rules also disregard weekends for short periods.
Why do intervals crossing 1582 or 1752 need special care?
The Gregorian reform deleted dates outright. Countries adopting it in 1582 went straight from 4 October to 15 October, losing ten days; Britain and its colonies adopted it in 1752 and went from 2 September to 14 September, losing eleven. Software that projects modern rules backwards counts those dates as though they had been lived through, so historical intervals need the relevant country's adoption date applied by hand.
References
Background & Theory
History
Reviewed for accuracy by Abdullah, Technical Content Specialist · Editorial policy
Related Calculators
🧮Add Days to Date Calculator
Add or subtract days, weeks, months, or years from any date to find the resulting date.
🧮Date to Julian Day Converter
Convert between calendar dates and Julian Day Numbers used in astronomy and programming.
🧮Date Range Generator
Generate a list of all dates between two dates with customizable intervals.
🧮Stopwatch Lap Time Calculator
Calculate average, best, and worst lap times from a list of split times.
🧮Break Time Calculator
Calculate entitled break times based on shift length and labor law requirements.
🧮Date of Birth Calculator
Calculate date of birth from current age or age at a specific date.
🧮Due Date Calculator by Conception Date (Not LMP)
Calculate pregnancy due date from exact conception date instead of last menstrual period.
🧮Date to Day Number Calculator
Convert any date to its ordinal day number within the year (1-366).