HomeCalculatorsEverydayDate Difference Calculator

Date Difference Calculator

Everyday

Calculate the exact difference between any two dates — get years, months, days, total weeks, and a split of calendar days vs working days (excluding weekends).

16th May 2026
15th June 2026

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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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).
Frequently Asked Questions
What is a date difference calculator and what does it calculate?
A date difference calculator finds the exact gap between any two dates and breaks it down into years, months, days, total calendar days, total weeks, working days, and weekend days. It is useful any time you need a precise count rather than a rough estimate — for notice periods, project timelines, loan processing windows, or government scheme deadlines. Our calculator displays all seven figures simultaneously from a single pair of date inputs.
How do I calculate the number of days between two dates?
Set your Start Date and End Date in the calculator and the total days appear instantly. To do it manually, count the days from the start date up to (but not including) the end date — this is the standard interval convention used in banking, contracts, and legal notices. For example, from 1 January to 31 March is 89 days, not 90, because the end date itself is not counted.
What is the formula for calculating the date difference in days?
Total days = End Date − Start Date, measured in whole days. In practice this is computed as the difference of the two dates' Unix timestamps divided by 86,400,000 (milliseconds per day), rounded down. For years/months/days, the calculation works component by component — days first (borrowing from months if negative), then months (borrowing from years if negative), similar to standard subtraction with borrowing.
What counts as a working day in India?
For the purpose of this calculator, a working day is any Monday through Friday. Saturday and Sunday are treated as weekend days and excluded from the working-day count. Note that the calculator does not deduct Indian public holidays (Diwali, Holi, Republic Day, etc.) — for legally precise notice-period or SLA calculations, you should subtract the applicable public holidays from the working-day total manually.
How are working days calculated between two dates?
The calculator uses an efficient formula rather than looping day by day. It divides the total days into full weeks (each contributing 5 working days) and remaining days, then checks each remaining day's day-of-week individually. This gives the correct result in all cases without the performance cost of iterating through hundreds or thousands of dates. Weekend days equals total days minus working days.
What is the difference between calendar days and working days?
Calendar days count every day in the interval — Mondays through Sundays alike. Working days count only weekdays (Monday to Friday). For a 30-calendar-day period, working days are typically 20–23 depending on where the weekends fall. The gap between the two figures matters in employment (notice periods often specify 'working days'), banking (cheque clearing times), and project management (sprint durations).
Does the date difference calculator account for Indian public holidays?
No. The calculator counts Monday to Friday as working days and Saturday and Sunday as weekend days, but it does not deduct national or state public holidays. India has approximately 17 gazetted public holidays per year, though the exact list varies by state. For a legally compliant notice-period or SLA calculation, use the working-day total from this tool and then subtract the applicable holidays manually.
Can I use the date difference calculator to calculate notice period end dates?
Yes. Enter your resignation date as the Start Date and the date that falls after your notice period as the End Date to see exactly how many calendar and working days fall in between. Most Indian employment contracts specify notice periods in calendar days (e.g. 60 days or 90 days), so the total calendar days output is the relevant figure. If your contract specifies working days, use the working-day output and manually adjust for public holidays.
How do I calculate a date difference manually without a calculator?
Add the days remaining in the start month, then the full days in each intervening month, and finally the days elapsed in the end month (excluding the end date itself). For example, 15 March to 20 June: 16 days left in March + 30 in April + 31 in May + 19 days in June (up to but not including the 20th) = 96 days. For working days, additionally count the Saturday–Sunday pairs in the interval — each full week removes 2 days.
How many working days are typically in a month in India?
A calendar month typically contains 20 to 23 working days depending on how many weekends fall within it and where the month boundaries lie. February, being the shortest month, tends to have the fewest working days — usually 20. Months with 31 days where the first day is a Monday can reach 23 working days. These figures do not account for public holidays, which can reduce the effective working-day count by 1–3 days per month depending on the state.
What is the difference between a date difference calculator and an age calculator?
An age calculator is a specific type of date difference tool designed to compute how old a person is — it always measures from a date of birth to a reference date (usually today) and focuses on completed years of life. A date difference calculator is a general-purpose tool that measures the gap between any two arbitrary dates and provides a richer set of outputs including working days and total weeks. Use the [Age Calculator](/age-calculator/) when you need an exact age; use this tool for any other date interval.
Can I calculate the date difference between future dates?
Yes. Both the Start Date and End Date fields accept any valid calendar date — past, present, or future. Setting both dates in the future lets you plan ahead: for example, finding how many working days remain before a project deadline, a loan maturity date, or a tax filing due date. The calculator applies the same formula regardless of whether the dates are in the past or future.