Date Calculator
Days between two dates on the Gregorian calendar.
This date calculator finds the number of days between two calendar dates, correctly accounting for leap years and varying month lengths on the Gregorian calendar. It is useful for project timelines, rental periods, travel planning, notice periods, and any situation where you need an exact day count rather than an estimate.
Contracts and policies often define terms in calendar days rather than business days, so getting the exact count right — including how you treat the start and end dates — genuinely matters for deadlines, warranties, and legal notice periods.
On this page
Counting Days Between Two Dates
The calculator converts both dates into a single day count from a common reference point, then subtracts to find the difference — the same underlying method most spreadsheet and programming date libraries use internally.
For example, from 1 January 2026 to 31 January 2026 is exactly 30 days difference (an "exclusive" count that treats the span as elapsed days), even though the range covers 31 calendar days if you count both the first and last day (an "inclusive" count).
Inclusive vs Exclusive Counting
This distinction trips up more people than any other part of date math. An exclusive count (the default most tools return) measures the gap between two dates, similar to subtracting one number from another. An inclusive count adds one extra day, treating both the start and end date as counted days — common in rental agreements ("a 7-day rental" usually means 7 inclusive days) and vacation-day tallies.
If you need an inclusive count, simply add 1 to the exclusive difference this calculator returns. When in doubt, test a known one-day window by hand (for example, Monday to Tuesday) to confirm which convention a specific tool or contract is using.
Project managers tracking sprint length often want exclusive elapsed days between milestones, while HR teams counting leave sometimes want inclusive calendar days. Naming the convention in your spreadsheet column header — "days (exclusive)" — prevents teammates from comparing incompatible numbers.
Leap Years and the Gregorian Calendar
February has 29 days instead of 28 in leap years, which follow the rule: divisible by 4 is a leap year, except century years, which must also be divisible by 400 (so 2000 was a leap year, but 1900 and 2100 are not). Long date ranges spanning multiple Februaries need this rule applied correctly to avoid off-by-one-or-more errors, which this calculator handles automatically.
Adding or Subtracting Days From a Date
Beyond finding the gap between two dates, the same underlying logic lets you add a number of days to a starting date to find a future date, or subtract days to find a past one — useful for calculating a due date, a warranty expiry, or a deadline that falls "45 days from" a given date.
Because month lengths are irregular, adding "30 days" will not always land on the same day-of-month as adding "one month" would — always use day-based addition, like this tool, when a contract or deadline is specifically stated in days rather than months.
Real-World Deadline Examples
A 30-day return policy starting on 15 March ends on 14 April if counted exclusively (30 elapsed days after the purchase date), but on 15 April if the merchant counts inclusively (purchase day plus 29 more). When a retailer’s wording is ambiguous, test both conventions against a short known window before relying on the result for a high-value return.
Rental agreements often describe stays in inclusive nights: checking in Friday and checking out Sunday is commonly billed as two nights, even though the calendar span covers three dates. Travel planners counting vacation days for leave requests should confirm whether their employer counts weekends and public holidays inside or outside the total.
Legal notice periods — "14 days’ written notice" — are almost always calendar days unless the contract explicitly says business days. If your agreement does specify business days, you will need a separate business-day calendar that skips weekends and holidays; this calculator counts every Gregorian calendar day in the range.
If you need someone’s exact age in years, months, and days on a particular cut-off date rather than a raw day count, switch to the Age Calculator and use its “as of” field.