Home/Calculator Tools/Date Calculator
📆

Date Calculator

FREE

Count the days, weeks and months between two dates

Free · No sign-up required
Loading...

What the date calculator does

The date calculator finds the exact interval between two calendar dates and expresses it as days, weeks, months and years. It handles leap years, months of different lengths and dates in either order automatically, so you can use it for anything from counting down to an event, checking how many days a contract or warranty has left, working out an invoice due date, or measuring how long you have been at a job.

How the difference is calculated

Days are the only unambiguous unit. The calculator converts both dates to a day count from a fixed reference (the same approach every computer uses internally), subtracts, and reports the absolute difference. Weeks are simply days ÷ 7.

Days = |serial(date₂) − serial(date₁)| Weeks = Days ÷ 7

Months and years are harder, because months are not the same length. The calculator counts whole calendar months by stepping the earlier date forward one month at a time until it would pass the later date, then reports the remainder in days. That is how ages, tenancies and most legal periods are counted: 15 January to 15 March is exactly two months, even though it is 59 days in a common year and 60 in a leap year.

Worked examples

FromToDaysWeeksMonths
1 Jan 202531 Dec 202536452.011 months 30 days
1 Jan 20241 Jan 2025366 (leap year)52.312 months
15 Feb 202515 May 20258912.73 months
28 Feb 202528 Feb 202636552.112 months
31 Jan 202528 Feb 2025284.00 months 28 days

Notice the last row: stepping 31 January forward one month lands on a date that does not exist (31 February), so it is not yet a full month by 28 February. Different software resolves this edge case differently; the calculator follows the convention that a month is complete only when the same day-of-month is reached.

Inclusive vs exclusive counting

“How many days from Monday to Friday?” has two defensible answers: 4 (the difference) or 5 (counting both ends). The calculator reports the difference — the number of midnights crossed — which is what “days until” and “days since” normally mean. If you need an inclusive count (nights of a hotel stay are exclusive, days of a rental car are usually inclusive, days of a sick-leave certificate are almost always inclusive), add one to the result.

Leap years and other calendar quirks

  • Leap-year rule: a year is a leap year if divisible by 4, except century years, which must be divisible by 400. So 2024 and 2000 are leap years; 1900 and 2100 are not.
  • 29 February birthdays: in non-leap years most jurisdictions treat 1 March as the legal anniversary, some use 28 February. The calculator's month-stepping uses the last valid day of the month.
  • Time zones: the calculator compares calendar dates, not instants, so a date entered as 5 March is 5 March regardless of where you are. For elapsed hours across zones, use a time calculator.
  • Historical dates: the tool uses the Gregorian calendar throughout. Dates before a country adopted it (1582 in Catholic Europe, 1752 in Britain and its colonies, 1918 in Russia) were recorded in the Julian calendar and differ by 10–13 days.

Common uses

  • Payment terms: an invoice dated 12 March on net-30 terms is due 11 April; the calculator confirms the interval and lets you check for weekends if you count business days separately.
  • Pregnancy and medical: weeks since a given date is the standard way pregnancy and post-operative recovery are tracked.
  • Employment: length of service for notice periods, probation and holiday accrual is counted in whole months from the start date.
  • Visa and travel: many visa-free schemes allow “90 days in any 180-day period”; counting exact days matters because overstaying by one day can carry penalties.
  • Project planning: converting a deadline into remaining weeks makes it easier to allocate work.

Frequently asked questions

Does it matter which date I enter first?

No. The calculator reports the absolute difference, so swapping the dates gives the same result.

How do I count only business days?

As a rough estimate, multiply the calendar days by 5/7. For an exact count you need to exclude weekends and the public holidays of the relevant country, which vary; the calculator reports calendar days.

Why does the months figure sometimes look smaller than I expect?

A month is only counted when the same day-of-month is reached. From 31 January to 1 March is 29 days in a common year but only 0 full months plus 29 days, because 31 February does not exist and 28 February is not yet 'the same day'.

How many days are in a year on average?

365.2425 in the Gregorian calendar, which is why 'years' from the calculator is shown as days ÷ 365.25 when it is not a whole number of calendar years.

Can I calculate a date a certain number of days from today?

Enter today's date as one end and adjust the other until the day count matches. For adding or subtracting a fixed number of days, weeks or months, use the age calculator's anniversary features or a dedicated date-add tool.

Is the data sent anywhere?

No. The calculation runs in your browser using the JavaScript Date object; nothing is uploaded.

More tools in this category

🎂
Age Calculator
Calculate exact age from a date of birth
Time Calculator
Add or subtract hours, minutes and seconds; get decimal hours
🕐
Hours Calculator
Hours worked from clock-in, clock-out and breaks, including overnight shifts
🏠
Mortgage Calculator
Calculate monthly mortgage payments and amortization
🏦
Loan Calculator
Calculate monthly loan payments and total interest
🚗
Auto Loan Calculator
Calculate monthly car loan payments with down payment