How to Calculate Days Between Two Dates (With Worked Examples)

To calculate days between two dates, subtract the earlier date from the later date and count the whole calendar days in between. If you start on January 1 and end on January 31, the answer is 30 days, because January 31 is 30 days after January 1. That simple idea is the basis for planning trips, counting down to an event, working out a deadline, or checking how long ago something happened. This guide explains the method step by step, shows worked examples you can check by hand, and explains the two points where people most often go wrong: inclusive counting and leap years.

The fastest way to get an exact answer is to use the Days Between Dates calculator on DateNook. Enter a start date and an end date and it counts the days for you, including leap days. The rest of this guide shows you how the counting works, so you can understand the result and check it yourself.

What It Means to Calculate Days Between Two Dates

When you calculate days between two dates, you are measuring the gap between two points on the calendar. The start date itself is day zero. Each midnight you pass adds one day. So the count from a Monday to the next Monday is 7 days, not 8, and the count from January 1 to January 2 is 1 day. This is the standard way date calculators work, and it matches how most planners, contracts, and countdowns treat a date difference.

How to Calculate Days Between Two Dates by Hand

You can work out most date differences with a short method that needs nothing more than the number of days in each month. First, write down the start date and the end date. Second, count the days left in the start month, from the start date to the end of that month. Third, add the full months in between. Fourth, add the days in the final month up to the end date. Add the three parts together and you have the answer.

It helps to remember the month lengths: January 31, February 28 in a common year and 29 in a leap year, March 31, April 30, May 31, June 30, July 31, August 31, September 30, October 31, November 30, and December 31.

Worked Examples You Can Check

Example 1: January 1, 2026 to January 31, 2026. Both dates are in the same month, so subtract the day numbers: 31 minus 1 equals 30 days.

Example 2: February 6, 2026 to March 6, 2026. February 2026 has 28 days, because 2026 is not a leap year. From February 6 to February 28 is 22 days, and from February 28 to March 6 is 6 more days, giving 28 days in total. A full calendar month does not always mean the same number of days, and February is the reason why.

Example 3: November 19, 2026 to February 8, 2027. From November 19 to November 30 is 11 days. Add December, which has 31 days, to reach 42 days. Add January, which has 31 days, to reach 73 days. Add 8 days in February to reach 81 days. So there are 81 days from November 19, 2026 to February 8, 2027, which is 11 weeks and 4 days.

Example 4: January 1, 2026 to January 1, 2027. The year 2026 is not a leap year, so it has 365 days. The gap between the same date in two following years is the length of the first year, which is 365 days here. In a leap year the same gap would be 366 days.

Example 5: February 28, 2024 to March 1, 2024. The year 2024 was a leap year, so February had 29 days. From February 28 to February 29 is 1 day, and from February 29 to March 1 is 1 more day, giving 2 days in total. If you forget the leap day, you would answer 1 day and be wrong by a full day.

Inclusive Counting and Why It Changes the Answer

Sometimes people want to count both the start date and the end date. That is called inclusive counting, and it gives an answer one day higher than the standard difference. From January 1 to January 10 inclusive is 10 days, because you count January 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10. The standard difference is 9 days. Neither answer is wrong on its own, but you must know which one you need before you start.

Inclusive counting is the right choice for things like a holiday that runs from Monday to Friday, where you are away for 5 days, or a course that meets every day from June 1 to June 5. The standard difference is the right choice for a countdown, a deadline, or a gap between two events. If a booking, a contract, or a form does not say which method it uses, ask before you rely on the number, and state the method when you share the result.

Leap Years and the February Problem

A leap year adds February 29, and that single day affects every date difference that crosses it. A year is a leap year if it divides evenly by 4, except for years that divide evenly by 100, which are leap years only if they also divide evenly by 400. That is why 2024 was a leap year, 2000 was a leap year, and 2100 will not be. The rule keeps the calendar in line with the seasons, and you can read more about it in the Britannica guide to leap years.

In practice, you only need to check February when your date range crosses it. If your start and end dates are both in March or later, or both before February, the leap day does not matter. If the range starts before March 1 in a leap year and ends after February 29, add one day. A calculator handles this automatically, which is the main reason to use one for ranges that cross several years.

Common Uses for a Days Between Dates Count

People count days between dates for travel, work, study, health, and family life. A traveller counts the days until a flight or between two bookings. A project manager counts the days between a start date and a deadline to see how much time is left. A student counts the days until an exam. A parent counts the days until a birthday or a school term starts. In each case the count is only useful if the start date, the end date, and the counting method are clear.

Date differences also feed into other calculations. Divide the day count by 7 to get weeks and remaining days, which is useful for schedules that run in weeks. For a second opinion on a long range, the timeanddate duration calculator is a useful cross-check.

Frequently Asked Questions About Calculating Days Between Two Dates

How do I calculate days between two dates?

Subtract the earlier date from the later date and count the whole days in between, with the start date as day zero. Count the days left in the start month, add the full months in between, then add the days in the final month. For a fast and exact result, use the DateNook Days Between Dates calculator linked above.

How many days are there between January 1 and January 31?

There are 30 days between January 1 and January 31 in the same year. If you count both dates, the inclusive total is 31 days.

Does the count include the start date or the end date?

The standard difference includes neither date as a full day: the start date is day zero and the end date is the point you measure to. Inclusive counting adds one day because it counts both dates. Check which method a booking, contract, or deadline uses before you rely on the number.

How do leap years change the count?

A leap year adds February 29. Any date range that starts before that day and ends after it in a leap year is one day longer than the same range in a common year. For example, February 28 to March 1 is 2 days in a leap year and 1 day in a common year.

How many days are in a year?

A common year has 365 days and a leap year has 366 days. So the gap from January 1, 2026 to January 1, 2027 is 365 days, because 2026 is not a leap year.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top