Ttooleras
📅

Date Difference Calculator

Math & Numbers

Calculate exact difference between two dates in years, months, weeks, days, hours with optional weekend or holiday exclusion.. Free, private — all processing in your browser.

Enter both start and end dates to see the difference.
Advertisement

The Date Difference Calculator measures the exact time between any two dates — in years, months, weeks, days, hours, minutes, and seconds — and optionally excludes weekends and holidays to produce a business-days count. This is one of the most common calculations in project management, legal work, payroll, contract administration, and event planning. How many days until the client deadline? How many business days between the contract start and the first deliverable? How many weeks pregnant are you? How long has it been since a project kick-off?

The tool handles every subtlety: month-length variation (some have 28, 29, 30, or 31 days), leap years, daylight saving time transitions that briefly make a day 23 or 25 hours, timezone differences between the two dates. You pick a start date and an end date, the calculator returns the interval in every meaningful unit simultaneously. Toggle weekend exclusion for business-days math, toggle holiday lists for standard US, EU, UK, or custom holidays, and toggle inclusive vs exclusive counting (whether the end date itself counts as one day). Every computation is instantaneous and runs entirely in your browser.

Date Difference Calculator — key features

Every unit simultaneously

Years, months, weeks, days, hours, minutes, and seconds — all computed at once from the same date pair.

Business days with weekend exclusion

Count only weekdays (Monday-Friday) for project timelines and contract deadlines.

Holiday list exclusion

Subtract US federal, UK bank, or custom holidays from the business-days count for realistic deadlines.

Inclusive and exclusive counting

Choose whether the end date counts as a day, with clear labeling to match legal or contractual conventions.

Timezone aware

Handles dates in different timezones correctly, using UTC arithmetic to preserve exact elapsed time.

DST handling

Daylight saving transitions are handled so hour counts remain exact across spring-forward and fall-back days.

Natural breakdown

Shows duration as years/months/days for human readability plus total days for precise math.

Shareable URL

Every calculation encodes both dates in the URL hash so you can bookmark or share specific date ranges.

How to use the Date Difference Calculator

  1. 1

    Enter start date

    Pick the earlier date from the date picker or type it in YYYY-MM-DD format. Time is optional.

  2. 2

    Enter end date

    Pick the later date. Can be past or future — both work the same way.

  3. 3

    Set options

    Toggle weekend exclusion for business days, add holiday lists if relevant, and choose inclusive or exclusive counting.

  4. 4

    Read the breakdown

    The calculator shows total days plus a human-readable years-months-days breakdown and business-days count if enabled.

  5. 5

    Copy or share

    Copy any value with one click or share the URL to send the same calculation to someone else.

Common use cases for the Date Difference Calculator

Project management

  • Sprint and milestone planning: Calculate business days between sprint start and milestone review to set realistic deadlines.
  • Deadline countdown: See how many working days remain until a project deadline, accounting for weekends and holidays.
  • Historical duration reporting: Compute how long a past project actually took for retrospective and post-mortem analysis.

Legal and contract work

  • Notice periods: Calculate the exact end date of a 30-day or 60-day notice period from a given start date.
  • Statute of limitations: Verify whether a legal filing falls within the allowed time window from the triggering event.
  • Contract term calculations: Measure contract duration between execution and expiry for renewal reminders and reporting.

Personal and life events

  • Pregnancy weeks tracking: Calculate the number of weeks between last menstrual period and today for pregnancy progress.
  • Anniversary counting: How many days, weeks, or years have passed since a wedding, relationship start, or important life event.
  • Trip duration: Count days between travel start and end for vacation planning, visa applications, or expense reports.

Date Difference Calculator — examples

Standard date range

Days from 2024-01-15 to 2026-03-20.

Input
2024-01-15 to 2026-03-20
Output
2 years 2 months 5 days
total days: 795
total weeks: 113 weeks 4 days

Business days

Same range, excluding weekends.

Input
2024-01-15 to 2026-03-20 (business days)
Output
weekdays: 569
(795 total - 226 weekend days)

Business days with US holidays

Same range, excluding weekends and US federal holidays.

Input
2024-01-15 to 2026-03-20 (US holidays)
Output
working days: 549
(20 federal holidays in range excluded)

Time remaining

Days until a future deadline.

Input
today to 2026-12-31
Output
240 days
7 months 27 days
34 weeks

Historical interval

Time since a well-known event.

Input
1969-07-20 (Apollo 11) to 2026-05-05
Output
56 years 9 months 15 days
total days: 20,743

Technical details

Date interval arithmetic uses the Julian Day Number (JDN) internally for exact day counting. Each date converts to an integer day number; the difference is a simple subtraction. This avoids every month-length and leap-year issue at the core and defers only the human-readable breakdown to the end.

For the years-months-days breakdown, the algorithm is: compute raw year difference (end year minus start year), subtract one if end month-day has not yet reached start month-day, then compute months within the remainder year similarly, then days within the remainder month. This matches how humans intuitively think about age and duration — the output for 2024-01-15 to 2026-03-20 is \"2 years 2 months 5 days\", not just \"795 days\".

Total days uses inclusive or exclusive counting depending on preference. The American Bar Association convention for contract dates is typically exclusive (first day not counted); some legal statutes are inclusive (both start and end counted). The calculator supports both modes with explicit labeling so you know which interpretation you are applying.

Business-days calculation iterates through the range and counts weekdays (Monday-Friday). For large ranges, a closed-form formula based on full-weeks-plus-remainder is used for performance, but the result is identical. Adding holiday exclusion requires a holiday list — the calculator ships with US federal holidays, UK bank holidays, and EU country lists, plus a custom-date input for company-specific holidays.

Daylight saving transitions affect hour count but not day count. Going from EST to EDT in March, the day is 23 hours; going from EDT to EST in November, the day is 25 hours. For \"hours between two dates\" calculations spanning DST, the result uses UTC arithmetic to preserve exact elapsed hours, which is usually what you want for billing or scientific purposes.

Timezone handling: if both dates are local wall-clock times, the calculator uses local-time subtraction. If the dates are in different timezones (e.g., meeting start in NYC, meeting end in London), the calculator converts both to UTC for exact elapsed math. The output labels clearly which mode is being used.

Common problems and solutions

Inclusive vs exclusive counting

A 30-day rental starting March 1 could end March 30 (inclusive, March 1 counts as day 1) or March 31 (exclusive, counting 30 full days after March 1). Clarify which convention your contract or law uses.

Different timezones complicate math

A date in New York and a date in Tokyo can differ by a day at the same moment. For elapsed time, convert both to UTC. For calendar-day counting, keep each in local time with a clear note.

Holidays vary by country and region

Federal holidays differ between US and UK, and even state or canton holidays exist. Use the right holiday list for your context or enter custom holidays.

Leap years miss-counted

Naive year arithmetic that ignores leap years drifts by a day every few years. The calculator uses exact day arithmetic internally — do not manually compute year intervals by multiplying by 365.

Daylight saving hour discrepancy

Hours between two local-wall-clock times across DST transitions can be off by one hour if computed naively. Use UTC for precise hour counts spanning DST boundaries.

Business days confused with elapsed days

A five-business-day deadline starting Friday lands on the following Friday (5 working days including the starting day’s continuation), not the coming Wednesday. Always specify whether deadlines count business or calendar days.

Counting events not matching ticket ranges

A three-night hotel stay checking in Monday and out Thursday is 3 nights but 4 days of presence. Confirm whether the application wants nights, days, or elapsed 24-hour periods.

Date Difference Calculator — comparisons and alternatives

Compared to spreadsheet DATEDIF or NETWORKDAYS formulas, this tool is faster for one-off calculations and shows every unit at once. Spreadsheets still win for bulk date calculations across many rows; this tool wins for interactive exploration.

Compared to calendar apps (Google Calendar, Outlook), this tool gives exact days, weeks, months between any two arbitrary dates without creating an event. Calendar apps are great for scheduling; this tool is for pure duration math.

Compared to legal-specific timekeeping software, this tool handles common holiday lists but does not track specific jurisdiction rules (court holidays, local jurisdictions). For legal filing deadlines, always verify with the jurisdiction\u2019s official holiday schedule.

Frequently asked questions about the Date Difference Calculator

How do I calculate the number of days between two dates?

Enter both dates and the calculator returns the total days instantly. The underlying math uses Julian Day numbers (continuous day counts) so leap years and month-length differences never cause errors. Inclusive vs exclusive counting changes the total by one — check which convention your context expects.

Can I exclude weekends from the count?

Yes. Toggle the business-days option and the calculator returns only weekdays (Monday through Friday). For a more accurate working-days count, add a holiday list (US federal, UK bank, or custom) to also exclude public holidays.

How many working days are in a typical year?

About 252 working days after excluding 104 weekend days and 8-11 public holidays, depending on country and how they fall relative to weekends. US with 11 federal holidays averages 251 working days; UK with 8 bank holidays averages 253.

How does the calculator handle leap years?

All day arithmetic uses exact Julian Day counts, which implicitly handle leap years. For year-and-month breakdowns, the calculator uses standard calendar semantics (years count forward by year, months by month), so intervals spanning 29 February are correctly computed.

Can I use this for pregnancy week calculations?

Yes. Enter your last menstrual period as the start date and today as the end date. The calculator shows the number of days and weeks — useful for tracking pregnancy progress, though pregnancy dating uses a convention of adding two weeks to actual conception, which you should confirm with your healthcare provider.

Does DST affect the hour count between dates?

If you enter local times on both ends and the interval spans a DST transition, yes — naive local-time subtraction will be off by one hour. The calculator uses UTC arithmetic for elapsed time to give the correct hour count regardless of DST changes.

Can it calculate differences across timezones?

Yes. Set a timezone for each date independently if the two events occur in different places. The calculator converts both to UTC internally and reports exact elapsed time. For calendar-day counts (how many local calendar days between them), each date uses its own local time.

What is the longest date range I can calculate?

Any range from year 1 to year 9999 works with no precision loss. The underlying math uses 64-bit integers which comfortably handle multi-millennium intervals. For very ancient historical dates, note that the proleptic Gregorian calendar the tool uses differs from the Julian calendar dates actually used in history.

Additional resources

Advertisement

Related tools

All Math & Numbers

Learn more

Explore more tools

200+ free tools that run in your browser.

Browse all tools →