Days Between Two Dates Calculator
CU-78Pick a start date and an end date to see how many days lie between them, and the same gap in weeks, months, years and hours. Everything is worked out in your browser.
Runs in your browser. Nothing is uploaded.
Dates
Result
| Days between | 40 days |
|---|---|
| Weeks and days | 5 weeks, 5 days |
| Months and days | 1 month, 10 days |
| Years, months and days | 0 years, 1 month, 10 days |
| Total hours | 960 hours |
| Total minutes | 57,600 minutes |
| From | Sunday, November 22, 2026 |
| To | Friday, January 1, 2027 |
| Counting | The end date is not counted: the first day is included and the last day is not. |
How to use it
- Pick the start date. It begins as today's date.
- Pick the end date.
- Choose whether the end date is counted too.
- Read the days, weeks, months and years in the result table, or press Share link to keep the dates in the address.
How the days are counted
The tool counts whole calendar days. With the default setting the start day is counted and the end day is not, so January 1 to January 2 is 1 day, the same answer you get by subtracting the two dates. Switch on counting the end date and both days are included, so that pair gives 2 days. Only the date matters: there is no time of day and no time zone, so each day is exactly 24 hours and the hours total is days times 24. If the dates are in the wrong order, the tool swaps them and says so in the result.
Worked example
From 2020-01-01 to 2026-11-22 is 2,517 days. That is 359 weeks and 4 days, or 6 years, 10 months and 21 days, or 60,408 hours. You can check it by hand: six years from January 1, 2020 is 2,192 days because 2020 and 2024 are leap years, and November 22 is 325 days after January 1 in 2026, which gives 2,517.
How months are counted
The months figure is the most whole months that can be added to the earlier date without passing the later one. When a month is shorter than the starting day, the day moves back to the last day of that month, so January 31 plus one month is February 28 in a common year and February 29 in a leap year. That makes January 31 to March 1 read as 1 month and 1 day. Other conventions for splitting a gap into months exist, so a months-and-days answer from another tool can differ by a few days.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
Enter a date for End date. | The end date box is empty, for example after you cleared it. | Pick a date in the box or type one as YYYY-MM-DD. |
End date is not a real date: 2026-02-30 does not exist in the calendar. | The day is not in that month, such as February 30 or February 29 in a year that is not a leap year. | Choose a day that exists in that month. |
Questions people ask
How many days are there between two dates?
Subtract the earlier date from the later one. This tool does it on the real calendar, leap days included, and shows the answer in days first. By default the start day counts and the end day does not.
Should I count the end date?
It depends on the question. The nights between a check-in and a check-out leave the end date out. The days of a trip, with both the first and the last day, include it. The menu switches between the two and adds one day when the end date is counted.
Does the calculator handle leap years?
Yes. It uses the Gregorian calendar, so February has 29 days in years like 2024 and 2000 and 28 in years like 1900 and 2026. From 2024-02-28 to 2024-03-01 is 2 days, and from 2025-02-28 to 2025-03-01 is 1 day.
What happens if the end date is before the start date?
The tool swaps the two dates and adds a note, so you always get a positive count of days. The From and To rows show which date it treated as the earlier one, in case the order matters to you.
How do I count only working days between two dates?
Use the Business Days Calculator, which leaves out weekends and lets you choose which days are the weekend. This page counts every calendar day, including weekends and holidays.
How far back and forward can I go?
Any date from January 1 of year 1 to December 31 of year 9999, a span of 3,652,058 days. A year outside that range is refused with a message. The Gregorian calendar is used for every year, even those before it existed.
About this tool
Counts whole calendar days between two dates on the proleptic Gregorian calendar, years 0001 to 9999. Only the date is used: there is no time of day, no time zone and no daylight saving, so every day counts as 24 hours and the hours and minutes totals are days times 24 and days times 1,440. By default the start day is counted and the end day is not, so January 1 to January 2 is 1 day; the menu lets you count both ends instead, which adds one day. If the end date is before the start date, the tool swaps them and says so, so the result is never negative. The month figure is the most whole months that can be added to the earlier date without passing the later one. When a month is shorter, the day is moved back to its last day, so January 31 plus one month is February 28 (or 29), and January 31 to March 1 in a common year reads as 1 month and 1 day. Weekends and public holidays are not treated differently here; use the Business Days Calculator for that.