Skip to content
Free Calculator

Date Difference Calculator

Find the calendar and total-day difference between two dates.

How many days are there between two dates?

The gap between two dates is the number of whole days from the earlier date to the later one, which can also be shown as years, months and days.

Formula: Total days = (end date − start date) ÷ 86,400,000 milliseconds. The calendar breakdown counts complete years, then complete months, then days using real month lengths. If 'always show a positive difference' is on, reversed dates are measured by absolute distance; if it is off, the result keeps the negative sign.

Read the guide: how to calculate your age

Start date is required.

End date is required.

Press Calculate, or Enter in any field.

Difference from 1 January to 1 February

January 1 to February 1, 2025 is 31 elapsed days.

Choose both dates.

What this calculator does

Compare any two valid dates in years, months, days, total days, and weeks.

Use it to turn Start date, End date, Always show a positive difference into a checked result you can compare, copy, or rerun with different assumptions.

The page shows the formula, a numeric worked example, and the assumptions that affect this everyday calculation.

Inputs and what they mean

Start date
— date value.
End date
— date value.
Always show a positive difference
— yes/no value.

How to use it

  1. Choose a start and end date.
  2. Choose whether reversed dates should stay negative.
  3. Read total days and the calendar breakdown.

Formula

The elapsed-day result is exclusive of the start instant and reaches the end date, so the same date equals 0 days.

Weeks and days are derived from the absolute day count: whole weeks = floor(|days| ÷ 7), remainder days = |days| mod 7.

Both dates are treated as calendar dates, not local clock times, so daylight-saving clock changes do not change the day count.

Total days = (end date − start date) ÷ 86,400,000 milliseconds. The calendar breakdown counts complete years, then complete months, then days using real month lengths. If 'always show a positive difference' is on, reversed dates are measured by absolute distance; if it is off, the result keeps the negative sign.

Inputs used: Start date, End date, Always show a positive difference.

Edge handling: Start date is required.; Start date must use a valid calendar date.; End date is required.; End date must use a valid calendar date..

Worked example

Difference from 1 January to 1 February

  1. Start with 2025-01-01 and 2025-02-01.
  2. Subtract the start date from the end date in days: February 1 minus January 1 = 31 days.
  3. Convert 31 days into weeks and days: 31 ÷ 7 = 4 weeks with 3 days left.
  4. The calendar breakdown is 0 years, 1 month, and 0 days because it spans one complete calendar month.

Reading the result

The headline figure is the main answer. Any breakdown underneath shows the parts that make it up, so you can check the working and see what changes when you adjust an input.

Limitations and assumptions

  • The result is a calendar-date difference, not a time-of-day duration.
  • The main elapsed-day result does not include both endpoints unless you add a day yourself for an inclusive counting rule.
  • Regional business-day, holiday, or legal-deadline rules are not applied here; use the business days calculator when weekends and entered holidays matter.
  • Inputs outside the supported range are rejected rather than forced into a result.
  • The result depends on the values you enter for this date difference calculator; it does not supply missing rates, rules, prices, dates, or assumptions for you.

Common questions

How many days are there between two dates?

The gap between two dates is the number of whole days from the earlier date to the later one, which can also be shown as years, months and days. Check the formula, example, and limitations on this page before using the result for a real everyday decision.

Are both dates included?

The main result measures elapsed time between the two dates, so identical dates equal zero days. If you need an inclusive count for scheduling, add one day to the elapsed result when the start and end dates should both be counted.

Can the date difference be negative?

Yes. Turn off the positive-difference option and place the earlier date second. The signed result is useful when you need to know whether a deadline is before or after a reference date.

Does the calculator handle leap years and month lengths?

Yes. The total-day count uses actual dates, and the calendar breakdown uses real month lengths. That is why a one-month span can be 28, 29, 30, or 31 days depending on the dates involved.

How do I use the Date Difference Calculator?

Enter the required values for Start date, End date, Always show a positive difference. The calculator applies the formula on this page and shows the main result with any supporting breakdown so you can check the arithmetic.

What formula does the Date Difference Calculator use?

Total days = (end date − start date) ÷ 86,400,000 milliseconds. The calendar breakdown counts complete years, then complete months, then days using real month lengths. If 'always show a positive difference' is on, reversed dates are measured by absolute distance; if it is off, the result keeps the negative sign. The visible formula section above lists the calculation path and the edge cases the page handles, so the result can be checked without relying on the form alone.

Cite this page

APA

Free Calculator. (n.d.). Date Difference Calculator. https://freecalculator.tech/tools/date-difference-calculator

MLA

"Date Difference Calculator." Free Calculator, https://freecalculator.tech/tools/date-difference-calculator.

Link

Date Difference Calculator — Free Calculator, https://freecalculator.tech/tools/date-difference-calculator

Related tools

Calculate exact age in years, months, days, and total elapsed days.

Everyday

Calculate elapsed hours and minutes between two times, including overnight.

Everyday

Count working days between two dates.

Everyday

Total hours across multiple work shifts.

Everyday

See live time remaining or elapsed.

Everyday

Convert local times between time zones.

Everyday

People also use