Utilumo
LightDarkSystem
Guide1 min readUpdated August 26, 2026

How to calculate the number of days between two dates

Short answer

Subtract the earlier calendar date from the later one to get the number of days, then divide by 7 for full weeks and a remainder. Decide whether to count both endpoints (inclusive) or just the gap (exclusive) — the choice changes the result by one day.

Days between two dates

The difference between two dates is the count of calendar days from the start date to the end date. Working in whole calendar days keeps the result stable across time zones and daylight saving changes, because there is no time-of-day component to drift.

Calculate the difference

  1. Enter the start datePick the earlier calendar date.
  2. Enter the end datePick the later date. It must be on or after the start date.
  3. Read the resultSee total days, full weeks, and the remaining days after those weeks.
Try it: Date Difference CalculatorCalculate days and weeks between two dates locally — nothing is uploaded.Open tool
Inclusive vs exclusive countingExclusive counting measures the gap between the dates: 1 January to 2 January is 1 day. Inclusive counting also counts the start day, so the same range is 2 days. Use inclusive when both endpoints represent days you occupy — like counting nights on a trip or billable days.

Weeks and remaining days

  • Total days divided by 7 gives the number of full weeks
  • The remainder is the leftover days after those whole weeks
  • Example: 20 days is 2 full weeks and 6 remaining days
  • Leap years are handled automatically — 29 February is a real calendar day

References

Questions

What is the difference between inclusive and exclusive days?

Exclusive counts the gap between the two dates; inclusive also counts the start date, adding one day. Choose based on whether the first day itself should be counted.

Are leap years counted correctly?

Yes. A calendar-based calculation includes 29 February whenever the range crosses a leap day, so the day count stays accurate across leap years.

Do time zones affect the result?

No. Counting whole calendar dates avoids time-of-day and daylight saving effects, so the number of days is the same wherever you are.

Keep reading