CALCULATOR WORKSPACE
DATE & TIME / CALCULATOR

Date Difference Calculator

Count elapsed days or days until a selected future date.

YOUR INPUTS

Calculate Date Difference

01 / 02
Enter as YYYY-MM-DD or choose from the calendar.
Enter as YYYY-MM-DD or choose from the calendar.
YOUR ANSWER

Results

02 / 02
=

Your result will appear here

Enter values above, then select Calculate result. Your inputs stay in this browser.

THE BASICS

Counting the calendar days between two dates, with or without both ends

A date difference answers how much calendar time has elapsed between two dates. It is useful for deadlines, travel plans and schedules where leap days matter.

Set the start date to today and the end date to a future event to answer a days-until question. The same subtraction also measures any historical interval. The page shows an inclusive count for situations such as an itinerary or attendance list, where both named dates appear on the list. A days-until countdown normally uses the elapsed count, excluding today; an inclusive list counts both endpoints.

Choose Today as the start for a days-until snapshot, or enter any two dates for an interval. Elapsed and inclusive counts appear side by side, with whole weeks and leftover days visible.

YOUR INPUTS

How the start date, end date and inclusive count change the total

The tool subtracts one date from the other, so the main decisions are which two dates you pick and whether your situation counts both of them.

Start date
The day the count runs from; it is not itself counted in the elapsed result. For a countdown, set it with the calendar's Today button and recalculate on later days, because the figure does not tick down on its own. An end date earlier than the start is rejected rather than turned into a negative number, so swap the two if you see that message.
End date
The final date, which is counted. Leap years show up here: January 1, 2024 to January 1, 2025 is 366 days, while the same dates one year later give 365. A deadline expressed with a time of day, such as 5 p.m. on the 30th, still counts only to the date, so partial days are ignored.
Inclusive count
Elapsed days plus one, for cases where both named dates occupy a slot. A conference that runs from the 3rd through the 5th fills 3 days, although only 2 days elapse between those dates. Hotel nights work the other way and match the elapsed figure, a common source of off-by-one errors when booking.
Whole weeks and remaining days
The elapsed total split into seven-day blocks plus a remainder, which always add back to the total. A 365-day year is 52 weeks and 1 day, which is why a date's weekday moves forward by one in an ordinary year and by two when February 29 falls inside the span. These blocks do not line up with Monday-to-Sunday calendar weeks.
Midnight UTC convention
Both dates are read as midnight UTC, so a daylight-saving change between them cannot add or drop a day. The trade-off is that time of day is invisible: Monday evening to Tuesday morning still counts as 1 day. Use the Time Duration Calculator when hours and minutes matter.

Steps

  1. Choose the start date; use Today in the calendar if you want a days-until countdown from today.
  2. Choose the same or a later end date, such as an event or deadline.
  3. Calculate to see elapsed days, whole weeks and an inclusive count.

Reading tip: The calendar cards show the selected endpoints. The seven-day row highlights leftover days after full weeks are removed.

PRACTICAL USES

Day counts this subtraction settles quickly

01

Project deadlines

Count calendar days left between a start date and a due date.

02

Travel planning

Compare elapsed and inclusive dates for an itinerary.

03

Event countdowns

Break a future interval into whole weeks and extra days.

04

Record keeping

Measure the exact calendar gap across months or leap years.

THE METHOD

How the calculation works

FormulaAt a glance
Elapsed days=End UTC midnight − start UTC midnight86,400,000 ms
Where:
start / end
The two valid calendar dates entered, with the end date on or after the start date.
86,400,000
Milliseconds in a UTC day, avoiding local daylight-saving changes.
floor / mod
Round down to whole weeks / keep the days left after full weeks.
+ 1
Count both named dates when an inclusive total is needed.
COMPLETE FORMULA & VARIATIONS
Elapsed days = (end UTC midnight − start UTC midnight) ÷ 86,400,000
Whole weeks = floor(elapsed days ÷ 7); extra days = elapsed days mod 7
Inclusive days = elapsed days + 1

For days until an event, choose Today as start and the future event as end. The elapsed count excludes today; the inclusive count includes both dates.

What every part means

start / end
The two valid calendar dates entered, with the end date on or after the start date.
86,400,000
Milliseconds in a UTC day, avoiding local daylight-saving changes.
floor / mod
Round down to whole weeks / keep the days left after full weeks.
+ 1
Count both named dates when an inclusive total is needed.

Calculate it step by step

1. Elapsed days
Days = (end UTC midnight − start UTC midnight) ÷ 86,400,000

Each calendar date is represented at UTC midnight to avoid local clock shifts.

2. Week breakdown
Whole weeks = floor(days ÷ 7); remainder = days mod 7

Seven days form a week even when the dates cross a month or year.

3. Inclusive count
Inclusive days = elapsed days + 1

Add one only when you intend to count both the starting and ending dates.

Input strings are validated as real calendar dates before subtraction. The tool rejects an end date before the start date instead of silently returning a negative duration.

WORKED EXAMPLE

See it in practice

01 Sample inputs
Start date
2024-02-28
End date
2024-03-01
02 Put values into the formula

February 28 → March 1, 2024 crosses February 29: 2 elapsed days, 0 whole weeks + 2 extra days, or 3 inclusive days.

03 Verified result2 daysElapsed days / days until selected end
  • Days until end from selected start2 days
  • Whole weeks0
GOOD TO KNOW

Interpretation & limitations

How to read your result

The whole-week count and highlighted extra-day cells add to the elapsed result. A zero-day result means both selected dates are identical, while the inclusive count is one.

Where this estimate stops

The tool does not remove weekends or holidays. It also cannot determine hours between events because no time of day or time zone is entered.

COMMON QUESTIONS

Frequently asked questions

01Does the calculator include the first date?

The main elapsed-day result excludes it. An inclusive count is shown separately.

02Will daylight-saving time change the count?

No. Calendar dates are compared at midnight UTC, so daylight-saving shifts do not add or remove a day.

03What is the result for the same start and end date?

Zero elapsed days and one inclusive day.

04Does a leap day count?

Yes. February 29 counts as an ordinary calendar day when it lies between the selected dates.

05Are weekends excluded?

No. The result is a calendar-day difference, not a business-day count.

06How do I count days until an event?

Choose Today for the start date, then choose a future end date. The elapsed result excludes today; it is a snapshot that changes when you calculate again on a later day.

07Can it show the gap in months and days instead of only days?

Not on this page; it reports days, whole weeks and an inclusive count. The Age Calculator accepts any earlier date in its birth-date field and returns completed years, months and days up to its as-of date, so it can express the same interval in calendar units.

KEEP EXPLORING

Related calculators