Date Calculator
Days between two dates, or N days before/after. Enter as YYYY-MM-DD.
About this tool
The date calculator finds the number of days between two dates and the date a given number of days before or after another. It accounts for leap years and varying month lengths, processes your input in your browser, and never sends it anywhere. Keep these easy-to-miss points in mind when counting days.
Whether "days between" includes the endpoints matters
From the 1st to the 3rd is 2 days counted as an interval, or 3 days counting both endpoints. For inclusive counts like nights or days of a booking or hospital stay, add 1 to the difference. Deciding which count you need up front avoids confusion.
How to tell a leap year
In the Gregorian calendar, a year divisible by 4 is a leap year, except that years divisible by 100 are common years, and years divisible by 400 are leap years again. 2000 was a leap year; 1900 and 2100 are common years. This tool follows this rule and counts periods that include February 29 correctly.
Calendar days, not business days
What it counts is calendar days, not "business days" that exclude weekends and holidays. If you need to count a deadline in business days, account separately for the holidays that fall in between.
Why to enter YYYY-MM-DD
3/4 can read as March 4 or April 3, and the interpretation splits by region. Entering it in year-month-day order like 2026-03-04 prevents such mix-ups.
How to use
- In “Days between two dates”, enter the start and end dates as YYYY-MM-DD to get the difference.
- In “N days before/after”, enter a base date and a number of days (negative = before).
- Results update automatically as you type.
FAQ
Are the dates I enter sent to a server?
No. All day counting runs in your browser, so the dates you enter never leave your device.
Does the difference include the end date?
A difference generally represents the interval (number of days) between two dates. If you need an inclusive count of both endpoints, add 1 to the result.
Are leap years handled correctly?
Yes. Periods that include February 29 are counted correctly according to calendar rules.
Can I work with past dates or negative directions?
Yes. You can find a date a number of days before a base date, and cases where the end date precedes the start date are handled with the appropriate direction.
Can it show differences in hours or smaller units?
This tool specializes in whole-day calculations. For exact differences down to hours, minutes, or seconds, use a timestamp-based tool.
What input format should I use?
Use YYYY-MM-DD (for example, 2026-07-28). Because year, month, and day are explicit, it avoids the regional confusion of swapped month and day.
Related tools
Embed this tool on your site
Copy and paste the code below to embed this tool on your website or blog.
<iframe src="https://tooldesk.dev/embed/en/tools/date-calc" width="100%" height="600" style="border:1px solid #e5e7eb;border-radius:12px;max-width:640px" loading="lazy" title="Date Calculator — ToolDesk" allow="clipboard-write"></iframe>
<p style="font-size:12px"><a href="https://tooldesk.dev/en/tools/date-calc" target="_blank" rel="noopener">Date Calculator</a> by <a href="https://tooldesk.dev" target="_blank" rel="noopener">ToolDesk</a></p>