← Back to the tool

How Many Days Between Two Dates

Updated: May 2026

Counting the exact number of days between two dates sounds simple, but calendar math has several hidden traps — leap years, uneven month lengths, and the question of whether to count the start date itself. Getting it right matters for contracts, deadlines, billing cycles and legal documents.

Calculate days between dates →

Free · No upload · In your browser

Why exact day counting matters

A one-day error in a deadline, payment term or legal notice period can have serious consequences. A 30-day payment term on an invoice issued on March 15 is due April 14 — not April 15. A 90-day warranty starting July 1 expires September 28 in a common year, but on September 29 if the period crosses a leap-year February.

In project management, a sprint that "starts Monday and runs two weeks" contains exactly 10 business days, but 14 calendar days. These are not interchangeable, and mixing them up in Gantt charts or delivery estimates produces incorrect end dates. Knowing whether you need calendar days or working days is the first decision to make before counting.

How calendar day counting works

The standard method subtracts the earlier date from the later date and counts the intervening days. January 1 to January 31 is 30 days (not 31), because January 1 is the starting point (Day 0) and January 31 is Day 30. This is the convention used in finance, legal drafting and most software — the start date is the baseline, and each subsequent day adds one to the count.

The "include start date" convention counts differently: January 1 to January 31 becomes 31 days because January 1 itself counts as Day 1. This is standard in event durations (a "three-day conference" starting Monday ends Wednesday, with Monday, Tuesday and Wednesday each counted) and in some European legal traditions.

When working with contracts, always confirm whether the term is "from and including" the start date or "from but not including" it. The difference of one day can determine whether a right or obligation has accrued.

Leap years and month-length variation

The Gregorian calendar has months of varying length: 28, 29, 30 or 31 days. February is the only month whose length changes from year to year. A leap year occurs every four years when the year is divisible by 4 — except for century years, which must also be divisible by 400. So 2000 was a leap year, but 1900 was not.

For most practical date ranges, the leap-year rule means that any period spanning late February in a leap year gains one extra day compared to the same calendar period in a common year. A 365-day period starting March 1, 2024 (a leap year) ends February 28, 2025 — but the same starting date in 2023 ends February 28, 2024, which falls in a leap year, so the period still captures that extra day.

Automated tools handle this correctly because they work with millisecond timestamps rather than manually summing month lengths. Manually adding up "30+31+28+…" is error-prone and is the source of most day-count mistakes in spreadsheets and manual calculations.

Common use cases for day counting

  • Contract notice periods — "30 days' written notice" means the other party must receive notice at least 30 days before the effective date. Whether the notice day counts depends on the jurisdiction and contract language.
  • Invoice payment terms — Net-30, Net-45 and Net-60 terms count calendar days from the invoice date. The due date is not the same-day-of-next-month.
  • Warranty and return windows — A 90-day return window starting the day of purchase: knowing the exact expiry date prevents a rejected return.
  • Event duration — How many days until the conference, exam, product launch or flight departure.
  • Regulatory deadlines — Tax filing, permit applications and appeal periods are measured in calendar days. Missing by one day can mean penalties or loss of rights.
  • Billing cycles — Monthly subscriptions that bill every N days (not every calendar month) need exact day counting to predict the next charge date.

How to use the Flowfiles date calculator

Open the date calculator and select the "Between Dates" tab. Enter your start date and end date using the date pickers. The result appears immediately, showing total days, business days, weeks, months and a years–months–days breakdown. Enable "Include start date" if your counting convention requires it. Enable "Business days only" to see the working-day count alongside the calendar count.

No account is needed and no data leaves your browser. The calculation uses the JavaScript Date API, which handles time zones, daylight saving transitions and leap years automatically.

Frequently asked questions

How do I count the exact days between two dates?

Subtract the start date from the end date in milliseconds and divide by 86,400,000. Or use the Flowfiles date calculator — enter your two dates and the result appears instantly, along with weeks, months and a years–months–days breakdown.

Does February affect day counting?

Yes. February has 28 days in a common year and 29 in a leap year. Any date range spanning February 28–29 in a leap year will count one extra day compared to the same range in a common year. Automated calculators handle this correctly.

Should I include the start date in the count?

It depends on context. Legal and financial durations typically exclude the start date. Event durations (conference days, vacation days) include it. The Flowfiles calculator offers an "Include start date" toggle so you can match whichever convention applies.

What is the difference between calendar days and business days?

Calendar days count every day of the week including weekends. Business days count only Monday through Friday, excluding Saturday and Sunday. For project timelines and delivery windows, use business days. For legal and financial terms, the type of day is usually specified in the contract.