Counting Days Between Dates: Off-by-One Traps and Fixes
Why Monday to Friday is 4 days or 5 depending on what you're counting, how leap years and month lengths trip people up, and how to count correctly.
How many days are there from Monday to Friday? Four, if you’re counting the gaps — that’s how hotel nights work. Five, if you’re counting the days themselves — that’s how a court counts the length of a sentence. Both answers are correct. The trouble starts when two people picture different versions of the question and only discover it at checkout, or in a contract dispute.
Programmers call this the fencepost error: a fence with 10 sections needs 11 posts. Everyone else just calls it “wait, I thought the deadline was Friday.”
Between the dates, or including both?
The rule of thumb: if you’re measuring distance, exclude the end date. If you’re measuring duration of occupancy, include it.
- Hotel stays count nights: check in on the 10th, out on the 13th — you pay for 3.
- Car rentals usually count days: pick up on the 10th, return on the 13th — that’s often billed as 4.
- Deadlines are ambiguous by design, which is why lawyers write “no later than 23:59 on June 30” instead of “within 30 days.”
- Age counts completed intervals: you’re not 40 until the birthday arrives, no matter how close it gets.
Our Days Between Dates Calculator makes the choice explicit — a checkbox switches between the two counts, so Monday to Friday shows 4 or 5 and you can see exactly which one you’re getting.
Leap years, quietly adding a day
Any span that crosses February 29 is one day longer than the “same” span in an ordinary year. The rule itself has two exceptions stacked on top of each other: a year divisible by 4 is a leap year, unless it’s divisible by 100, unless it’s also divisible by 400. So 2024 was a leap year, 1900 wasn’t, and 2000 was. People writing date code by hand get this wrong often enough that it has its own bug category.
You rarely need to think about it — until you’re computing interest for a 365-day loan that quietly ran 366 days, or wondering why two identical-looking date ranges differ by one.
Months are a unit that won’t sit still
“Two months from now” sounds precise and isn’t. January 15 plus two months is March 15, fine. But January 31 plus one month lands on a date that doesn’t exist. Spreadsheets solved this by clamping: Excel’s EDATE function returns February 28 (or 29), and most date libraries followed. Our calculator uses the same convention, so its month counts match what a spreadsheet would tell you.
This is also why “how many months between these dates” and “how many days between these dates” can feel inconsistent. 30 days might be one full month or might not be, depending on where in the calendar those 30 days fall. February 1 to March 1 is one month in 28 days; July 1 to July 31 is 30 days and zero full months.
Weekdays are not business days
The calculator also splits the span into weekdays (Monday–Friday) and weekend days. One honest caveat: weekdays are not the same as business days. New Year’s Day lands on a weekday most years, and no analytics tool knows which regional holidays your office observes. Treat the weekday number as a ceiling and subtract holidays yourself.
Stop counting on your fingers
Next time you need the exact gap — notice periods, visa windows, project timelines, how long you’ve actually owned that car — open the Days Between Dates Calculator. It shows total days, weeks, calendar months, and the weekday/weekend split at once, and the end-date checkbox settles the off-by-one argument before it starts.