Decision tools built for clarity

Date Difference Calculator

Find the calendar difference between dates, or add and subtract a day count.

Enter the required values, select the applicable options, and calculate.

Methodology

Formula or transformation

Computes a signed Gregorian interval or moves a date by an exact whole-day count.

Variables

  1. Mode
  2. Start date
  3. End date
  4. Whole-day count
  5. Calendar year, month, and day components

Units

  • Calendar date
  • Day
  • Month
  • Year

Rounding policy

All date arithmetic uses whole calendar days; no fractional date is displayed.

Difference mode reports signed calendar components and total days; arithmetic modes move the start date by an exact whole-day count.

Find the calendar difference between dates, or add and subtract a day count.

Reviewed sources

  1. PHP Documentation — DateTimeInterface::diff calendar difference Reviewed on 2026-09-07

Formula review history

  1. Initial formula and source review.

    Reviewed 2026-09-07 for formula version gregorian-date-operations-v1

Assumptions

  • Inputs are interpreted using the displayed units and options.
  • The calculation follows the methodology and factors listed in the sources.

Limitations

  • Display rounding can hide additional decimal places.
  • The calculation cannot add accuracy that is absent from the submitted inputs.

Worked example

Adding one day to 28 February 2024 returns 29 February 2024.

Frequently asked questions

Are the calculations deterministic?

Yes. The same valid inputs and options produce the same canonical result.

Can I use decimal values?

Use decimal values where the displayed input accepts them.