ThisCalculator

Everyday

Days Between Dates: Calculate the Exact Number

Updated · Standard formula, shown below

Days between dates 1 days
Days including both dates
2 days
Result
Start date day number
1 days
You entered
End date day number
2 days
You entered

Days Between Dates: Calculate the Exact Number

To get the days between dates, enter a start date and an end date; this calculator returns the elapsed calendar days from the first date to the second. It treats the start date as the starting point, so a pair of consecutive dates is one day apart—not two.

Formula

This calculator uses day numbers: each date is represented by its position on a continuous day count. The elapsed days are the end date’s day number minus the start date’s day number. To count both endpoint dates inclusively, add one.

  • Start date day number (start): the start date’s integer position in the chosen continuous calendar-day count, in days.
  • End date day number (end): the end date’s integer position in the same count, in days.
  • Days between dates (days): end − start, in days.
  • Inclusive count (inclusive): end − start + 1, in days, when the dates are in chronological order and both are included.

The input fields are day-number stand-ins because the calculator block accepts numbers, not calendar date strings. In practice, convert each calendar date to its day number using the same calendar system, or use a date-picker calculator that performs that conversion. The worked example uses day numbers 1 and 2, the block’s exact defaults.

Worked Example

With start = 1 and end = 2:

  1. Elapsed days = end − start = 2 − 1 = 1 day.
  2. Inclusive count = end − start + 1 = 2 − 1 + 1 = 2 days.

The first result is one day between the two consecutive day numbers. Counting both numbered dates gives two dates.

How to Count Days Between Calendar Dates

For real dates, first decide what you mean by “between.” The standard elapsed-day count measures the duration from the beginning of the start date to the beginning of the end date. It does not count the start date as a whole day. For example, from March 10 to March 11 is one elapsed calendar day, although two date labels appear if you list March 10 and March 11.

For a date-only calculation, a reliable method is to convert both dates to day numbers on the same calendar and subtract. Many spreadsheet programs also provide date subtraction: enter valid dates in separate cells and subtract the earlier date from the later one. Check that the cells are stored as dates rather than text, and use the same date order and calendar for both.

To count every calendar date touched, including the first and last, add one to the elapsed result when the end date is on or after the start date. This inclusive count is useful for counting days on a schedule, but it is not the same as measuring elapsed time.

Examples and Inclusive Counting

Suppose a trip begins on April 3 and ends on April 8. Subtracting the dates gives five elapsed days. Listing April 3, 4, 5, 6, 7, and 8 gives six calendar dates. Neither answer is inherently wrong; each answers a different question.

  • Elapsed days: end date minus start date. April 3 to April 8 = 5 days.
  • Inclusive date count: elapsed days plus one when both endpoints are included. April 3 through April 8 = 6 dates.
  • Same date: elapsed days = 0. An inclusive count of that single date = 1.

If the dates are reversed, subtraction produces a negative number, indicating that the second date comes earlier. For a length of time regardless of order, take the absolute difference; for a chronological interval, put the earlier date first. The calculator’s inclusive formula assumes the end is not earlier than the start.

Leap Years, Time Zones, and Daylight Saving

Calendar dates do not all have the same distance from one another in every month. February has 28 days in a common year and 29 in a leap year, so a correct date calculation must account for leap days. In the Gregorian calendar, a year is a leap year if it is divisible by 4, except century years must also be divisible by 400. Thus, 2000 was a leap year and 1900 was not.

A date-only difference counts transitions between calendar dates; it is not necessarily a count of 24-hour periods. When measuring exact elapsed time between timestamps, include the time of day and define the time zone. Daylight-saving changes can make a local calendar day shorter or longer than 24 hours. For example, midnight-to-midnight across a clock change may span 23 or 25 elapsed hours while still covering one calendar date transition.

For timestamps in different time zones, compare equivalent instants, not just the displayed clock readings. For a simple number of dates on a calendar, choose one calendar and follow its date boundaries consistently.

Common Mistakes and Limits

  • Mixing elapsed and inclusive counts: decide whether you want the duration or the number of dates listed, then use the matching result.
  • Adding one automatically: do so only when both endpoint dates are meant to count. A same-date elapsed interval is zero, not one.
  • Ignoring the year: dates in different years require the full dates; month and day alone are not enough, especially around leap years.
  • Reversing the dates: a negative difference usually means the end precedes the start, not that the calculation failed.
  • Confusing dates and timestamps: date subtraction does not answer how many exact hours or minutes passed unless times and time zones are included.

The supplied numeric block computes differences between day numbers; it does not parse month names, validate a date, or determine a day number from a calendar date. Use a date-aware tool or convert dates consistently before entering the values. Its inclusive result is intended for dates in chronological order.

Frequently Asked Questions

Do you count the start date when calculating days between dates?
Usually not for elapsed days: subtract the start date from the end date. Add one only when you want an inclusive count that includes both the start and end dates.

How many days are between two consecutive dates?
There is one elapsed day between consecutive dates. If you count both date labels, there are two dates in the inclusive count.

How do I count days including both dates?
For dates in chronological order, subtract the start date from the end date and add one. For example, April 3 through April 8 includes six dates.

Does the calculation include leap days?
A calendar-aware calculation does. A February 29 that falls within the interval counts as a calendar day; day-number conversion must use a calendar system that recognizes leap years.

Is the number of days the same as the number of 24-hour periods?
Not always. A date difference counts calendar-day boundaries. Exact elapsed hours can differ across daylight-saving changes or when timestamps use different time zones.

Related

Formula used
in start | Start date day number | days | 1 | 0
in end | End date day number | days | 2 | 0
out days | Days between dates | days | end - start | 0
out inclusive | Days including both dates | days | end - start + 1 | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.