Time calculator

Date Add & Subtract Calculator

Move a calendar date forward or backward by days, weeks, months, or years with proper month-end handling.

Resulting date

February 28, 2025

How date arithmetic applies intervals to a start date

The calculator starts with a date input field where you enter a calendar date. A dropdown menu selects an operation: Add or Subtract. An amount field accepts a number representing how many of the chosen unit to apply. A unit dropdown allows you to select days, weeks, months, or years. All fields must contain valid input for a result to appear.

Days and weeks are processed as simple calendar-day offsets. Adding one week means adding seven days. Months and years use a different mechanism called clamping to handle the varying number of days in each month. The calculator first moves to the target month and year, then ensures the day-of-month is valid in that month. If the result month is too short for the original day, the calculator clamps to the last valid day of that month. This prevents nonsensical results and maintains a predictable, consistent behavior.

Adding one year to February 29, 2024

Step 1: Target year = 2024 + 1 = 2025
Step 2: Result date = February 29, 2025 (but 2025 is not a leap year)
Step 3: Clamp to last valid day of February 2025 = February 28, 2025

February 29, 2024 is a valid calendar date because 2024 is a leap year (divisible by 4 and not a century year not divisible by 400). Adding one year attempts to land on February 29, 2025, but 2025 is not a leap year, so February has only 28 days. Rather than an error or overflow into March, the calculator clamps to February 28, 2025. This behavior is predictable and prevents the result from unexpectedly changing the month.

This same clamping rule applies to any month-end scenario. January 31 plus one month yields February 28 (or February 29 in a leap year). August 31 plus one month yields September 30 because September has only 30 days. The rule is: move to the target month and year first, then enforce the day-of-month to be valid in that month. The clamped result is always the last valid day of the target month if necessary.

Practical applications: contracts, subscriptions, and billing

Subscription services often need to calculate renewal or expiration dates. A service starting on January 31 renewed annually should technically renew on January 31 the next year. But what if the contract spans a non-leap year to a leap year? Using this calculator ensures consistent, transparent handling. A recurring billing cycle starting on the 31st of any month is shifted to the last day of each target month, preventing surprise date changes.

Project scheduling often uses weeks as the unit. A task starting today running for 13 weeks can be calculated by adding 91 days (13 × 7). Loan or mortgage maturity dates typically use months or years. A loan dated March 15, 2024, with a term of 25 years matures on March 15, 2049 (assuming no day clamping is needed). Subtracting intervals is equally useful: to find the date 30 days before a filing deadline, enter the deadline date, select Subtract, amount 30, and unit days. The result is exactly 30 calendar days earlier.

Leap years, month-end clamping, and limitations

  • Leap years occur every four years, except century years are not leap years unless divisible by 400. The year 2024 is a leap year, 2025 is not, 2000 was a leap year, and 1900 was not.
  • Month-end clamping ensures that adding months always produces a valid date. Some billing systems use different rules (e.g., 'always the same day' or 'end of month' explicitly), so verify this calculator matches your contract's method before using results for legally binding calculations.
  • The calculator uses the Gregorian calendar and local civil dates. It does not account for historical calendar reforms or proleptic (extended backward) dates before the calendar was adopted.
  • Weeks are always exactly seven calendar days. This works correctly across month and year boundaries without clamping because seven days always land in a valid date.
  • Daylight-saving time does not affect date arithmetic. The calculator processes dates at local noon, which avoids most midnight-boundary issues, but the operation is purely calendar-based regardless of clock changes.
  • Very large intervals (adding 1000 years or subtracting into negative years) are technically processed but may exceed browser limitations or produce dates outside common use cases. Stick to intervals that remain within typical date ranges.

Frequently asked questions

What is one month after January 31?

February 28 (or February 29 in a leap year). January has 31 days, but February has fewer, so the day clamps to the last valid day of February.

How many days is one week?

Exactly seven calendar days. Weeks never need clamping because seven days always produce a valid date.

Can I subtract an interval?

Yes. Select Subtract and enter a positive amount. Subtracting three months moves the date back to the same day three months ago.

What about February 29 in a non-leap year?

If you add or subtract to land on February 29 in a non-leap year, the result clamps to February 28. This keeps the month stable and the day as close as possible.

Does daylight saving time change the result?

No. The calculator uses calendar dates, not times of day. Daylight saving transitions do not affect date arithmetic.

Will this work for my billing or contract deadline?

Verify that your contract uses the same month-end-clamping rule. Some systems use different conventions for recurring dates on the 31st. When in doubt, check your agreement before relying on this calculator for legally binding dates.