Calculate Date Difference
To calculate date difference, subtract the start date from the end date on the Gregorian calendar, counting the days in between. From 1 January 2024 to 1 January 2025 is 366 days, because 2024 is a leap year, and from 15 June 2026 to 1 November 2026 is 139 days. The date difference calculator above gives the span in days, weeks, and years, months, and days, and this page teaches the hand method so you can check any result.
The hand method is a month-by-month count: the remaining days in the start month, then the full months in between, then the days in the end month, plus one for each 29 February inside the span. That last step is the one people miss, and it is the reason a span crossing February in a leap year comes out a day short when counted by hand. This page works through five spans, shows the month-by-month count, and explains the endpoint convention.
How Date Differences Are Calculated
The difference between two dates is the number of days from the first date to the second, counted on the Gregorian calendar. The 1 January 2026 to 31 December 2026 span is 364 days, because 2026 is not a leap year and the count excludes the starting day itself. Counting this way is a convention, and it matters: most people mean “how many days after the first date is the second date,” which excludes the start and includes the end. If you need to count both endpoints, add one to the result.
Leap years are the only complication. A leap year has 366 days, with an extra day on 29 February, and the span from 1 January 2024 to 1 January 2025 is 366 days for exactly that reason. A year is a leap year if it is divisible by 4, except century years, which must also be divisible by 400: 2000 was a leap year, 1900 was not, and 2100 will not be. The calculator applies these rules automatically, so spans crossing February in a leap year come out right without you having to remember which years are leap years.
The official time reference for the United States is maintained at time.gov, the public face of the atomic clocks run by the National Institute of Standards and Technology and the US Naval Observatory. Calendar dates and day counts, though, are a matter of arithmetic on the Gregorian calendar, and the calculator’s job is to do that arithmetic without the off-by-one errors that creep in when people count on their fingers.
Step 1 — Write Both Dates in the Same Order
Write the start date and the end date as year, month, and day. For 1 January 2026 to 31 December 2026, the dates are (2026, 1, 1) and (2026, 12, 31). If the end date is earlier than the start date, the difference is negative, and the calculator reports the span in the other direction.
Step 2 — Count the Days in Each Full Month Between Them
Add the remaining days in the start month, then the full months in between, then the days in the end month. For 1 February to 1 March 2026, that is 27 remaining days in February plus 1 day in March, which is 28 days, because February 2026 has 28 days.
Step 3 — Add the Leap Days
Add one day for each 29 February inside the span. The span from 1 January 2024 to 1 January 2025 crosses 29 February 2024, so it is 366 days, not 365. The calculator does this step for you, and it is the step people most often miss when counting by hand.
Worked Examples: Calculating Date Differences
Each row shows the two dates, the month-by-month count, and the result, so you can follow the arithmetic.
| Start date | End date | Difference |
|---|---|---|
| 1 January 2024 | 1 January 2025 | 366 days (leap year) |
| 15 June 2026 | 1 November 2026 | 139 days |
| 1 January 2026 | 31 December 2026 | 364 days |
| 1 March 2025 | 15 March 2025 | 14 days |
| 14 February 2026 | 28 February 2026 | 14 days |
The second row shows the month-by-month count in full: from 15 June, the rest of June is 15 days, July is 31, August is 31, September is 30, October is 31, and 1 November adds 1, which totals 15 + 31 + 31 + 30 + 31 + 1 = 139 days. The first row is the leap-year case: 2024 has 366 days, so a full year from 1 January 2024 to 1 January 2025 is 366 days. Try the same spans in the calculator above and confirm each count.
How to Use the Date Difference Calculator
Pick a mode, enter two dates, and the calculator shows the difference in days, weeks, and in years, months, and days. It can also add or subtract days from a date, which is the same arithmetic run in the other direction.
- Choose the mode. Difference between two dates is the default; the add and subtract modes take one date and a number of days instead.
- Enter the start date. Use the date picker or type the date. The order matters: start first, end second, or the sign of the answer flips.
- Enter the end date. The calculator updates as you type, so you can slide the end date forward and watch the count grow.
- Read the breakdown. The result shows total days, the same span in weeks, and the same span in years, months, and days, so you can use whichever form your task needs.
- Decide about endpoints. The count excludes the start date. If your task counts both the first and last day, add one to the total.
Month Lengths You Need for Hand Counts
Hand counting needs the real month lengths, not a flat 30 days. This table is the reference, with the leap-year February called out.
| Month | Days in an ordinary year | Days in a leap year |
|---|---|---|
| January | 31 | 31 |
| February | 28 | 29 |
| March | 31 | 31 |
| April | 30 | 30 |
| May | 31 | 31 |
| June | 30 | 30 |
| July | 31 | 31 |
| August | 31 | 31 |
| September | 30 | 30 |
| October | 31 | 31 |
| November | 30 | 30 |
| December | 31 | 31 |
Common Mistakes With Date Differences
Date arithmetic has a small set of classic errors. These are the ones that produce answers one day out.
- The off-by-one error. Counting both the start and end dates when the task wants the gap between them, or counting neither, shifts the answer by a day.
- Forgetting leap years. A span crossing 29 February is a day longer than a naive month count suggests, and the error only appears for spans that cross February.
- Assuming all months have 30 days. A rough 30-day month estimate can be several days out over a long span; the calculator uses the real month lengths.
- Swapping the dates. Entering the end date first gives a negative difference, which is correct arithmetic but the wrong answer for the question asked.
- Ignoring time zones. A date difference is a calendar difference, not a time difference; two dates in different time zones still differ by the same number of calendar days.
Where You Will Use a Date Difference
Day counts drive deadlines, plans, and records in almost every part of life, from project work to pregnancy to legal filings.
- Project deadlines. Counting the days from a start date to a delivery date tells you how many working days you actually have, before you commit.
- Travel planning. The gap between departure and return dates is the length of the trip, and it decides the cost of hotels, car hire, and insurance.
- Contracts and notice periods. A 30-day notice period and a 90-day warranty are counted in calendar days from a specific date, so the end date must be exact.
- Health and pregnancy. Due dates, treatment courses, and recovery periods are all counted in days and weeks from a start date.
- Anniversaries and milestones. The days between two dates turn a round number, such as 10,000 days together, into a date worth celebrating.
The 30-Days-Hath-September Rhyme
The rhyme “Thirty days hath September, April, June, and November” is the memory aid for the month lengths: those four months have 30 days, February has 28 or 29, and the other seven have 31. The knuckle method works too: months that fall on a knuckle have 31 days, and the months in the valleys have 30, except February. Either aid removes the need to look the lengths up, and both are worth teaching to anyone who counts dates by hand.
Tips for Accurate Results
Date differences are exact once the convention is settled. These habits settle it before you start.
- State the convention. Decide up front whether the start date counts, and write it down, so everyone reading the result agrees on what it means.
- Use the calculator for spans over a month. Hand counting across several months is where leap days and 31-day months cause slips.
- Check February. Whenever a span crosses February, confirm whether the year is a leap year before trusting a hand count.
- Keep the year with the date. A date without a year is ambiguous across a year boundary, and the difference depends on which year you mean.
- Verify with a second span. Split a long span into two halves and add them; if the halves do not sum to the whole, one of them is wrong.
Date Difference Quick Answers
These are the day counts people look up most often, each one verified against the calculator above.
| Span | Days |
|---|---|
| 1 January 2026 to 31 December 2026 | 364 |
| 1 January 2024 to 1 January 2025 (leap year) | 366 |
| 1 February 2026 to 1 March 2026 | 28 |
| 15 June 2026 to 1 November 2026 | 139 |
| 1 March 2025 to 15 March 2025 | 14 |
Related tools on this site: the main date difference calculator, days calculator, age calculator, countdown timer, and the date difference calculator again whenever you need a fresh check.
Frequently Asked Questions
How do I calculate the difference between two dates?
Subtract the start date from the end date, counting the remaining days in the start month, the full months in between, and the days in the end month, plus one for each 29 February in the span. From 15 June 2026 to 1 November 2026, that is 15 + 31 + 31 + 30 + 31 + 1 = 139 days.
What is the date difference between 1 January 2024 and 1 January 2025?
It is 366 days, because 2024 is a leap year and the span crosses 29 February 2024. The same span in a non-leap year, such as 1 January 2026 to 1 January 2027, is 365 days.
How many days are between 15 June and 1 November 2026?
There are 139 days. Counting month by month: 15 remaining days in June, 31 in July, 31 in August, 30 in September, 31 in October, and 1 in November, which totals 139.
Does the calculator count the start date?
No. The calculator uses the standard convention: the count excludes the start date and includes the end date. If you need to count both endpoints, add one to the result.
How do I calculate a date difference across a leap year?
Add one day for the 29 February inside the span. A span from 1 January 2024 to 1 January 2025 is 366 days for exactly that reason, and the calculator applies the leap-year rule automatically.
Disclaimer: This calculator is for general information only. Day counts use the Gregorian calendar; deadlines, notice periods, and legal dates are governed by the applicable contract, statute, or authority, which may count days differently.
