Date Difference Calculator — Days, Weeks, Months & Business Days Between Dates
Find the exact difference between any two dates — total days, calendar years/months/days, business days (weekends excluded), weeks, hours, and minutes — or add and subtract years, months, weeks, and days from a base date. Free, calendar-accurate, and 100% in-browser.
Calendar-Accurate
Months and years use real calendar arithmetic with day-of-month borrow logic — "3 years, 2 months, 14 days" matches what a calendar would show, not approximate 30-day months.
Business Days Built In
Get the count of working days (Mon-Fri) between any two dates, automatically excluding Saturdays and Sundays. Useful for SLAs, notice periods, and project plans.
Add & Subtract Mode
Switch to the second tab to do date arithmetic: pick a base date, then add or subtract any combination of years, months, weeks, and days. End date is calculated instantly.
100% Client-Side
All math runs in your browser — no server call, no signup. Works offline once the page is loaded.
Date Difference Calculator: Exact Days, Months & Business Days
A date difference calculator returns the exact gap between two dates. Enter a start and end date and this tool shows total days, weeks, calendar years/months/days, business days (Monday–Friday), hours, and minutes — or switch modes to add or subtract years, months, weeks, and days from a base date. The math runs 100% in your browser, free, anchored to midnight UTC so DST never skews a day count.
How to calculate the difference between two dates
- Keep Difference Between Dates selected (the default tab).
- Pick a Start date and an End date — both default to a 30-day span from today.
- Read the headline calendar duration (for example
3y 2mo 14d) plus the unit grid: total days, business days, weeks, hours, minutes, and ISO week. - Use the swap button to reverse the dates; if the end is before the start, the result shows a negative duration.
- To do date arithmetic, switch to Add / Subtract from a Date, choose a base date, pick Add or Subtract, then enter any mix of years, months, weeks, and days.
How date difference math actually works
Total days come from subtracting two timestamps and dividing by 86,400,000 milliseconds per day. That part is simple; the calendar breakdown is not. This tool computes the year/month/day gap by subtracting each field separately and borrowing from the previous month when the end day is smaller than the start day — the same way you would count on a paper calendar. Both inputs are interpreted as midnight in Coordinated Universal Time (UTC) so a daylight-saving jump can never add or remove a fractional day.
Leap years follow the Gregorian rule: a year is a leap year if it is divisible by 4, except centuries, which must be divisible by 400. The US Naval Observatory puts the mean Gregorian year at 365.2425 days, which is why 2000 was a leap year but 1900 and 2100 are not. Week numbers use the ISO 8601 week date standard, where weeks start on Monday and week 1 is the week containing the year's first Thursday (equivalently, the week containing January 4).
"Every year that is exactly divisible by four is a leap year, except for years that are exactly divisible by 100, but these centurial years are leap years if they are exactly divisible by 400."— US Naval Observatory, Astronomical Applications Department
Worked examples: input → output
Difference · 2024-01-15 → 2024-03-20
2 months, 5 days · 65 total days · 47 business days
Add · 2026-06-02 + 90 days
2026-08-31 (Monday) · a typical 90-day trial expiry
Edge case · add 1 month to 2026-01-31
Result is 2026-03-03, not February 28. Month arithmetic is ambiguous because February has no 31st, and the add/subtract mode uses native JavaScript setUTCMonth, which rolls the extra days into March rather than clamping. For a fixed day of month, use the days field.
Edge case · the Year 2038 problem
This tool uses 64-bit JavaScript Date math, so it is immune to the Year 2038 problem. Systems that store Unix time in a signed 32-bit integer overflow at 2,147,483,647 seconds after the epoch — 03:14:07 UTC on 19 January 2038 — and wrap back to 1901. Try differencing past that date here; it stays correct.
Where date difference math matters
| Context | Typical question |
|---|---|
| Project deadlines | How many business days from kick-off to launch? |
| Pregnancy & gestation | Weeks pregnant given a last-period date or due date. |
| Contract notice periods | 60 days from termination notice — exact end date. |
| Visa & immigration | Days remaining on a 90-in-180 Schengen calculation. |
| Subscription anniversaries | Calendar months until annual renewal. |
| Trial-period expiry | 30-day trial start → exact expiration including weekends. |
Which unit should you use?
| Unit | How it is computed | Use for |
|---|---|---|
| Total days | floor((end − start) / 86,400,000ms) | Any literal day counting (subscriptions, deadlines, age in days) |
| Total weeks | totalDays / 7 | Pregnancy gestation, sprint counting |
| Calendar Y/M/D | Year/month/day subtraction with borrow (like Age Calculator) | Human-readable durations ("3 years, 2 months, 14 days") |
| Business days | Loop day-by-day, count only Mon-Fri | SLA timers, contract notice, work-day deadlines |
| Total months | (endYear − startYear) × 12 + (endMonth − startMonth) − (endDay < startDay ? 1 : 0) | Loan amortization, payroll periods |
Difference mode borrows; add mode overflows — know the difference
The two modes treat month-ends differently, and that is the detail most calculators blur. The difference mode borrows the real length of the preceding month, so January 15 to March 20 is exactly 2 months and 5 days, not 2.13. The add/subtract mode runs on native JavaScript setUTCMonth, which overflows instead of clamping: add one month to January 31 and the surplus days roll into March, giving March 3 (or March 2 in a leap year), not February 28.
The leap day is the sharpest test. Adding one year to February 29, 2024 overflows to March 1, 2025, because 2025 has no February 29 — but adding four years lands exactly on February 29, 2028, since that leap year does have the date. If you want a fixed day of month regardless of month length, drive it with the days field, not the months field. Knowing which mode borrows and which overflows is the difference between a correct contract date and an off-by-a-few-days one.
Date math edge cases this tool handles
1. Leap-day anniversaries
Feb 29, 2024 + 1 year overflows to Mar 1, 2025 (no Feb 29 that year); + 4 years lands exactly on Feb 29, 2028.
2. Month-end roll-over
Jan 31 + 1 month rolls over to Mar 3 (Mar 2 in a leap year) via native setUTCMonth overflow — use the days field for a fixed day of month.
3. DST day-count drift
Math runs in midnight UTC, so daylight-saving transitions never add or remove a fractional day.
4. Negative differences
If end < start, the calendar breakdown shows a negative duration of the same magnitude — useful for "how long ago" counts.
Runs 100% in your browser
Your dates never leave your device. Every calculation is done locally with the native JavaScript Date API — no uploads, nothing leaves your device — so the tool works offline once the page loads. I checked it against the tricky cases: Jan 31 + 1 month (which overflows to March, not Feb 28), leap-day anniversaries one and four years out, a difference spanning the March DST change, and day counts reaching past 19 January 2038. The day-difference totals all matched a hand-counted calendar, and the add-mode overflow behavior is documented above so the result is never a surprise. For more on epoch time and the 2038 overflow, read the Unix timestamp and epoch guide.
Frequently asked questions
Is this date difference calculator free, and does it run in my browser?
Yes to both. It is 100% free with no signup and no usage limit, and every calculation runs in your browser with the native JavaScript Date API. No dates are sent to a server, so it works offline once the page has loaded and your inputs never leave your device.
How are business days calculated between two dates?
The tool loops day by day from the start date (exclusive) to the end date (inclusive) and counts only Monday through Friday, skipping Saturday and Sunday. It does not subtract public holidays, because holiday calendars differ by country, region, and employer. For contract notice, SLA timers, and sprint planning, weekday-only counting is the standard convention.
Why does the calendar months result differ from total days divided by 30?
Because months are 28 to 31 days long, dividing by 30 drifts over time. The calendar breakdown uses real month boundaries: January 15 to March 20 is exactly 2 months and 5 days, not 64/30 = 2.13 months. The tool subtracts year, month, and day separately and borrows from the previous month when the end day is smaller than the start day, matching a paper calendar.
How does adding one month to January 31 work?
Adding one month to January 31 rolls over to March 3 (March 2 in a leap year), not February 28. The add/subtract mode uses the native JavaScript Date setUTCMonth, which overflows the extra days into the next month rather than clamping to the last day of February. Month arithmetic is genuinely ambiguous, so if you need a fixed day of month, use the days field instead.
Does the calculator handle leap years correctly?
Yes for day counts. February 28, 2024 to February 28, 2025 counts as 366 days because 2024 was a leap year. The Gregorian rule is that a year is a leap year if divisible by 4, except centuries, which must be divisible by 400, so 2000 was a leap year but 1900 and 2100 are not. In add mode, February 29, 2024 plus one year overflows to March 1, 2025 (no Feb 29 exists), while plus four years lands exactly on February 29, 2028.
What are the ISO week number and day of year shown for each date?
The ISO 8601 week starts on Monday, and week 1 is the week containing that year's first Thursday (equivalently, the week containing January 4). The day of year is a 1 to 365, or 1 to 366 in a leap year, sequence where January 1 is day 1. The tool shows both for your start and end dates so a single integer can identify a week or day.
Does the day count include the start date?
No, the total-days and business-days outputs are exclusive of the start date, so Monday to Friday returns 4, not 5. This matches how most people count days between events. If you need inclusive counting, where both endpoints count as one unit each, add 1 to the result.
Why does the math run in UTC instead of local time?
Local-time arithmetic can gain or lose an hour during a daylight saving transition, which corrupts day counts on calendars that observe DST. The tool interprets both inputs as midnight UTC, making the math timezone-independent and DST-immune. The display still shows the dates you entered; the UTC anchor is purely internal.
How is this different from the Age Calculator?
The Age Calculator is tuned for the from-birth case and assumes one date is in the past, adding lifetime totals like hours and heartbeats. The Date Difference Calculator works on any two dates, supports negative (end before start) durations, counts business days, and includes an add/subtract mode. Use Age for how old is X, and Date Difference for how many work days until launch.
Related date, time & calculator tools
From-birth duration plus lifetime totals
Timestamp ConverterConvert Unix epoch to ISO 8601 dates
Time Zone ConverterTranslate wall-clock time across IANA zones
Cron Expression BuilderSchedule recurring jobs by day, week, month
Pomodoro TimerTrack focused work in 25-minute blocks
Percentage CalculatorWork out percentages, changes, and shares
Compound Interest CalculatorProject growth over months and years
Unit ConverterConvert length, weight, time, and more
Tip CalculatorSplit a bill and add a tip by percentage
Aspect Ratio CalculatorResize dimensions while keeping the ratio
All ToolsBrowse the full Toolk utility library
Guide: Unix Timestamps & EpochEpoch time, ISO 8601, and the 2038 bug
Last updated: June 2, 2026 · Runs 100% in your browser — no uploads, nothing leaves your device.
Need a different tool?
Browse all 89 free, in-browser tools — or tell us what we should build next.