How many days until a deadline? How long was a project? How many working days does a notice period cover? Date arithmetic looks like simple subtraction, but months have different lengths, leap years add a day, and “within 30 days” can mean different things in different contexts. Our date difference calculator does the work instantly; this guide explains the rules so you know which answer you need.
The basic method
The difference between two dates is the number of midnights you cross going from one to the other. That’s how spreadsheets and calculators count:
Example: 1 January 2026 to 1 March 2026. January has 31 days and February 2026 has 28, so the difference is 59 days.
Example: 7 October 2026 to Christmas Day, 25 December 2026. Remaining days of October after the 7th: 24. November: 30. December up to the 25th: 25. Total: 79 days.
In a spreadsheet, dates are stored as serial numbers, so =B1-A1 (or =DAYS(B1, A1) in Excel and Google Sheets) gives the same results.
Month lengths
A quick reminder: 30 days have September, April, June and November; February has 28 (29 in a leap year); all the rest have 31. The “knuckle” trick works too: make a fist, and each knuckle is a 31-day month, each gap a shorter one.
Inclusive vs exclusive counting
The plain difference counts one of the two end dates. Whether you should add a day depends on what you’re measuring:
| Situation | Count | Example |
|---|---|---|
| Elapsed time, age, interest | Exclusive (plain difference) | 1–10 March = 9 days |
| Event or leave covering both dates | Inclusive (+1) | Holiday 1–10 March = 10 days |
| Hotel stays | Nights = difference | Check in 1 March, out 10 March = 9 nights |
| Legal and contract deadlines | Defined by the contract or law | Read the wording carefully |
Many legal systems exclude the day of the triggering event when counting a period “within X days”, and if the final day falls on a weekend or public holiday, the deadline may move to the next working day. Don’t assume. If money or rights depend on it, check the specific rules or ask a professional.
Leap years
The Gregorian calendar adds 29 February in leap years to keep it aligned with the solar year (about 365.2422 days). The rule:
- A year divisible by 4 is a leap year…
- …except years divisible by 100, which are not…
- …except years divisible by 400, which are.
So 2024 and 2028 are leap years; 2026 and 2027 are not; 2000 was a leap year; 2100 will not be. That gives an average year of 365.2425 days.
Leap years matter whenever a period crosses the end of February: 1 January to 1 March is 59 days in 2026 but 60 days in 2028. A full year from 1 March 2027 to 1 March 2028 has 366 days because it includes 29 February 2028.
Business days and holidays
Working days exclude weekends and public holidays. The basic weekday count is simple: each full week has five. For irregular ranges, count full weeks, then the leftover days.
Example: October 2026 starts on a Thursday and has 31 days. Four full weeks give 20 weekdays; the remaining three days (Thursday 29, Friday 30, Saturday 31) add 2, giving 22 weekdays. October has no bank holidays in the UK, so that’s also the number of working days in England.
Example with holidays: December 2026 has 23 weekdays. In England and Wales, Christmas Day falls on Friday 25 December and Boxing Day on Saturday 26, so the substitute bank holiday is Monday 28 December. That leaves 21 working days.
Holiday calendars differ by country and even region:
- England and Wales: 8 bank holidays a year; Scotland has 9 and Northern Ireland 10.
- United States: 11 federal holidays, though private employers choose which to observe, and some states add their own.
- When a holiday falls on a weekend, many countries move it to a weekday (a “substitute day”); others don’t.
Use the business days calculator to count or add working days while excluding weekends and the relevant holidays.
Adding days vs counting days
“Delivery within 10 working days” from Monday 5 October 2026 means counting forward 10 weekdays, skipping weekends and holidays: Tuesday 6 is day 1, and day 10 is Monday 19 October 2026. Counting forward is a different operation from counting the days between two dates, and the off-by-one question applies again: does the order day itself count?
Calculating exact age
Age is counted in completed years, then months, then days.
Example: born 15 March 1990; today is 7 October 2026.
- Years: 15 March 2026 is the last birthday → 36 years.
- Months: from 15 March to 15 September 2026 → 6 months.
- Days: 15 September to 7 October → 15 remaining days of September + 7 = 22 days.
Result: 36 years, 6 months and 22 days. Our age calculator also shows the total in days, weeks and months.
People born on 29 February celebrate on 28 February or 1 March in non-leap years. For legal purposes, some jurisdictions treat them as reaching a new age on 1 March in a common year and others on 28 February, so check the local rule if it matters (for example, for a driving licence or a contract).
Common mistakes
- Forgetting leap years when the range crosses February.
- Mixing inclusive and exclusive counting within one calculation.
- Assuming every month has 30 days (“one month” from 31 January is not 30 days later).
- Ignoring regional holidays, e.g. Scottish or US state holidays.
- Time zones and daylight saving time: when working with timestamps rather than dates, a “day” can be 23 or 25 hours long.
Checklist
- Decide whether you need elapsed days (exclusive) or calendar days covered (inclusive).
- Check whether the range crosses 29 February in a leap year.
- For working days, exclude weekends and the correct holiday calendar for the location.
- For deadlines, follow the contract’s or law’s own counting rule.
- Double-check results with a calculator, especially across year boundaries.