Days Between Dates Calculator

The days between dates calculator finds the exact number of calendar days separating any two dates you choose. Enter a start date and an end date and the tool instantly shows the total days, the equivalent in weeks and remaining days, and the approximate number of months. The calculation uses JavaScript Date arithmetic: both dates are converted to Unix timestamps in milliseconds, the difference is computed, and then divided by the number of milliseconds in one day (86,400,000) to give a whole number of days.

Common uses include planning events and holidays, calculating how long until a birthday or anniversary, working out the duration of a contract or lease, tracking project timelines, computing age milestones, and verifying notice periods. The calculator counts calendar days only, including weekends and public holidays. If you need to count business days or exclude specific holidays, use a dedicated working-days tool. For the reverse calculation, a date calculator lets you add or subtract days from a known date to find a target date.

The earlier date
The later date
30
4 weeks, 2 days
1

Formula

days = (endDate - startDate) / (1000 * 60 * 60 * 24)
weeks = Math.floor(days / 7)
remainingDays = days % 7
months = Math.floor(days / 30.4375)

How to use the days between dates calculator

Select your start date using the date picker on the left, then select your end date on the right. The result updates instantly. If your end date is before your start date, the calculator will show a negative number of days. The approximate months figure uses 30.4375 days per month, which is the average month length in a 365.25-day year.

Common date spans

One week is 7 days. One month is approximately 30 or 31 days (28 or 29 for February). One quarter is approximately 91 days. One year is 365 days (366 in a leap year). Two years is 730 or 731 days depending on whether a leap year falls in the period.

Days between dates calculator: frequently asked questions

How does the days between dates calculator work?

The calculator converts each date to a JavaScript Date object, then subtracts the start timestamp from the end timestamp. The difference in milliseconds is divided by the number of milliseconds in one day (1,000 * 60 * 60 * 24) to give the total number of days between the two dates.

Does it count the start date or end date?

By convention, this calculator counts from the start date up to but not including the end date. So from 1 January to 2 January is 1 day. This matches how most date-difference tools and programming environments handle the calculation.

How many days between two dates including both ends?

If you want to include both the start and end date in your count (sometimes called inclusive counting), simply add 1 to the result shown by this calculator. For example, from 1 January to 3 January inclusive is 3 days, but end minus start gives 2.

How do I calculate the number of weeks between two dates?

Divide the total number of days by 7. For example, 21 days divided by 7 equals exactly 3 weeks. This calculator shows the weeks and remaining days automatically. For a fractional result, divide total days by 7 as a decimal.

Can I use this for business days?

No, this calculator counts calendar days only, including weekends and public holidays. To count business days (working days), you would need to exclude Saturdays, Sundays, and any public holidays relevant to your location. A dedicated business days calculator handles this.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.