Date calculator
Find the number of days between two dates, or add and subtract days from a date.
Days between two dates
Add or subtract days from a date
On this page
How the days-between calculation works
This calculator counts full calendar days elapsed between your start date and end date, using JavaScript's native date math so that leap years and varying month lengths are always handled correctly. The result is exclusive of the start date and inclusive of the end date — meaning the start day itself isn't counted, but the day you land on is. For example, the gap between January 1 and January 3 is shown as 2 days, not 3. If you need an inclusive count where both endpoints count as full days, simply add 1 to the total shown.
Alongside the raw day total, the calculator also breaks the gap into weeks and remaining days, and — when the start date is earlier than the end date — into completed years, months and days, similar to how age is calculated on a calendar. If your end date falls before your start date, the calculator still shows a positive day count with a clear note explaining the order, instead of a confusing negative number.
Common uses for date calculations
Date math shows up constantly in everyday planning. Common uses include working out how many days remain until a deadline or event, counting your age in total days for forms or curiosity, mapping out project timelines by adding a number of working or calendar days to a start date, and building simple countdowns to birthdays, anniversaries or launch dates. The add/subtract mode is especially handy for figuring out a due date, renewal date or reminder date a set number of days from today.
Frequently asked questions
Does this count the start and end date?
The days-between result counts full calendar days elapsed from the start date to the end date. The start date itself is not counted, but the end date is included in the total. From January 1 to January 3 is shown as 2 days. If you need both endpoints counted, add 1 to the result.
Does it account for leap years?
Yes. The calculator uses JavaScript's native Date object, which automatically accounts for leap years, so any February 29 between your two dates is included correctly.
What happens if the end date is before the start date?
The calculator shows the absolute number of days between the two dates and adds a note that the end date comes before the start date, rather than showing a negative number.
Can I subtract days from a date instead of adding them?
Yes. In the add/subtract section, enter a negative number of days to move backward from your chosen date, or a positive number to move forward.
How does the months and years breakdown work?
When the start date is earlier than the end date, the calculator also breaks the gap down into completed years, completed months and remaining days, the same method used for exact age calculations.
This calculator is provided for general reference. Always double-check critical date calculations for legal, payroll or medical deadlines.