Date Difference Calculator
EverydayCalculate the exact difference between any two dates — get years, months, days, total weeks, and a split of calendar days vs working days (excluding weekends).
Date Difference
Select a start and end date above
What is a Date Diff?
A date difference calculator finds the precise interval between any two calendar dates and expresses it in multiple useful units simultaneously: total calendar days, total weeks, working days (Monday through Friday), weekend days (Saturday and Sunday), and the compound breakdown of years, months, and days. Unlike a quick mental subtraction that gives only an approximate number of months, this tool gives you every figure you might need for planning, compliance, or contracts — in a single quick calculation.
Date intervals come up constantly in everyday financial and professional life in India. Employment contracts specify notice periods in days. Bank fixed deposits mature after a precise number of days. Income Tax Return filing deadlines fall on specific dates. SBI, HDFC, and other banks compute interest on a daily basis for loans and deposits. SEBI settlement cycles for equity trades run on a T+1 or T+2 calendar. In each of these contexts, getting the day count exactly right matters — an off-by-one error can mean a missed deadline or an incorrect interest calculation.
The working-day split is particularly valuable. Many legal and HR contexts in India draw a sharp distinction between calendar days and working days. A 90-day notice period in a job contract usually means 90 calendar days, but a "30 working days" SLA in a vendor agreement means approximately 6 calendar weeks. Seeing both counts side by side removes the need to manually subtract weekends.
If you need to find your exact age rather than a general date interval, the Age Calculator is the focused tool for that purpose — it measures from date of birth to a reference date and shows years, months, and days lived.
For project or deadline tracking that involves percentage progress — such as how far you are through a financial year or a project timeline — pair this tool with the Percentage Change Calculator to convert elapsed days into a completion percentage.
How to use this Date Diff calculator
Set the Start Date — click the Start Date field and select the earlier of the two dates from the date picker. The date displays as "12th June 2026" for clarity. For a notice period, this would be your resignation date. For a project timeline, it would be the project kick-off date.
Set the End Date — click the End Date field and select the later date. For a notice period end, this would be your last working day. For a deadline, this is the due date. The End Date must be after the Start Date.
Use the swap button if needed — if you entered the dates in reverse order, click the ⇅ button between the two fields to instantly swap Start Date and End Date without re-entering anything.
Read the primary result — the large number in the result card shows the total calendar days. Below it, the compact duration line shows the same interval in years/months/days and full weeks.
Check the Working Days and Weekend Days tiles — these appear below the duration line. Working Days (green) is the Mon–Fri count; Weekend Days is the Sat–Sun count. The two always add up to the total calendar days.
Scroll to the step breakdown — below the result card, the full calculation is shown step by step: start date, end date, duration breakdown, total days, complete weeks, working days, and weekend days. This is useful for sharing with a colleague or including in documentation.
Formula & Methodology
Total calendar days:
Total days = ⌊ (End Date − Start Date) ÷ 86,400,000 ⌋
where dates are Unix timestamps in milliseconds and ⌊ ⌋ denotes the floor function.
Years / months / days breakdown — same borrowing algorithm used in the Age Calculator:
1. days = End.day − Start.day → if < 0: months − 1, days + daysInPrevMonth(End)
2. months = End.month − Start.month − borrow → if < 0: years − 1, months + 12
3. years = End.year − Start.year − borrow
Working days (O(1) algorithm):
fullWeeks = ⌊ totalDays ÷ 7 ⌋
workingDays = fullWeeks × 5 + Σ (for i = 0 to remaining − 1: 1 if (startDayOfWeek + i) mod 7 ∉ {0, 6})
where startDayOfWeek is 0 for Sunday, 1 for Monday, …, 6 for Saturday, and remaining = totalDays mod 7.
weekendDays = totalDays − workingDays
totalWeeks = fullWeeks
Variable definitions:
- End Date, Start Date — the two input dates, normalised to local midnight (00:00:00) to avoid timezone offset errors
- daysInPrevMonth(End) — the number of days in the calendar month immediately before End's month
- startDayOfWeek — JavaScript Date.getDay() of the Start Date (0 = Sunday, 6 = Saturday)
- remaining — the days left over after removing all full 7-day weeks
Worked example:
Start Date: 1 January 2026 (Thursday)
End Date: 12 June 2026 (Friday)
1. Total days = ⌊ (Jun 12 − Jan 1) ÷ 86,400,000 ⌋ = 162 days
2. Duration breakdown = 0 years, 5 months, 11 days
3. Full weeks = ⌊ 162 ÷ 7 ⌋ = 23 weeks; remaining = 1
4. Working days in 23 full weeks = 115
5. Remaining day 0 from Thursday = Thursday (weekday) → +1
6. Working days = 116 | Weekend days = 162 − 116 = 46
7. Total weeks = 23
Assumptions and limitations:
- The interval is measured from the Start Date inclusive to the End Date exclusive (standard interval convention). If you need both dates included, add 1 to the total-days result.
- Working days are defined as Monday through Friday only. Indian public holidays are not deducted — subtract applicable gazetted holidays manually for legally precise notice-period calculations.
- All dates are processed in the user's local timezone (local midnight), not UTC, to prevent off-by-one errors for users in IST (UTC +5:30).