Everyday calculations
Date calculator
Find the calendar difference between two dates, or add and subtract years, months, weeks and days. Month-end adjustments follow the tool’s stated calendar rules.
Works locally in your browser
How this tool works
This tool covers the two everyday date questions people search for separately: how far apart two dates are, and what date results from moving a set span of time away from a starting date.
Inputs and definitions
- Calculation chooses whether you are comparing two dates or adjusting one date by a span.
- Start date and end date are the two Gregorian calendar dates compared in difference mode. The end date must be on or after the start date.
- Inclusive adds one day to the total so both the start and end date are counted, useful for questions like how many days a booking covers.
- Direction, and years, months, weeks, days describe the adjustment applied to the start date when adding or subtracting time.
Methodology
For a difference, the calendar interval counts completed years from the start date, then completed months from that point, then any remaining days, the same way a person would count on a calendar. Total days and complete weeks come from the exact number of proleptic Gregorian day positions between the two dates, independent of the calendar-interval breakdown.
calendar interval = completed years + completed months + remaining daysFor an adjustment, years and months are applied together first, then weeks and days are applied together. This order is fixed because calendar operations do not always commute: adding a month before adding a day can land on a different date than adding the day first. When a target month has fewer days than the start date, the result clamps to the last valid day of that month.
Assumptions
- Every date is interpreted on the proleptic Gregorian calendar, so the same counting rules apply even to dates earlier than a given country's historical switch to that calendar.
- Dates are handled as calendar values only. No clock time or time zone offset participates in either calculation, so the same two dates always produce the same result regardless of where you are.
- Adjustment amounts are limited to a range that keeps every result within the four-digit year span this tool supports.
Worked examples
Find the gap until a December deadline
Choose difference mode with a start date of 14 September 2026 and an end date of 25 December 2026, leaving inclusive off.
Count completed calendar months
No full year separates the two dates. Counting forward from 14 September finds three completed months, landing on 14 December, with 11 days remaining to reach 25 December.
Count the exact day total
Independently of the calendar interval, the exact day positions of the two dates are 102 days apart, which is 14 complete weeks and 4 extra days.
The calendar interval is 0 years, 3 months and 11 days, and the total elapsed time is 102 days (14 complete weeks and 4 days).
Add three months to a 30 November start date
Choose add/subtract mode, set the start date to 30 November 2025, choose add, and enter 3 in the months field.
Apply the month adjustment
Three months after November lands in February 2026. February 2026 has 28 days, so the 30th does not exist that month.
Clamp to the last valid day
The result clamps to the last day of the target month rather than rolling over into March.
The result date is 28 February 2026, a Saturday.
Limitations and common mistakes
This tool performs calendar arithmetic only. It does not know about business days, public holidays, or organization-specific working-day rules, so a result that needs to exclude non-working days requires separate adjustment.
Frequently asked questions
Why does the calendar interval differ from the total day count?
The calendar interval counts completed years, months and days the way a person reads a calendar. The total day count is a fixed measurement independent of month lengths. Months range from 28 to 31 days, so the two figures answer different questions and are not interchangeable.
What does the inclusive option change?
Turning inclusive on adds one day to the total so both the start and end date are counted, matching questions like how many nights or days a span covers rather than how much time passed between two instants.
Why is the order years, months, weeks and days applied in fixed?
Calendar addition is not always commutative. Adding a month first and then a day can land on a different date than adding the day first, especially near the end of a month. Fixing the order keeps the result predictable and repeatable.
Does this tool account for weekends or public holidays?
No. Every result is plain calendar arithmetic. If you need to exclude weekends or holidays, treat this result as a starting point and adjust separately for your organization's working-day rules.
Sources
- Leap Years — National Institute of Standards and Technology (accessed )
- Temporal.PlainDate — Ecma International TC39 (accessed )
Method and content record
The method, examples and limitations describe how this tool works. Recorded checks do not establish independent professional review.
Record attribution, date and versions
Record attribution: ToolsOrigin calculation review; introduction guidance checked by Codex.
Record date: .
Content version 1.0.1. Engine version 1.0.0.