Date Arithmetic: Calculating Intervals, Durations, and Deadlines
Calculate date intervals, business days, age from birthdate, project deadlines, and durations between dates. Understand date math for planning and tracking.
How Date Arithmetic Works
Date arithmetic — calculating the interval between two dates, adding or subtracting days from a date, or determining a future deadline — seems straightforward but involves surprising complexity. Months have different lengths, leap years add a February 29th every four years (with exceptions), and daylight saving time shifts can affect time-based calculations. Understanding these rules is essential for project planning, age calculation, contract enforcement, billing cycles, and any application that depends on correct dates.
Modern programming and spreadsheet systems handle date arithmetic by converting dates to a serial number — the number of days since a reference date (January 1, 1900 in Excel, January 1, 1970 in Unix systems). This makes date math as simple as integer addition and subtraction, but the complexity lies in how the results are displayed and interpreted.
Calculating the Difference Between Two Dates
The simplest date arithmetic finds the number of days between two dates. For dates in the same month, subtract the day numbers: January 15 to January 25 = 10 days. For dates crossing month or year boundaries, count the remaining days in the start month, add full months in between, and add days from the end month.
For example, from March 15 to June 20: March 15 to March 31 = 16 days (inclusive), April = 30 days, May = 31 days, June 1 to June 20 = 20 days. Total = 16 + 30 + 31 + 20 = 97 days. The same calculation can be verified using a date calculator tool or spreadsheet formula. For the difference in months and years, the calculation is more nuanced — the result depends on whether you count calendar months or approximate 30-day months.
Swipe sideways to compare columns.
| Start Date | End Date | Days | Weeks | Months (calendar) |
|---|---|---|---|---|
| Jan 1, 2026 | Jan 15, 2026 | 14 | 2 | 0.5 |
| Jan 15, 2026 | Mar 15, 2026 | 59 | 8.4 | 2.0 |
| Jan 1, 2026 | Dec 31, 2026 | 364 | 52 | 12.0 |
| Jun 15, 2025 | Jun 15, 2026 | 365 | 52.1 | 12.0 |
| Jan 1, 2024 | Jan 1, 2025 | 366 | 52.3 | 12.0 (leap year) |
Business Days and Working Days
Business date arithmetic excludes weekends (Saturday and Sunday) and optionally holidays. This is critical for contract deadlines, legal filings, payment terms, and project schedules. The calculation removes weekends, then subtracts any holidays that fall within the date range. The exact formula is: Business Days = Total Days — (Weekend Days) — (Holidays).
For a project starting Monday June 1, 2026 with a 15 business day timeline: add 15 weekdays = arrives at Monday June 22 (3 weeks of weekdays = 15 business days). The count excludes weekends completely — June 6, 7, 13, 14, 20, and 21 are not counted. International projects must also account for different weekend days in some countries (Friday-Saturday in many Middle Eastern countries).
Swipe sideways to compare columns.
| Start Date | Calendar Days | Weekends | Business Days | End Date |
|---|---|---|---|---|
| Monday, Jun 1 | 7 | 2 | 5 | Friday, Jun 5 |
| Monday, Jun 1 | 10 | 3 | 7 | Wednesday, Jun 10 |
| Thursday, Jun 4 | 5 | 2 | 3 | Monday, Jun 8 |
| Friday, Jun 5 | 3 | 2 | 1 | Monday, Jun 8 |
Calculating Age from Birthdate
Age calculation is a specialized form of date arithmetic that depends on whether the birthdate has occurred in the current year. The basic algorithm: Age = Current Year — Birth Year — (1 if current date is before birthday, otherwise 0). A person born on October 15, 1990 is 35 on June 1, 2026 because their birthday has not yet occurred in 2026: 2026 — 1990 — 1 = 35. After October 15, 2026, they turn 36.
For more precise age in years, months, and days, the calculation subtracts year-by-year, month-by-month, and day-by-day. This is the age displayed on most official documents and is calculated by date calculators automatically. The exact age at any given date can be determined using a date difference tool with the output broken into years, months, and days components.
Adding or Subtracting Time from a Date
Adding days, weeks, months, or years to a date is straightforward when using calendar months: adding 1 month to January 31 gives February 28 (or 29 in a leap year), not March 3 — date systems handle this by clamping to the last day of the target month if needed. Adding 90 days to a starting date accounts for actual calendar days including month boundaries and leap years.
Contract and legal deadline calculations often follow specific rules. The Federal Rules of Civil Procedure exclude the day of the event, count intermediate days, and include the final day unless it falls on a weekend or holiday — in which case it extends to the next business day. These nuances matter for legal and regulatory compliance and are rarely captured by simple date calculators without specifically designed business date logic.
Calculate Dates
Date CalculatorUse our Date Calculator to find the difference between dates, add or subtract time, calculate business days, compute exact age, and determine deadlines.Frequently Asked Questions
What is the difference between calendar days and business days?
Calendar days count every day including weekends and holidays. Business days count only Monday through Friday, excluding public holidays. A 30-calendar-day timeline is approximately 22 business days. Always confirm which type of day count applies to your contract, legal filing, or project plan.
How do I calculate the last day of a month?
The last day of a month depends on the month and year. Use the mnemonic "30 days has September, April, June, and November. All the rest have 31, except February alone which has 28 days clear and 29 in each leap year." For February, check if the year is a leap year using the divisible-by-400 or divisible-by-4-not-100 rule.
Why did my date calculation seem off by one day?
Date calculations can be off by one day due to inclusive vs exclusive counting. If you ask "how many days from January 1 to January 2", the answer can be 1 (difference) or 2 (inclusive of both dates). Similarly, "90 days from today" may be interpreted as starting today (including today) or starting tomorrow. Always clarify the counting convention.