How many days are left until an exam? How long has a project been running? How many days are left on a visa? To answer these questions, you need to know how to calculate the days between two dates.
In this guide, you will learn how to count days between two dates using simple steps and real examples. You will also learn how leap years affect the result and whether you should include the start date.
For a quick result, you can use the free Age Calculator on RandomsDex to calculate the difference between two dates.
How to Calculate Days Between Two Dates
You can also learn more about leap years from the official NASA explanation of the calendar and leap years. This can help you understand why some years have 366 days instead of 365.
Days Between Dates Formula
The basic formula is:
Days between two dates = End date − Start date
For example, the number of days between 10 March and 15 March is 5 days.
You can calculate longer date gaps by counting the remaining days in the first month, adding the full months in between, and then adding the days in the final month.
Days in Each Month
Use this table to check how many days are in each month.
| Month | Number of Days |
|---|---|
| January | 31 |
| February | 28 or 29 |
| March | 31 |
| April | 30 |
| May | 31 |
| June | 30 |
| July | 31 |
| August | 31 |
| September | 30 |
| October | 31 |
| November | 30 |
| December | 31 |
February has 29 days in a leap year and 28 days in other years.
How to Count Days Between Two Dates Step by Step
Follow these simple steps to calculate the difference between two calendar dates.
- Write down the start date and end date.
- Count the days from the start date to the end of that month.
- Add the days in any full months between the dates.
- Add the days from the start of the final month to the end date.
- Check whether a leap year affects your calculation.
For a quick and accurate answer, you can also use the RandomsDex Age Calculator.
Examples of Days Between Two Dates
Let’s look at two examples to understand how date calculations work.
Example 1: Dates in the Same Year
Question: How many days are there between 10 March 2026 and 25 June 2026?
Break the calculation into smaller parts:
- 10 March to 10 April: 31 days
- 10 April to 10 May: 30 days
- 10 May to 10 June: 31 days
- 10 June to 25 June: 15 days
Total: 31 + 30 + 31 + 15 = 107 days
Therefore, the difference between 10 March 2026 and 25 June 2026 is 107 days.
Example 2: Dates Across Two Years
Question: How many days are there between 20 December 2025 and 15 February 2026?
Break the calculation into smaller parts:
- 20 December to 1 January: 12 days
- 1 January to 1 February: 31 days
- 1 February to 15 February: 14 days
Total: 12 + 31 + 14 = 57 days
Therefore, the difference between 20 December 2025 and 15 February 2026 is 57 days.
How to Calculate a Long Date Difference
When dates are several months or years apart, counting every day can take time. You can make the process easier by counting complete years and months, then adding the remaining days.
Remember that a full year can have either 365 or 366 days. Always check for leap years when calculating dates across different years.
Should You Count the Start and End Dates?
When calculating the days between two dates, it is important to know whether you need to include both dates.
Exclusive Date Count
An exclusive count measures the time that passes from the start date to the end date. It does not count the start date as an additional day.
For example, the difference between 10 March and 25 June 2026 is 107 days.
Inclusive Date Count
An inclusive count includes both the start date and the end date. This adds one day to the standard date difference when the dates are in the correct order.
For the same example, the inclusive count is 108 days.
| Situation | Counting Method |
|---|---|
| Finding how many days have passed | Usually exclusive |
| Counting calendar days for an event | May be inclusive |
| Checking a legal or official deadline | Follow the stated rules |
For travel, legal deadlines, or official forms, always check the rules before deciding which method to use.
How Leap Years Affect Date Calculations
A leap year has 366 days instead of 365 because February has an extra day.
Here are two examples:
- 1 January 2024 to 1 January 2025: 366 days
- 1 January 2025 to 1 January 2026: 365 days
A year is usually a leap year if it is divisible by 4. However, a century year must also be divisible by 400 to be a leap year.
For more details, read our guide on how leap years affect your age calculation.
Why Is Calculating Days Between Dates Useful?
Knowing how to calculate the days between two dates can help with many everyday tasks, including:
- Planning exam schedules and study time
- Counting the length of a trip
- Tracking project deadlines
- Checking notice periods
- Finding how many days have passed since an event
- Calculating the time between two birthdays
Date calculations are also useful when finding your exact age. Read our guide on how to calculate your exact age in years, months, and days to learn more.
You can also learn how to calculate the age difference between two people or find out how to calculate your age for a specific date in the past or future.
Frequently Asked Questions
1. How do I calculate the days between two dates?
Subtract the earlier date from the later date. For longer periods, count the days in each month and check for leap years. An online date calculator can also give you a quick result.
2. Do I include the start date when counting days?
Usually, no. The standard date difference measures the time between the two dates without adding an extra day for the start date. Some events and official rules use inclusive counting.
3. How many days are there between two years?
Between the same date in two consecutive years, there are usually 365 days. If the period includes 29 February, there are 366 days.
4. Does the order of the dates matter?
The size of the gap stays the same, but reversing the dates can produce a negative result when using date subtraction. For a positive number of days, use the earlier date first.
5. What is the easiest way to calculate the days between two dates?
The easiest way is to use an online calculator. You can enter both dates and get the result without counting each month manually.
Conclusion
Calculating the days between two dates is simple when you follow the right steps. Subtract the earlier date from the later date, check the number of days in each month, and remember that leap years add an extra day.
Also, decide whether your task requires an inclusive or exclusive count. Once you understand these basic rules, you can calculate date differences for exams, trips, projects, deadlines, and many other everyday tasks.