Everyday · 4 min read

How to Calculate the Number of Days Between Two Dates

The quickest way to find the number of days between two dates is to plug them into our date calculator, but knowing the manual method helps when you need to check a number by hand or explain it to someone else. The core idea is simple: convert both dates to a day count from a fixed reference point, then subtract.

The basic subtraction method

If both dates fall in the same month, subtract the day numbers directly. May 20 minus May 5 is 15 days. Once dates cross a month or year boundary, you need to account for how many days are in each month in between, which is where manual counting gets error prone and a calculator earns its keep.

Counting across months

  • Count the remaining days in the starting month.
  • Add the full days in every month between the two dates.
  • Add the day number reached in the ending month.

For example, from March 20 to June 10: 11 remaining days in March, plus 30 in April, plus 31 in May, plus 10 in June, totals 82 days.

Leap years change the count

A year is a leap year if it is divisible by 4, except century years, which must also be divisible by 400. That means 2000 was a leap year but 1900 was not. Any date range that spans February 29 in a leap year has one extra day compared to the same range in a non-leap year, so always check whether your interval crosses a leap February before trusting a quick mental estimate.

Inclusive versus exclusive counting

Whether the start or end date itself counts as a day depends on what you are measuring. A hotel stay from Monday to Wednesday is usually 2 nights, not 3, because the checkout day is not counted as a night. A rental period or a countdown might instead count both endpoints, giving 3 days instead of 2. Decide which convention applies before you subtract, since this is the most common source of off by one errors.

Counting only business days

Some calculations need working days rather than calendar days, such as a contract that promises delivery in 10 business days. Start by finding the total calendar days, then subtract weekend days that fall inside the range. A rough shortcut is to divide the calendar day count by 7, multiply by 2, and subtract that from the total, then adjust by hand for any partial week at the start or end. Public holidays need to be subtracted separately since they vary by country and by year.

Why the manual method gets messy

Once you are working across several months, mixing leap years, or trying to account for business days only, manual counting becomes tedious and easy to get wrong. The date calculator handles all of this automatically, including leap year adjustments, and gives you the choice of inclusive or exclusive counting so the result matches what you actually need.

Common uses for this calculation

People count days between dates for pregnancy due dates, project deadlines, contract terms, age in days, loan interest periods, and countdowns to events like weddings or trips. A landlord calculating prorated rent for a partial month, a payroll clerk figuring out a pay period, and someone tracking how long an invoice has been overdue are all solving the same underlying problem with different conventions layered on top. In each case, getting the inclusive or exclusive convention right matters more than the raw arithmetic.

Frequently asked questions

How do I calculate the days between two dates by hand?

Count the remaining days in the starting month, add every full month in between, then add the day number reached in the ending month. Adjust for leap years if February 29 falls in the range.

Does the day count include both the start and end date?

It depends on the convention you need. Exclusive counting treats the range like nights in a hotel stay and does not count the final day; inclusive counting adds one extra day by counting both endpoints.

How do leap years affect the number of days between dates?

A leap year adds one extra day, February 29. Any date range that spans that day in a leap year will be one day longer than the same range in a non-leap year.