Date Calculator
Days between two dates, or N days before/after. Enter as YYYY-MM-DD.
About this tool
This date calculator quickly answers two questions: how many days lie between two dates, and what date falls a given number of days before or after another. It is handy for counting the length of a contract period, checking how many days remain until a deadline, or working backward from an event. All calculation happens in your browser, so the dates you enter are never sent to a server.
Date differences and offsets look simple but are easy to get wrong by hand because of leap years and the varying lengths of months. Just enter dates in YYYY-MM-DD format and the tool applies those calendar rules automatically to give you an accurate day count — no flipping back and forth through a calendar.
In difference mode, enter a start and end date to see the number of days between them. In offset mode, enter a base date and a number of days to see the date that many days before or after. Because the unit is whole days, results stay simple and reproducible, unaffected by time-of-day or holiday handling.
When you need to calculate an age or convert to and from a Unix timestamp, pairing this with the dedicated tools is more efficient. Use this date calculator to gauge the distance between dates, and the age calculator to derive an age from a birth date.
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.