Skip to content

Date Calculator

Find the gap between two dates or add and subtract time from any date

Count Days, Weeks, and Months Between Any Two Dates

Whether you are tracking a project deadline, planning a leave request, counting down to an event, or working out an invoice period, knowing the exact span between two dates saves guesswork. This calculator gives you the difference in every common unit — total days, full weeks plus remaining days, calendar months, and years — along with the number of business days that excludes weekends.

Date Difference Mode

Pick a start and end date and the calculator shows the span between them. The"include end date" checkbox adds one day to the count, which is useful when both the first and last day should be counted — rental periods, conference schedules, and medication courses often work this way. The result always shows a positive number regardless of which date comes first.

Add and Subtract Mode

Start from any date and add or subtract a specific number of days, weeks, months, or years to find the resulting date. This is how you answer questions like"what date is 90 days from today" or"what was the date 6 months ago." Adding months advances the month number while keeping the same day-of-month, clamping to the last valid day when needed — so January 31 plus one month lands on February 28 (or 29 in a leap year).

Business Days

The business-day count in the difference mode excludes Saturdays and Sundays, giving you the number of working days in a span. This is the number HR systems use for leave balances, the figure project managers use for effort estimates, and the count shipping companies use for delivery windows. Public holidays vary by country and are not excluded automatically — add them to the result manually if your scenario requires it.

Leap Years and Edge Cases

The calculator uses the browser's Date object, which correctly handles leap years, variable-length months, and century boundaries. February 29 appears only in leap years, and month arithmetic that would land on a nonexistent day (like adding one month to January 30) clamps to the last valid day of the target month rather than spilling into the next one.

Common Uses

Freelancers use date differences to calculate billing periods. Travelers count days between booking and departure to track cancellation windows. Developers test date logic by verifying their code matches this calculator's output. Students count days until exams or between semesters. In each case, the calculator replaces error-prone mental math with an instant, verifiable answer.

Privacy

All calculations run locally in your browser. No dates are sent to any server or stored anywhere.

$ faq

How is the difference in months calculated?
The calculator counts full calendar months between the two dates. A month boundary is crossed when the day-of-month of the later date reaches or passes the day-of-month of the earlier date. Remaining days after the last full month are shown separately.
What counts as a business day?
Monday through Friday. The calculator excludes Saturdays and Sundays from the business-day count. Public holidays are not excluded because they vary by country and region — adjust the result manually for your local holidays if needed.
Does"add 1 month" always mean 30 days?
No. Adding 1 month advances the month number by one and keeps the same day-of-month when possible. January 31 plus 1 month becomes February 28 (or 29 in a leap year), because February has fewer days. This matches how most programming languages handle month arithmetic.
Can I calculate with dates in the past?
Yes. Both the difference calculator and the add/subtract mode work with any date the browser supports, including historical dates. The order of the two dates does not matter for the difference — the result is always a positive span.
Does the calculator account for leap years?
Yes. JavaScript's Date object handles leap years correctly. February 29 is valid in leap years, and day counts across year boundaries include the correct number of days for each year involved.
How do I count weeks and remaining days?
The result shows total days and also breaks that into full weeks plus remaining days. For example, 45 days is shown as 6 weeks and 3 days.
Is any data sent to a server?
No. All calculations run client-side in JavaScript using the built-in Date object. Nothing is transmitted or stored.