Skip to content
Free time tool

Date difference calculator

This calculator counts how many calendar days fall between a start date and an end date. It also shows the same gap in weeks and in hours. People use it for deadlines, countdowns, ages of projects and checking billing periods.

  • Runs in your browser
  • Free, no account needed
  • Copy or download the result
Private: runs on this device

Input

21 characters

Result

Days: 2
Weeks: 0.285714285714
Hours at 24 hours per day: 48
The start date is not counted. A negative result means the end date is earlier.

Example

Input
2024-02-28
2024-03-01
Result
Days: 2
Weeks: 0.285714285714
Hours at 24 hours per day: 48
The start date is not counted. A negative result means the end date is earlier.

How to use the date difference calculator

  1. Type the start date on the first line as YYYY-MM-DD.
  2. Type the end date on the second line in the same format, such as 2024-03-01.
  3. Press Run to see the days, weeks and hours.
  4. Use Copy result or Download to keep the answer.

How it works

Enter exactly two nonempty lines, each a real date in years 0001 to 9999.

The start date is not counted, so 2024-02-28 to 2024-03-01 is 2 days in a leap year.

A negative result means the end date is earlier than the start date.

Dates are handled in UTC on the Gregorian calendar, so daylight saving changes never add or remove an hour.

Hours are shown at 24 hours per day, and weeks may include a decimal part.

Everything runs in your browser. Your input is not uploaded or stored.

Questions and answers

How do I calculate the number of days between two dates?

Put the earlier date on the first line and the later date on the second line, both as YYYY-MM-DD, then press Run. The tool subtracts the dates and reports whole calendar days.

Does the count include both the start and end date?

It counts the end date but not the start date. If you want to include both, add 1 to the result.

Does it count only weekdays?

No. It counts every calendar day. To step through Monday to Friday days only, use the business day calculator.

Why might the hours look different from a clock?

The tool uses 24 hours per day for every day. A real local clock can show 23 or 25 hours on a daylight saving change day.

All 100 SnowRock tools