Date & Time

Date Calculator

Add or subtract days, months, and years, or find the difference between two dates.

Calculations use the Gregorian calendar. Month-end dates clamp to the last valid day (e.g., Jan 31 + 1 month = Feb 28 or 29).

Your data stays private

This tool runs directly in your browser. The content you enter is processed locally and is not sent to TechFixGen servers. No account or signup is required.

Date Calculator guide

This tool performs calendar-date arithmetic using the Gregorian calendar. It has two modes:

Mode A — Difference between dates

Enter a start date and an end date. The tool returns:

  • Total elapsed days — the number of 24-hour periods between the two dates.
  • Weeks + days — the same duration expressed as whole weeks and remaining days.
  • Years / months / days — a calendar breakdown (see below).
  • Direction — whether the end date is before or after the start date.

Mode B — Add or subtract a duration

Enter a start date, choose Add or Subtract, then specify any combination of years, months, weeks, and days. The tool returns the resulting date.

How month arithmetic works

Adding or subtracting months can produce dates that don’t exist (e.g., January 31 + 1 month). This tool uses day clamping: the day is clamped to the last valid day of the target month.

  • Jan 31 + 1 month → Feb 28 (or Feb 29 in a leap year)
  • Mar 31 − 1 month → Feb 28 (or Feb 29 in a leap year)
  • Aug 31 + 1 month → Sep 30

This rule is deterministic and matches the behaviour of most calendar applications. Weeks and days are applied after month/year arithmetic, using exact 7-day and 1-day steps.

Leap years

The Gregorian leap-year rule applies: years divisible by 4 are leap, except centuries not divisible by 400. February 29 exists only in leap years. If a calculation lands on February 29 of a non-leap year, it is clamped to February 28.

Date difference semantics

  • Elapsed days — Oct 1 → Oct 2 = 1 day. The count is the number of midnights crossed.
  • Same date — difference is 0 days.
  • Reversed order — the absolute difference is returned, and the direction is reported.

This tool does not count inclusively (Oct 1 to Oct 2 inclusive = 2 days). If you need inclusive counting, add 1 to the result.

Calendar breakdown (years / months / days)

The years/months/days breakdown uses calendar arithmetic, not division by 365/30. It computes the difference by comparing year, month, and day components directly, borrowing across month/year boundaries as needed. This matches how humans count age or tenure.

Limitations

  • This is a calendar-day calculator. It does not support business days, holidays, or work-week masking.
  • Time-of-day and timezones are ignored — all inputs are treated as whole calendar dates (YYYY-MM-DD).
  • The Gregorian calendar is used for all dates, including those before its adoption in 1582.
  • Supported range is roughly 275,000 years on either side of 1970 (JavaScript Date limits).

Related tools

Frequently asked questions

Does this upload my dates?

No. All calculations happen locally in your browser. Your dates are never sent to TechFixGen servers, saved to browser storage, or included in analytics events.

What is the difference between 'total days' and 'weeks + days'?

'Total days' is the absolute number of elapsed days between the two dates. 'Weeks + days' expresses the same duration as whole weeks and the remaining days (e.g., 10 days = 1 week 3 days).

Why does Jan 31 + 1 month = Feb 28 (or 29)?

February has only 28 days (29 in a leap year). The tool clamps the day to the last valid day of the target month. This is called 'day clamping' and matches how most calendar apps behave.

What happens if I add 1 month to Mar 31?

March 31 + 1 month = April 30 (April has 30 days). The day is clamped to the last valid day of April.

How does the tool handle February 29?

If you add 1 year to Feb 29 2024, the result is Feb 28 2025 (clamped, because 2025 is not a leap year). If you add 4 years to Feb 29 2024, the result is Feb 29 2028 (a leap year).

Does the difference count inclusively (Oct 1 to Oct 2 = 2 days)?

No. The tool counts elapsed days: Oct 1 → Oct 2 = 1 day. If you need inclusive counting, add 1 to the total days.

What if the end date is before the start date?

The absolute difference is returned (the same number of days), and the result indicates 'End is before start'. The weeks/days and years/months breakdowns are always positive.

Can I calculate business days or exclude weekends?

No. This tool calculates calendar days only. It does not know about holidays, weekends, or work schedules.

Does the tool account for timezones or time-of-day?

No. All inputs are treated as whole calendar dates (YYYY-MM-DD) in the Gregorian calendar. Time-of-day and timezones are ignored. For timezone-aware conversions, use the <a href="/tools/timezone-converter" className="text-brand hover:underline">Timezone Converter</a>.

What calendar system is used?

The Gregorian calendar (proleptic — applied to all dates, including before 1582). Leap years follow the standard rule: divisible by 4, except centuries not divisible by 400.

Can I subtract more time than the start date (go before year 0)?

The supported range is roughly ±275,000 years around 1970 (JavaScript Date limits). Calculations outside this range will report an error.

Is 'years / months / days' calculated by dividing days by 365/30?

No. The breakdown uses calendar arithmetic: it compares year, month, and day components directly, borrowing across month/year boundaries. This matches how humans count age (e.g., from Feb 28 to Mar 1 is 0 years, 0 months, 2 days — not 2/365 years).

Does the tool validate that dates exist?

Yes. Invalid dates (e.g., Feb 30, 2026-13-01) are rejected with an error message.