Days Between Dates Calculator
Find the number of days between two dates, plus weeks and total months estimate.
Enter your values and click Calculate
Counting the days between two dates comes up constantly in everyday life โ tracking how long until a vacation, measuring how many days remain on a contract, checking a medication schedule, calculating invoice due dates, or planning a multi-week project. This calculator accepts any two calendar dates and returns the exact day count using UTC midnight arithmetic to eliminate daylight saving time errors. Alongside the primary day count, it shows approximate weeks, months, and years so you can put the span in context. Whether the end date is before or after the start date, the result is the same absolute difference. Use the companion date-difference calculator for a richer breakdown including business days.
How It Works
Both dates are converted to UTC midnight timestamps using Date.UTC() with a round-trip validity check that catches impossible dates like February 30. The difference in milliseconds is divided by 86,400,000 and rounded to produce an exact whole-day count. Approximate weeks are computed as days รท 7; approximate months use an average of 30.4375 days per month (365.25 รท 12); approximate years use 365.25 days. The direction note is determined by the sign of the raw difference before the absolute value is taken. Because all arithmetic happens in UTC, daylight saving time transitions โ which shift local midnight by an hour โ cannot cause off-by-one errors.