DATDate & Time

Date Difference

Find the exact difference between two dates in years, months, and days. Also shows total days, weeks, and hours between the dates.

Try an example

How It Works

Formula

totalDays=Δt86400000\text{totalDays} = \frac{\Delta t}{86400000}

totalHours=totalDays×24\text{totalHours} = \text{totalDays} \times 24

Where

Δt\Delta t

Milliseconds between the earlier and later date (UTC)

totalDays\text{totalDays}

Whole calendar days between the two dates

totalHours\text{totalHours}

Total hours between the two dates

8640000086400000

Milliseconds in one day (24 × 60 × 60 × 1000)

Enter two dates. The calculator determines which is earlier, then computes the difference broken down into years, months, and days. It also calculates the total number of days, weeks, and hours between the two dates.

Frequently Asked Questions

Related Calculators

Ready to Calculate?

Free calculators.