Date Ca

How many days between two dates, or what date is 90 days from now?

Find out exactly how many days are between two dates, or calculate what date falls a specific number of days, weeks, or months from any starting point. Useful for deadlines, contract terms, countdowns, and billing cycles.

Updated July 2026 · How this works

Example calculation — edit any field to use your own numbers

Worth knowing
How It Works
The formula, explained simply

Think of two dates as two points on a number line measured in days. The distance between them is just subtraction — but the tricky part is that calendars are not uniform. February has 28 or 29 days, months vary from 28 to 31, and leap years add a day every four years (with exceptions for century years). A naive calculation that multiplies months by 30 accumulates errors that can be several days off over a 6-month span.

This tool converts both dates to their underlying millisecond timestamps — a single integer counting milliseconds since January 1, 1970. Subtraction gives an exact millisecond difference, which divides cleanly into days. No month-length assumptions, no leap year guesswork. The offset calculation works in reverse: it takes your start date and advances it by the exact calendar unit you choose, letting JavaScript's built-in date engine handle variable month lengths correctly.

The weeks-and-days breakdown simply divides the total by 7 and takes the remainder. The approximate months figure uses the average Gregorian year length (365.25 days per year, 30.4375 days per month) to give a single decimal number useful for rough comparisons — but for anything legally meaningful, stick to the day count or the calendar-month offset.

When To Use This
Right tool, right situation

Use this tool when you need to know exactly how many days remain until a deadline, contract expiry, license renewal, court filing, or subscription cutoff. It is also the right tool when a document specifies a number of days, weeks, or months and you need the precise calendar date that represents. Project managers use it to check whether a milestone is realistically spaced from a start date. Landlords and tenants use it to verify notice periods.

Use the offset section when you have a start date and a specified interval and need to find the end date — not the other way around. If you know the deadline and need to count backward to find when to start, enter the deadline as the end date and today as the start date to get the days remaining, then use the offset section to mark interim milestones.

This tool is not appropriate when your interval is measured in business days, when you need to account for specific public holidays, or when you are scheduling across multiple time zones where the calendar date itself depends on local time. For those cases, the day count here is a starting point, not a final answer. Court deadlines in particular often have jurisdiction-specific rules about what counts as a business day — verify with the relevant clerk's office.

Common Mistakes
Why results sometimes look wrong

Mistake: Using 30 days as a universal month length. The cause is mental shorthand — 30 is a round number and close to the average. The consequence is errors of 1 to 3 days per month, compounding to 12 or more days over a year. A 6-month loan term estimated at 180 days is actually 181 or 184 days depending on which months are involved. Always use the calendar-month offset for anything measured in months.

Mistake: Assuming end date minus start date includes both endpoints. People count on their fingers — Jan 1, Jan 2, Jan 3 feels like 3 days, but the mathematical difference is 2. Legal documents, software systems, and this tool all default to the exclusive count (not including the start date). If a contract says a party has 30 days starting on March 1, the deadline is March 31, not April 1. When in doubt, check whether the agreement says "within 30 days" or "on or before the 30th day."

Mistake: Ignoring daylight saving time when working with precise hours. If you are counting full calendar days, DST does not matter. But if you are converting the day count back to hours for scheduling, remember that one day in a DST transition week has 23 or 25 hours. A 30-day period that spans a clock change has either 719 or 721 hours, not 720.

The Math
Worked examples and deeper derivation

The core formula is: diffDays = (endDate.getTime() - startDate.getTime()) / 86,400,000. The divisor is the number of milliseconds in one day: 1,000 ms/s × 60 s/min × 60 min/h × 24 h/day. This gives a floating-point number that is rounded to the nearest integer to handle daylight saving time transitions, which can shift a day boundary by one hour and produce a result like 29.958 instead of 30.

For the offset calculation using months, the engine calls setMonth(getMonth() + n) on a JavaScript Date object. When the resulting month is shorter than the start month's day, JavaScript automatically rolls over to the first day of the following month. Adding 1 month to January 31 gives March 3 (or March 2 in a leap year), not February 31. This is standard calendar arithmetic, but it surprises people who expect a symmetric result.

The approximate months figure divides diffDays by 30.4375, which is 365.25 / 12. This is the mean Gregorian month length averaged across a 400-year cycle. It is accurate enough for rough estimates but can differ from counting calendar months directly by up to 1.5 days per month accumulated.

Calculating days until a contract deadline
Start date: today (March 15, 2025), End date: June 30, 2025
The result is 107 days — 15 weeks and 2 days. If you have a 90-day notice clause, you know the notice window has already been open for 17 days and closes before the contract does.
Finding the exact expiry date of a 90-day warranty
Start date: January 5, 2025, Offset: 90 days
The offset calculator returns April 5, 2025 as the warranty expiry date. This matters for returns because many retailers accept claims only up to that precise date, not a rough 3-month estimate which could land on April 5 or April 7 depending on how you count.
HR manager calculating employee probation end date
Start date: February 17, 2025, Offset: 6 months
Adding 6 calendar months lands on August 17, 2025. The calendar-month method differs from multiplying 180 days — that would give August 16, 2025 — a one-day gap that can matter for payroll and benefit eligibility cutoffs.
Expert Unlock
The thing most explanations skip

The calendar-month offset has an asymmetry that matters in contract drafting: adding n months and then subtracting n months does not always return you to the original date. Start on January 31, add 1 month, and you get February 28 (or 29). Subtract 1 month from February 28 and you get January 28, not January 31. This means month-based date arithmetic is not reversible in general, which is why financial and legal instruments that require exact intervals specify a day count rather than a month count whenever precision matters above a certain threshold.

Why does my day count differ from what I expected?

Does this calculator include or exclude the start and end dates?
The calculator counts the gap between dates without including the start date. January 1 to January 3 returns 2 days, not 3. This matches how most legal contracts, billing systems, and countdowns measure intervals. If you need to count both endpoints (inclusive), add 1 to the result.
Why is adding 3 months different from adding 90 days?
Calendar months have different lengths — 28, 29, 30, or 31 days. Adding 3 months moves the same day forward by exactly one quarter of the calendar year, which can be anywhere from 89 to 92 days depending on which months are involved. Use months for contracts tied to billing cycles; use days when a precise interval is written in the agreement.
How do I calculate how many business days are between two dates?
This tool counts calendar days, not business days. For a rough conversion, take the calendar day count, divide by 7, multiply by 5, and subtract any public holidays that fall in the range. A 30-calendar-day period contains roughly 21 to 22 business days. For payroll or legal deadlines that specify business days, use a dedicated business-day calculator to avoid being off by one.

Need something this doesn't cover?

Suggest a tool — we'll build it →