How Many Days Between Two Dates?

Counting the days between two dates looks trivial until you have to decide whether to include the first day, the last day, or both. That single choice changes the answer by one, and it is the source of most date-counting errors.

The basic subtraction

Subtract the earlier date from the later one. From 15 January to 4 July in a non-leap year: January has 16 remaining days after the 15th, February 28, March 31, April 30, May 31, June 30 and July 4. The total is 170.

A date library or calculator does this instantly. Doing it by hand is where mistakes creep in, especially around month ends.

Enter two dates to get days, weeks and months.

Open the Date Difference Calculator →

Inclusive versus exclusive

Exclusive counting measures elapsed time: the number of days from the start of one date to the start of the other. Inclusive counting includes both the first and last day, which adds one.

If an event runs from 1 March to 3 March, exclusive counting gives 2 days elapsed, while inclusive counting gives 3 days of event. Both are correct for different questions.

Leap years

A period that includes 29 February is one day longer than the same calendar dates in a non-leap year. That matters for anything spanning February in a leap year.

The rule for leap years in the Gregorian calendar: divisible by 4, except centuries not divisible by 400. So 2000 was a leap year and 1900 was not.

Weeks and months

Dividing days by 7 gives weeks, usually with a remainder. 170 days is 24 weeks and 2 days.

Months are not a fixed number of days, so a month count needs a rule: calendar months between the same day numbers, or an average of 30.44 days. Most calculators use calendar months and report the remainder in days.

Business days

Business days exclude weekends and public holidays. A period of 170 calendar days might contain about 120 business days, depending on where the holidays fall and which country's holidays apply.

If you need business days for a contract or a delivery estimate, use a tool that knows the holiday calendar for the relevant jurisdiction.

Where this matters

Common mistakes

A reliable method

Write both dates in ISO format, year-month-day, and subtract. ISO order removes ambiguity between day-first and month-first conventions, which is a separate source of errors in international communication.

Then decide explicitly whether you want inclusive or exclusive counting, and state it. The calculator does the arithmetic; the convention is your choice.

Counting days for contracts

Notice periods are usually counted from the day after the notice is served, and the last day may be excluded if it falls on a weekend or holiday. That is a legal convention, not an arithmetic one, and it differs by jurisdiction.

When a deadline matters, write the dates out in full rather than relying on a count of days, and state whether the first and last days are included. Ambiguity in a notice period is expensive to resolve.

Days in each month, for mental arithmetic

Thirty days has September, April, June and November. February has 28, or 29 in a leap year. All the rest have 31. Reciting that takes five seconds and prevents almost every hand-calculation error.

A worked example end to end

From 15 January to 4 July, non-leap year: 16 days left in January, 28 in February, 31 in March, 30 in April, 31 in May, 30 in June and 4 in July. The total is 170 days, which is 24 weeks and 2 days.

If the same period spans a leap year, February contributes 29 and the total becomes 171. That single day is the whole difference, and it is easy to lose when the calculation is done quickly.

Frequently asked questions

Does the day count include today?

It depends on the convention. Elapsed time usually excludes the start day; an inclusive count includes both ends.

How many days are in a year?

365, or 366 in a leap year.

How do I count business days?

Exclude weekends and public holidays. Use a calculator that knows the holiday calendar for your country.

Sources

More free tools

Related guides