Date & Time

Date Difference Calculator

Date difference calculator: count the exact number of days between two dates. Leap years handled, negative results for reversed dates, runs in browser.

  • 100% free
  • No sign-up
  • Private: runs on your device
  • Updated

Enter your details

Runs in your browser. Nothing you enter is uploaded or saved.

Your result

Your result, a full breakdown and charts appear here as you type.

What is the Date Difference Calculator?

How many days until a deadline, how long a loan or rental lasted, or how many days have passed since an event? This date difference calculator answers with a single, exact count of calendar days between a start date and an end date. Leap years and month lengths are handled automatically, so February 2024, with its 29 days, is counted correctly without you having to remember it.

The count excludes the start date, which matches how elapsed time is normally measured: the same date gives 0 and consecutive dates give 1. If the end date is earlier than the start, the answer is negative, which tells you the direction at a glance. The tool counts days only and does not convert the result into weeks, months or years, or skip weekends and holidays.

How to use the Date Difference Calculator

  1. Check the Start date field, which is filled with today's date automatically, and change it if you are counting from another day (YYYY-MM-DD).
  2. Enter the later date in the End date field.
  3. Press Calculate to see the number of days.
  4. If you need to include both the start and end days, add 1 to the result yourself.
  5. Copy the result or press Reset for a new pair of dates.

Key features

  • Exact count of elapsed calendar days
  • Leap years and month lengths handled automatically
  • Signed result: negative when the end date is earlier
  • Start date defaults to today; unaffected by daylight-saving or time-zone changes
  • Validates real dates between the years 1000 and 9999

Why use this date difference calculator

  • Count down to exams, events or due dates
  • Check notice periods and rental durations
  • No manual counting across months
  • Instant and private, with nothing uploaded

Formula used

Elapsed days = (UTC end date−UTC start date)/86,400,000.

Date Difference Calculator examples

1

Across a leap day

Input: Start date: 2024-02-28, End date: 2024-03-01

Result: 2 days
Signed elapsed calendar days; excludes the start date.

2024 is a leap year, so 29 February sits between the two dates.

2

A whole calendar year

Input: Start date: 2026-01-01, End date: 2026-12-31

Result: 364 days
Signed elapsed calendar days; excludes the start date.

The start date is not counted, so add 1 if you want all 365 days of 2026 included.

3

End date before the start date

Input: Start date: 2026-12-25, End date: 2026-10-30

Result: -56 days
Signed elapsed calendar days; excludes the start date.

The minus sign shows the end date comes 56 days before the start date.

Important notes before you rely on the result

  • Dates are calculated on the calendar in UTC, so time zones and daylight-saving changes never shift a day.
  • Day counts exclude the start date and include the end date. Public holidays are not removed from weekday counts.
  • People born on 29 February have their birthday counted on 28 February in non-leap years.

Date Difference Calculator: frequently asked questions

Does the result include both the start and end dates?

No. The tool counts elapsed days, so the start date is excluded and the end date is reached. From 1 January to 2 January is 1 day. For an inclusive count, for example the number of days in a leave application that covers both dates, add 1 to the result.

Can it count only working days?

No. It counts every calendar day, including Saturdays, Sundays and public holidays such as Diwali or Independence Day. If your deadline is defined in working days, as some office, bank or court timelines are, subtract the weekends and holidays that fall in the period yourself, using your organisation's holiday list.

Why is my answer negative?

A negative number means the End date is earlier than the Start date. The size of the number is still the correct gap. Swap the two dates if you want a positive result. This signed output is useful for checking whether a date is in the past or the future relative to another.

Can I get the difference in weeks or months?

The result is in days only. Divide by 7 for weeks. Months are tricky because they vary from 28 to 31 days, so there is no exact conversion; for completed years between two dates, such as an age, the Age Calculator is a better fit.

Which date range does it support?

Both dates must be real calendar dates with years from 1000 to 9999, written as YYYY-MM-DD. Impossible dates such as 2026-02-30 or 2026-13-01 are rejected with a message. The arithmetic uses calendar dates only, so time zones and daylight saving do not affect the count.

Results are estimates for general information, not financial, medical, legal, tax, or property advice. Confirm important figures with the relevant institution or a qualified professional.