The two conventions
When you ask "how many days between June 1 and June 4?", there are two defensible answers depending on how you treat the endpoints.
- Exclusive of both ends (the "difference" answer) - June 1 to June 4 is 3 days apart. This is what a date-subtraction operation returns and what our calculator uses.
- Inclusive of both ends (the "counting" answer) - June 1 to June 4, counting both, is 4 days. This is what hotels and rental agreements often use when they say "your stay is 4 days".
Which one is correct depends on the question. Neither is universally right - they answer different things.
Where each convention shows up
| Context | Typical convention | Why |
|---|---|---|
| Age calculation | Exclusive (difference) | You have lived through the days between the two calendars, not the birthday itself twice. |
| Hotel stays | Inclusive nights | A "3-night" stay checks in on day 1 and checks out on day 4 - three nights slept. |
| Legal notice periods | Varies - read the statute | Some jurisdictions include the day the notice is served, others do not. |
| Project deadlines | Usually exclusive of start day | "You have 30 days to respond" typically means 30 clear days after today. |
| Loan interest | Depends on the contract | Some loans use "actual days" between dates; others use a 360-day year convention. |
Worked examples
Trip planning
Suppose you are flying out on August 12 and returning on August 20. If you ask "how long is the trip?", most people answer 8 days (August 20 minus August 12), and that is the exclusive convention. But if you count the days you will be away (both endpoints), you get 9. Airlines, tour operators, and travel insurance policies each use one or the other - check the fine print.
Contract notice
If a contract says "either party may terminate on 30 days written notice", and notice is served on May 5, the termination date is not automatically June 4. Depending on jurisdiction, the notice period may exclude the day of service, in which case day 1 is May 6 and termination is June 5. When timing is important, ask a lawyer - or at least read the definition of "notice period" in the contract's interpretation section.
Simple age gap
When our calculator says two dates are "3 days apart", it uses the exclusive convention: it counts the transitions from midnight to midnight. That is the same convention every mainstream operating system uses when subtracting one date from another.
How to compute it in your head
For dates within the same month: subtract the day numbers.
- June 10 to June 25 = 25 - 10 = 15 days.
For dates across two months: count the days remaining in the first month, plus the day number of the second.
- June 25 to July 4 = (30 - 25) + 4 = 5 + 4 = 9 days.
For anything longer or across leap years, it is faster to use the calculator.
Using the age-difference tab
The age-difference tab on the calculator doubles as a days-between calculator. Enter the two dates (they do not have to be dates of birth), and the result shows the exact number of years, months, and days between them. If you want just the total day count, multiply the year and month spans out - or read the raw day difference in the exports.
Common bugs to avoid
- Off-by-one from time zones. If one date is stored as a timestamp in UTC and the other as a local calendar date, you can lose or gain a day. Always compare dates as calendar dates, not timestamps.
- Off-by-one from inclusive vs exclusive counting. Decide up-front which convention the question is asking about.
- Approximating "30 days" as a month. Some months are 28, 29, 30, or 31 days. If precision matters, count actual days.
Related reading
For a deeper look at the year-month-day math involved in age calculation, seeHow Age Is Calculated. For the leap-year rules that quietly affect long spans, see Leap Years and Age Calculation.