Days Between Dates Calculator

Calculate the exact number of days between two dates. Enter any two dates using year, month, and day to find the total days between them.

Start Date

End Date

Total Days
403
Sum of all values
Weeks + Days
57w 4d
Total Hours
9,672
Sum of all values
Planning notes, formulas, and examples

About the Days Between Dates Calculator

The Days Between Dates Calculator counts the exact number of days between any two dates. Whether you're tracking a project deadline, counting down to an event, calculating the duration of a rental agreement, or measuring the time between two milestones, it gives you a precise date span.

The calculator uses a Julian Day Number algorithm to convert each date to a single day count, then subtracts to find the difference. This approach correctly handles leap years, varying month lengths, and century boundaries without relying on browser date APIs.

The result includes not only the total calendar days but also the equivalent in weeks, months (approximate), and hours. This broader breakdown helps you interpret the duration in the unit that matches your planning task.

When This Page Helps

Counting days between dates manually requires navigating different month lengths, leap years, and calendar quirks. This calculator handles those edge cases and returns the exact number of calendar days for legal deadlines, project timelines, insurance calculations, and personal planning.

How to Use the Inputs

  1. Enter the first date by specifying year, month, and day.
  2. Enter the second date with year, month, and day.
  3. The calculator displays the total days between the two dates.
  4. The order of dates does not matter; the result is always positive.
  5. View additional breakdowns in weeks and approximate months.
  6. Use the result for planning, legal calculations, or personal tracking.
Formula used
Julian Day Number (JDN) for a date: JDN = 367ร—Y โˆ’ floor(7ร—(Y+floor((M+9)/12))/4) + floor(275ร—M/9) + D + 1721013.5 Days Between = |JDN(date2) โˆ’ JDN(date1)|

Example Calculation

Result: 403 days

From January 1, 2001 to February 8, 2002, there are 403 calendar days. This spans all of 2001 (365 days, not a leap year) plus 38 days into 2002. The equivalent is 57 weeks and 4 days.

Tips & Best Practices

  • The result counts calendar days, not business days. Use the business days calculator for weekday counts.
  • Leap years add an extra day in February, which is automatically accounted for.
  • For legal deadlines, clarify whether the start or end date is included in the count.
  • The calculator works for dates spanning centuries and millennia.
  • Convert to hours by multiplying days by 24, or to minutes by multiplying by 1,440.
  • For approximate months, divide total days by 30.44 (average days per month).

How the Algorithm Works

The Julian Day Number system assigns a unique integer to every day, starting from a reference point in ancient history. By converting both dates to JDN and subtracting, we get an exact day count that inherently handles leap years, month lengths, and century boundaries.

Common Use Cases

Insurance policies, loan terms, rental agreements, and legal deadlines all depend on accurate day counting. Medical professionals track treatment durations in days. Project managers measure sprint velocities and milestone gaps in days. Travel planners calculate trip durations to the day.

Counting Conventions

Be aware of counting conventions: inclusive (both endpoints counted), exclusive (neither endpoint), or inclusive of start only. Legal contexts often specify which convention applies. When in doubt, state your assumption and add or subtract 1 as needed.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • The calculator counts the days between the two dates, not including both endpoints. If you need to include both the start and end dates, add 1 to the result. Different contexts (legal, medical, insurance) may require different counting conventions.