Skip to content
ToolFarmToolFarm
Data

Date Difference Calculator

Calculate the difference between two dates: total days, weeks and months, plus a years, months and days breakdown. Order independent, leap-year safe, with optional inclusive counting. In your browser.

3 min read

What this tool does

Enter a start date and an end date to see how far apart they are. Date Difference Calculator gives you the exact total in days, the same span as weeks and as whole months, and a years, months and days breakdown the way you read an age. It is leap-year safe and order independent: if the end date comes first, it still shows the size of the gap. Turn on inclusive counting when you want both endpoints to count, like the number of days a trip spans rather than the number of nights. Everything runs in your browser, nothing is uploaded.

tools.date-difference-calculator.relatedMention

What you can use it for

  • Count the exact number of days until a deadline, a launch or an event.
  • Work out someone's age, or any span, as years, months and days.
  • Measure how many full weeks or whole months sit between two dates.
  • Count the days a trip or a billing period spans, with both endpoints included.
  • Check a duration across a leap year without worrying about February 29.

How to use it

  1. Type the start date in the form YYYY-MM-DD, for example 2026-07-02.
  2. Type the end date the same way. The result updates as you type.
  3. Read the total days, weeks, whole months and the years, months and days breakdown.
  4. Turn on counting both endpoints if you want the start and end day to both count.
  5. Copy the summary if you need it elsewhere. The dates can be in any order.

Everything runs inside your browser. No file is uploaded to any server. See more tools in this field.

Other tools people reach for in the same flow.

Data

Frequently asked questions

How is the years, months and days breakdown calculated?

It counts the most full years that fit between the dates, then the most full months, then the leftover days. Month lengths differ, so a date like January 31 plus one month lands on February 28 (or 29 in a leap year), which is the same rule date libraries use. This is why the breakdown and the raw total days describe the same span in two different ways.

Does the order of the dates matter?

No. The calculator always reports the size of the gap, so swapping the start and end dates gives the same numbers. When the end date is earlier than the start, it notes that it is showing the absolute difference.

What does inclusive counting mean?

By default the total is the number of days between the dates, which is the number of nights. Inclusive counting adds the end day itself, so Monday to Friday reads as 5 days rather than 4. Use it when both the first and last day should count, like a trip length or a billing period.

Are leap years and February 29 handled?

Yes. The day count is exact and includes February 29 whenever the span crosses a leap day, so a one-year span over 2024 is 366 days. The months breakdown clamps to the end of a shorter month when needed, so month-end dates never produce an impossible result.

Do I need a specific date format?

Use YYYY-MM-DD, for example 2026-07-02. Slashes like 2026/07/02 also work. The dates are read as plain calendar dates and all the math is done in UTC, so your timezone never shifts a result by a day. An entry that is not a real date, like February 30, is flagged so you can fix it.

Date Difference Calculator · ToolFarm