Article — Days Between Dates Calculator
Days between dates: how to count them correctly
A days between dates calculator subtracts one calendar date from another and returns the result in days, weeks, months, and business days. The arithmetic is simple subtraction at heart, but four edge cases trip people up regularly: whether to include the end date, whether to count weekends, what "one month" means when months vary from 28 to 31 days, and how leap years shift the count.
The tool above answers all four. Enter two dates and you get the calendar-day count, the same count in weeks plus extra days, in whole months plus extra days, and in business days (Monday through Friday only). It works for any pair of dates, past or future, and handles reversed inputs without complaint.
How many days between two dates?
The number of days between two dates is the later date minus the earlier date, expressed in 24-hour intervals. May 1 to May 11 is ten days. January 1 to December 31 of the same year is 364 days. January 1 of one year to January 1 of the next is 365 days, or 366 across a leap year.
Every language with a date type handles this natively. In JavaScript, (end - start) / 86400000 gives the count in days. In Excel, simple subtraction returns days. In SQL, DATEDIFF does the same. The calculator at the top of this page uses the JavaScript approach in your browser, so no data leaves your device.
days = |end - start| (in 24h intervals)weeks = floor(days / 7) extra = days mod 7business ≈ days × 5/7 (exact: iterate, skip Sat/Sun)years = days / 365.25 (average, includes leap)Inclusive vs. exclusive counts
The most common error in date counting is the off-by-one. "From May 1 to May 11" is ten days if you exclude the start date, eleven if you include both endpoints. The right answer depends on the rule you are applying.
US federal court rules use the modern "exclude the start, include the end" convention. Hotel stays count nights, so three nights means check-in Monday and check-out Thursday. The Schengen short-stay rule counts every day of physical presence, including the day of entry and the day of exit. Tax deadlines vary by statute; read the rule before counting.
"Within 30 days of notice" almost always means the start date does not count. A notice dated May 1 gives the recipient until May 31 to respond, not until June 1. The 30 calendar days run from May 2 through May 31. Read contract language literally — courts will.
Calendar days vs. business days
Calendar days count every day of the week. Business days count only Monday through Friday, sometimes also excluding public holidays. The two units produce very different deadlines for the same nominal count.
30 business days is approximately 42 calendar days. That is six full weeks of elapsed time, almost half again as long as a 30-calendar-day window. People who plan around "30 days" and discover the contract actually says "30 business days" lose two weeks of slack they assumed they had.
The United States has about 251 working days in a typical year (365 minus 104 weekend days minus roughly 11 federal holidays). The United Kingdom has about 252 (8 bank holidays). Germany has roughly 249, varying by Bundesland because some states observe more religious holidays. Japan has about 245 thanks to 16 national holidays. These numbers shift year to year as holidays land on weekends.
Converting to weeks, months, and years
Days convert to weeks cleanly: divide by seven, keep the remainder. 30 days is 4 weeks plus 2 days. 100 days is 14 weeks plus 2 days. 365 days is 52 weeks plus 1 day — the reason your birthday lands on the next weekday each year.
Conversion to months is messier because months have different lengths. The calculator above counts whole months by anchoring to the same day-of-month in each successive month, then adds the leftover days. The average month length (365.25 days divided by 12) is 30.44 days, which is useful only for very rough estimates.
Years convert by dividing days by 365.25, the average length including the once-in-four-years leap day. Over a century the average is closer to 365.2425, because the Gregorian rule drops three leap days every 400 years. For most personal use, 365.25 is enough.
- 1 week = 7 days exactly
- 1 month = 28 to 31 days (average 30.44)
- 1 quarter = ~91 days (90, 91, or 92 depending on quarter)
- 1 year = 365 days (366 in leap years)
- 1 decade = 3,652 or 3,653 days, depending on leap distribution
- 1 century = 36,524 days (Gregorian, with skipped leap years)
- 1 millennium = 365,242 days
Leap years and the math
Leap years exist because Earth orbits the sun in roughly 365.2422 days, not 365 exactly. Adding a day every four years overcorrects slightly, so the Gregorian calendar drops three of those leap days per 400 years. The rule: divisible by 4 means leap, unless also divisible by 100 and not by 400.
2000 was a leap year (divisible by 400). 1900 was not (divisible by 100 but not 400). 2100 will not be either, for the same reason. The next non-leap century year that humans alive today might see is 2100, which will quietly skip February 29 and produce a 365-day year despite being divisible by 4.
When Pope Gregory XIII introduced the Gregorian calendar in October 1582, the next day after October 4 was October 15. Ten days were simply deleted from the calendar to correct accumulated drift in the older Julian calendar. Britain held out until 1752 and had to drop eleven days. Greece was the last European country to switch, in 1923. Historical date calculations spanning the reform need to account for which calendar was in use in each country at each time.
Legal and tax deadlines
Tax and legal deadlines are where exact day counting becomes consequential. The Internal Revenue Service applies the "next business day" rule when an April 15 deadline lands on a weekend or federal holiday, pushing the deadline to the next working day. Most US federal courts follow a similar rule under Federal Rule of Civil Procedure 6.
Private contracts usually do not roll forward automatically. A contract that says "payment due within 30 days" means the calendar date 30 days later, even if it lands on a Sunday. The lender or vendor is not required to extend the deadline. Many do, but they are not obligated.
Statutes of limitations are particularly unforgiving. Filing one day after a personal injury limitation period expires usually means the case is dismissed regardless of merit. The exact start date of the limitation period varies by state and by tort type, which is why this calculator is helpful but no substitute for asking a lawyer.
Schengen and other travel rules
The Schengen 90/180 rule allows non-EU visitors a maximum of 90 days inside the Schengen area within any rolling 180-day window. The count is not annual or per-trip; it is a sliding window. Every day of physical presence counts, including the day of entry and the day of exit.
The European Commission publishes an official calculator at ec.europa.eu that implements the exact rule. Travelers who lose track of their cumulative days can face entry bans of up to three years on re-entry. The rule is enforced by individual member states, so consistency varies, but the legal exposure is real.
Other countries have similar rules with different numbers. The UK allows up to 180 days in a 12-month period for standard visitors. Canada generally allows 6 months per entry with no rolling rule. Australia uses a 90-day rule for ETA holders. Always check the current rule before booking — they change.
For Schengen day counting, keep a spreadsheet of every entry and exit stamp. Most travelers underestimate their cumulative time because they remember trips by month, not by day count. Days in transit through Schengen airports also count, even if you never leave the airport.
Common mistakes
Forgetting leap years on long horizons. Multiplying years by 365 underestimates the day count slightly. Over a decade the gap is two or three days. For exact counts on long spans, use the calculator rather than mental arithmetic.
Mixing calendar and business days. "30 days" and "30 business days" sound similar and produce deadlines almost two weeks apart. The default reading in US case law is calendar days unless the contract specifies otherwise.
Counting the wrong endpoint. Off-by-one errors come from disagreement about whether the start date, the end date, or both are part of the count. Decide which rule applies before you compute. The calculator's "include end date" toggle exists to make this explicit.
Ignoring time zones. A deadline of "May 13" is usually interpreted in the timezone of the receiving party. A May 13 filing in New York can be considered late if delivered at 9 PM Pacific because it is already May 14 on the East Coast. Legal deadlines tied to court days follow the court's local timezone.
Confusing 30 days with one month. They are not the same. 30 days from January 31 is March 2 (or March 1 in a leap year), but one month from January 31 is February 28 or 29. Contracts that say "30 days" mean 30 days, not "the same date next month."
Microsoft Excel treats February 29, 1900 as a real date even though 1900 was not a leap year. The bug was inherited from Lotus 1-2-3 in the 1980s and deliberately preserved for backward compatibility. Date arithmetic that crosses February 1900 in Excel is off by one day. For modern dates, Excel is correct.