How to Calculate Days Between Dates
Counting the days between two dates sounds trivial until a deadline, a hotel booking, or a visa stay depends on it. Most disagreements come down to one question: do you count the start date, the end date, or both? This guide explains the method, works through real date ranges, and covers leap years, business days, and the counting rules contracts often use.
- By CalcStackerReviewed by the CalcStacker team
- Updated
- 6 min read
Step by step
- 1
Write down both dates with the year
Note the earlier date as the start and the later date as the end. Include the year, because it decides whether February has 28 or 29 days.
- 2
Count the days left in the start month
Subtract the start day from the number of days in that month. From January 15, that is 31 − 15 = 16.
- 3
Add the full months in between
Add the length of each complete month between the two dates.
- 4
Add the days in the end month
Add the day number of the end date. The total is the exclusive count: the end date minus the start date.
- 5
Adjust for your counting rule
Add 1 if both the start and end dates should count. For business days, remove weekends and any holidays.
The basic method: subtract the dates
The number of days between two dates is the end date minus the start date. Counted this way, the start date is not included and the end date is. It's the same answer a spreadsheet gives when you subtract one date cell from another.
Days between = end date − start dateInclusive days = (end date − start date) + 1
By hand, work month by month: count what's left of the start month, add every full month in between, then add the day of the end month. Converting the total to weeks is simple division by 7. Converting to months is not, because months range from 28 to 31 days; the average Gregorian month is about 30.44 days.
Worked examples
January 15 to March 10, 2026
- Days left in January: 31 − 15 = 16
- All of February 2026 (not a leap year): 28
- Days in March up to the 10th: 10
- Total: 16 + 28 + 10 = 54
54 days, or 7 weeks and 5 days. If both January 15 and March 10 count, the inclusive answer is 55.
The same span in a leap year
- February 1 to March 1, 2027: 28 days
- February 1 to March 1, 2028: 29 days, because 2028 is a leap year
Any range that includes February 29 gains a day. A full calendar year is 365 days, or 366 when it contains February 29.
Business days over the holidays: Thursday, December 17, 2026 to Monday, January 4, 2027
- Calendar days, counting both ends: 19
- Remove 6 weekend days (December 19–20, December 26–27, January 2–3): 13 weekdays
- Remove Christmas Day (Friday, December 25) and New Year's Day (Friday, January 1): 11
11 business days if both the start and end days count, or 10 if the start day is excluded. Observed holidays vary by country and employer, so check which ones apply to you.
Inclusive vs. exclusive counting
Most off-by-one arguments are really about this. Neither convention is wrong; they answer different questions.
When a contract or policy matters, read how it defines the period instead of assuming. Phrases like within 30 days of, no later than 30 days after, and for a period of 30 days can lead to different final dates.
- Exclusive (end − start) measures elapsed time. Use it for ages, interest accrual, loan terms, and countdowns.
- Nights are exclusive too: a hotel stay checking in June 12 and out June 15 is 3 nights, even though it touches 4 calendar dates.
- Inclusive (+1) fits when every day in the range is used: event durations, leave requests, per-day rentals, and visa stays. The Schengen 90/180-day rule, for example, counts both the day you enter and the day you leave.
- Deadlines often follow their own rule. Many legal systems exclude the day of the triggering event and include the last day; under the US Federal Rules of Civil Procedure, if that last day is a weekend or legal holiday, the period runs to the next day that isn't.
Leap years and month lengths
The Gregorian calendar adds February 29 in years divisible by 4, except century years, which are leap years only when divisible by 400:
Month arithmetic needs extra care. Adding one month to January 31 has no exact answer, because February 31 doesn't exist; most tools return the last day of February instead. If you need a precise result, count days rather than months.
- 2024 and 2028 are leap years.
- 1900 and 2100 are not: they're divisible by 100 but not by 400.
- 2000 was a leap year because it's divisible by 400.
Business days and working days
Business days usually means Monday to Friday, excluding public holidays. That's the definition behind most shipping estimates, bank transfer times, and many notice periods. Working days can differ: in some countries the working week runs Sunday to Thursday, and shift workers may have their own patterns.
To count business days by hand, start with the calendar count, subtract 2 days for each full week, handle the partial week day by day, then subtract any holidays that fall on weekdays. Holidays that land on a weekend are often observed on a nearby weekday, so use a calendar of observed holidays for the right country and year.
Common mistakes
Watch for these when a day count matters:
- Mixing inclusive and exclusive counts, either within one calculation or when comparing your answer with someone else's.
- Assuming every month has 30 days. Real months run from 28 to 31 days, and the errors build up: twelve 30-day months make 360 days, five short of a real year.
- Forgetting February 29 in a range that crosses a leap day.
- Subtracting a holiday that falls on a weekend, which removes the same day twice.
- Using timestamps instead of dates in code. A day with a daylight saving change is 23 or 25 hours long, so dividing milliseconds by 86,400,000 can round to the wrong whole number. Compare calendar dates or UTC midnight values instead.
Which calculator to use
Use the Days Between Dates Calculator for a straight calendar count between two dates, and the Date Duration Calculator when you want the gap in years, months, and days. The Business Day Calculator and Working Days Calculator exclude weekends. To find a date a set number of days before or after another, use the Add or Subtract Days Calculator.
Frequently asked questions
One tool is almost certainly counting inclusively (both the start and end date) and the other exclusively (end minus start). From January 15 to March 10, 2026, you'll see 55 from the first and 54 from the second. Look for an include end date option or check how the tool describes its count.
Counting March 3 as day zero, day 30 is Thursday, April 2, 2026. If your contract counts March 3 itself as day one, the deadline is a day earlier, April 1. If a rule moves deadlines that land on weekends or holidays, check the weekday as well.
No. Century years are leap years only when divisible by 400. 2000 was, but 2100, 2200, and 2300 are not, so a range crossing February 2100 has one fewer day than a simple every-four-years rule suggests.
100 ÷ 7 = 14 remainder 2, so 100 days is 14 weeks and 2 days. Weeks convert cleanly because every week has 7 days. Months don't, so a day count turned into months is only approximate unless you count calendar months from a specific start date.