Key Takeaways
- Calculating the number of days between two dates means counting every full day from the earlier date to the later date, not simply subtracting the day-of-month numbers.
- The most reliable manual method uses the Julian day number or a running day-count approach, adding up the days remaining in each month along the way.
- Leap years add an extra day to any range that includes February 29, and forgetting to check for this is the single most common source of manual calculation errors.
- Whether the start and end dates are inclusive or exclusive changes the final count by exactly one day, and different tools handle this differently, so it’s worth checking which convention applies.
- You can get an instant, exact result for any two dates, or calculate age from a date of birth instead, using our free age calculator.
Why This Calculation Comes Up So Often
Counting the days between two dates seems like it should be simple subtraction, but the calendar doesn’t cooperate. Months have different lengths, years occasionally have an extra day, and people frequently need this calculation for very different purposes: figuring out how many days until a deadline, calculating someone’s exact age in days, determining a rental or subscription period, or working out how long ago a historical event occurred.
Because the underlying need is so common, and because manual counting is genuinely easy to get slightly wrong, it’s worth understanding the method properly rather than relying on a rough mental estimate.
Method 1: The Running Total Approach
This is the most intuitive manual method, and it works well for date ranges within a year or two.
| Step | What to do |
|---|---|
| 1 | Identify the earlier date (start) and the later date (end) |
| 2 | Count the remaining days in the start month, from the start date to the end of that month |
| 3 | Add the full number of days in every month that falls completely between the start and end months |
| 4 | Add the day-of-month number of the end date |
| 5 | Check whether any month in the range is February in a leap year, and adjust that month’s day count accordingly |
| 6 | Total everything for the final day count |
Worked Example: Standard Case, Same Year
How many days are there from March 10 to June 18 in a non-leap year?
- Remaining days in March after March 10: 31 − 10 = 21 days.
- Full months in between: April (30 days) and May (31 days) = 61 days.
- Days into June up to June 18: 18 days.
- Total: 21 + 61 + 18 = 100 days.
Worked Example: Edge Case, Spanning a Leap Year’s February
How many days are there from January 15 to March 15, in a leap year?
- Remaining days in January after January 15: 31 − 15 = 16 days.
- Full month in between: February, which has 29 days in a leap year.
- Days into March up to March 15: 15 days.
- Total: 16 + 29 + 15 = 60 days.
In a non-leap year, the same date range would total 59 days instead, a one-day difference that comes entirely from February’s length. This is exactly the kind of detail covered in more depth in our guide on how leap years affect your age calculation.
Method 2: The Julian Day Number Approach
For date ranges spanning multiple years, or for anyone who wants a more systematic method, the Julian day number approach is more reliable than manually tallying months.
Every calendar date can be converted into a single sequential number, the Julian day number, representing the number of days that have elapsed since a fixed reference point. To find the number of days between two dates, convert both to their Julian day numbers and subtract.
| Step | What to do |
|---|---|
| 1 | Convert the start date to its Julian day number |
| 2 | Convert the end date to its Julian day number |
| 3 | Subtract the start’s Julian day number from the end’s |
| 4 | The result is the exact number of days between the two dates |
This method is what most software date libraries and calculators use internally, since it avoids the accumulation of small errors that can creep into manual month-by-month counting across multiple years and multiple leap years. It’s more mathematically involved to do by hand than the running total method, which is exactly why a calculator is worth using for anything spanning several years.
Inclusive vs. Exclusive Date Ranges
One detail that trips up even careful manual counters: whether the start date, the end date, or both are included in the count.
| Convention | Description | Example (Jan 1 to Jan 10) |
|---|---|---|
| Exclusive of both endpoints | Counts only the full days strictly between the two dates | 8 days |
| Inclusive of the end date only (most common for “days between”) | Counts from the day after the start date through the end date | 9 days |
| Inclusive of both endpoints | Counts both the start date and the end date as full days | 10 days |
Most everyday uses of “days between two dates,” such as calculating age in days or the length of a rental period, use the “inclusive of the end date only” convention, but this isn’t universal. If a number of days matters for a contract, deadline, or legal requirement, it’s worth explicitly confirming which convention applies rather than assuming.
Calculating in the Other Direction: Days Until a Future Date
The same method works in reverse for calculating how many days remain until a future date, simply by treating today as the start date and the target date as the end date. This is functionally the same calculation as counting days between two past dates, just applied to a date that hasn’t happened yet. The same leap year and inclusive/exclusive considerations apply either way.
Manual Counting vs. Using a Calculator
| Factor | Manual Counting | Date Calculator |
|---|---|---|
| Short ranges within a single year | Manageable with the running total method | Instant and exact |
| Ranges spanning multiple years | Requires careful tracking of every month and leap year in between | Handled in one step |
| Leap year adjustments | Easy to forget, especially for years that aren’t obviously round numbers | Applied automatically using the full leap year rule |
| Inclusive vs. exclusive counting | Easy to apply inconsistently without realizing it | Can be set explicitly and applied consistently |
| Good for a single quick check | Fine | Fine |
| Good for legal, financial, or medical deadline calculations | Risky without careful double-checking | More reliable |
Common Mistakes
| Mistake | Why It’s Wrong | The Fix |
|---|---|---|
| Simply subtracting day-of-month numbers (e.g. 18 − 10 = 8) | Ignores which months are involved and their actual lengths entirely | Use the running total or Julian day number method to properly account for month lengths |
| Assuming every month contributes 30 days to the total | Produces errors of one to two days per month, since actual month lengths range from 28 to 31 days | Add up the actual day counts of each specific month in the range |
| Forgetting to check whether a leap year falls within the range | Produces a one-day error for every leap year February included in the count | Check each year in the range against the full leap year rule before finalizing the count |
| Not clarifying inclusive vs. exclusive counting | Produces a result that’s off by exactly one day compared to what the other party expects | Explicitly state or confirm which convention is being used, especially for contracts or deadlines |
| Manually tracking Julian day numbers without double-checking the conversion | Small arithmetic slips compound across the conversion steps | Use a calculator for any range spanning multiple years or leap years |
Frequently Asked Questions
How do I calculate the number of days between two dates by hand? Count the remaining days in the start month, add the full length of every month in between, then add the day-of-month of the end date, adjusting for leap years as needed.
Does the count include both the start and end date? It depends on the convention used. Most everyday calculations include the end date but not the start date, but this isn’t universal, so it’s worth confirming for anything with legal or financial stakes.
How do leap years affect this calculation? Any date range that includes a February 29 adds one extra day to the total compared to the same range in a non-leap year.
What’s the difference between this and calculating someone’s age? Calculating age typically converts a day count into years, months, and days, while this calculation gives a single total number of days. Age calculations rely on the same underlying date-difference math.
Can I calculate days between two dates in different years? Yes, the same method applies, it just requires tracking more months and potentially more leap years across the range.
What’s the most accurate manual method for long date ranges? The Julian day number method, since it avoids the accumulation of small errors that can occur when manually tallying many individual months.
How do I calculate how many days until a future date? Use the same method, treating today’s date as the start date and the future date as the end date.
Is there a faster way to check this than doing the math by hand? Yes, our free age calculator can calculate the exact number of days between any two dates, or calculate age from a date of birth instead, in a single step.
A Note on Method
This guide follows standard Gregorian calendar date arithmetic, including the full leap year rule, for all calculations. For the related question of how age and date of birth relate to each other, see what is the difference between age and date of birth. For a deeper look at why month lengths vary in the first place, see how many days are in each month and why.