← Back to blog

How to Calculate Days Between Two Dates

How many days until the wedding? How long did the project actually take? How many days late is that invoice? All three are the same math problem — counting the days between two dates — and it's a problem with a famous trap: depending on how you count, two people can look at the same two dates and get answers one day apart. Both are "right." Here's why, and how to get the number you actually need.

Quick summary: There are two valid ways to count. Elapsed days measures the gap between dates — July 6 to July 17 is 11 days. Inclusive counting counts every date touched, including both ends — July 6 to July 17 is 12 days. Neither is wrong; they answer different questions. Our Days Between Dates calculator counts elapsed days — enter July 6 and July 17 and you'll get 11. Need both end dates counted? Just add 1 day to the result.

The Off-by-One Trap

Say a hotel stay runs from Monday, July 6, 2026 to Friday, July 17, 2026.

Elapsed days asks: how much time passes between these dates? Count the jumps from one date to the next — July 6 to 7 is one day, and so on. The answer is 11 days. This is what you want for durations: nights in a hotel, days until a deadline, someone's age in days, interest accrual.

Inclusive counting asks: how many dates does this span touch? Count every date from the 6th through the 17th, both ends included. The answer is 12 days. This is what you want when every calendar day matters: days of a rental you're charged for, days of coverage on an insurance policy, days of a school term.

The difference is always exactly one day, and it's the source of nearly every dispute about this calculation. When someone says "10 days from now," the first question to ask is: does day one mean today, or tomorrow?

How to Count It Manually

For short spans, count squares on a calendar — just decide up front whether you're including both end dates.

For longer spans, add up the pieces month by month. From January 15 to March 15, 2026: January 15 to February 15 is 31 days (January has 31), February 15 to March 15 is 28 days (February 2026 has 28), so the elapsed total is 59 days.

Two edge cases to watch. First, leap years: run that same calculation in 2028 and the answer becomes 60, because February 2028 has 29 days. Any span that crosses February 29 of a leap year picks up an extra day, which is why "one year = 365 days" is only usually true. Second, month lengths: the alternating 30/31 pattern (plus February's exceptions) is where hand calculations most often slip.

Manual counting is fine across a couple of weeks. Across months — or anything touching a February — it's easy to be off by a day or two without noticing. The Days Between Dates calculator handles month lengths and leap years automatically, and if you need more precision than whole dates, its "include time of day" option counts down to hours and minutes.

Calendar Days or Business Days?

Everything above counts calendar days — every day, weekends and holidays included. If your question is about working time ("how many work days until the deadline?"), the answer changes substantially: a 30-calendar-day span typically contains only 20–22 working days. For that version of the question, use the Work Days Calculator, which skips weekends and can exclude US federal or custom holidays. And if you're not sure which type of day your contract or deadline means, our guide to calendar days vs business days breaks down when each applies.

Related Calculators

FAQ

Do I count both the first and the last day? It depends on the question. For durations and gaps (elapsed days), count only one end. For spans where every calendar date matters, count both. The two answers always differ by exactly one day. Our calculator counts elapsed days — the gap between the dates — so if you need both end dates included, add 1 to its result.

How many days are there between the same date in two consecutive years? Usually 365. If the span crosses February 29 of a leap year, it's 366. That's why a "one-year" loan term and a "365-day" term aren't always identical.

Does the calculation account for leap years? Counting by hand, you have to remember them yourself — February has 29 days in 2028, 2032, and so on. The calculator handles leap years automatically.

Can I count days between a past date and today? Yes — the math is identical in both directions. Set the earlier date as the start and today as the end, and you'll get the age of anything: a contract, an open invoice, a sourdough starter.

What if I need hours and minutes, not just days? Whole-date counting treats both dates as full days regardless of clock time. For precise gaps — flight bookings, time-stamped deadlines — turn on the calculator's "include time of day" option and it will count down to the hour and minute.

More from CalcsDaily