DoesWhatAnswersSlangEmojisCalculatorsTriviaPlayBlog

Trivia Questions and Weird Facts

Math

How Do You Count the Days Between Two Dates?

Short answerSubtract the earlier date from the later one, but count by calendar days, not just numbers. The trick is that months vary from 28 to 31 days and leap years add a day, so most people convert both dates to a day count (like days since Jan 1) and subtract those.

What Does "Days Between Dates" Actually Mean?

The short answer is subtraction, with a catch. If you subtract the day numbers alone (say, 15 minus 3), you get a wrong answer whenever a month boundary falls between them. A real count has to walk the calendar. That is why the reliable method is to turn each date into a single day number and subtract.

What Is the Formula for Days Between Two Dates?

Convert each date to an ordinal day count: days since a fixed starting point, like January 1 of year 1. Then subtract.

You do not have to build that by hand. Excel's DAYS function, Google Sheets, and most programming languages all do this internally. The free calculator on this page skips the arithmetic entirely.

Worked Example

How many days from March 3 to July 15, same year, non leap year?

SegmentDays
Rest of March (31 minus 3)28
April30
May31
June30
July 1 to 1515
Total134

So March 3 to July 15 is 134 days. That is the exclusive count, meaning it does not include March 3 itself. Add one if you want both endpoints counted.

Do You Count the Start Date or the End Date?

People usually mean one of two things here, and it changes the answer by one day. An exclusive count measures the gap (how many days until the event). An inclusive count includes both endpoints, which is how many people count vacation days or a hotel stay. Decide which you need before you trust the number.

Why Do Leap Years Matter?

Every four years, February gets a 29th day, so any span crossing that date gains one day. The rule is slightly fussier than "every four years": century years like 1900 skip the leap day unless they are divisible by 400. That is why 2000 was a leap year and 2100 will not be. A calculator handles this automatically, which is the main reason to use one.

A Detail Worth Knowing

There are 365 days in a common year and 366 in a leap year, but the average calendar year is about 365.2422 days. That leftover fraction is exactly why the leap year rules exist in the first place.

Do the math: open the days between dates

Keep going