Days Between Dates
Enter two dates and get the exact number of days between them, plus the same span expressed in weeks, months and years.
A day count sounds like subtraction until you try it across a leap year, a month boundary or a century. This calculator does the whole span at once: the total number of days, the same gap broken into years, months and days, and the count in weeks and in months for when that is the unit you actually need.
It runs entirely in this page. Nothing you type is uploaded, so you can use it for a contract date, a medical date or a notice period without the date leaving your computer. No account, no email, no watermark on anything.
How to use it
- Enter the start date. Use the date picker or type it directly.
- Enter the end date. It can be before the start date — the result is then shown as a negative span rather than an error.
- Tick "Count both the start and end date" if you need the inclusive count, which is what notice periods and hire periods usually mean.
- Read the total days, and the years / months / days breakdown underneath it.
How the breakdown is calculated
The total is a plain day count: both dates are converted to a day number and subtracted. Leap days inside the range are included automatically, and the number of them is shown separately so you can check the result.
The years / months / days breakdown is harder than it looks, because months are not the same length. The calculator counts the largest number of whole months that does not overshoot the end date, then measures the remainder in days from that point. That guarantees two things: no part of the breakdown is ever negative, and adding the breakdown back onto the start date always lands exactly on the end date.
The alternative — subtracting each field and borrowing from the previous month — gives wrong answers whenever the day gap is larger than that month. From 31 January to 1 March it produces "1 month and minus 1 day".
Questions
- Does the count include the end date?
- By default, no. The result is the number of days you would cross going from one date to the other, so 1 March to 2 March is 1 day. Tick the inclusive option to count both endpoints, which gives 2 days — that is the convention most notice periods, rental periods and hire periods use.
- Are leap days counted?
- Yes, and the number of 29 Februaries in the range is shown separately so you can verify it. The calculator applies the full Gregorian rule: a year divisible by 4 is a leap year, except centuries, unless the century is divisible by 400. 2000 was a leap year; 1900 and 2100 are not.
- Why does the month count sometimes look one lower than I expect?
- Because a month is only counted when it has completed. From 31 January to 28 February is 0 months and 28 days, not 1 month, because 31 February does not exist so the month has not finished. The total day count is unaffected — it is the same 28 days either way.
- Is this free, and do I need an account?
- It is free with no account, no email address and no usage limit. There is nothing to sign up for.
- Are the dates I enter sent anywhere?
- No. The calculation is JavaScript running in this tab — there is no server involved in producing the answer, and no request carries the dates. You can confirm it by opening your browser DevTools, switching to the Network tab and running a calculation.