Xerobit

Weeks Between Dates Calculator

Enter a start date and an end date to find out how many weeks between them. The result shows whole weeks, remaining days, decimal weeks and total days. All calculations run in your browser using exact UTC arithmetic so nothing is uploaded and daylight saving shifts never affect the answer.

Counting inclusively adds one day to the span

Result

  • Whole weeks
    10
  • Remaining days
    3
  • Decimal weeks
    10.428571
  • Total days
    73

How to use the weeks between dates

  1. Type or paste the start date in YYYY-MM-DD format.
  2. Enter the end date the same way.
  3. Choose whether to include the end date in the count.
  4. Read the result: whole weeks, leftover days, decimal weeks and total days.

How the calculation works

The tool parses each date into year, month and day components, then converts both to a millisecond timestamp at midnight UTC using Date.UTC(year, month - 1, day). Working in UTC avoids any shift caused by local daylight saving time transitions.

The difference in milliseconds is divided by 86,400,000 (the number of milliseconds in one day) to get total days. If you choose inclusive counting, one extra day is added before the week math begins.

For example, from 2026-01-01 to 2026-01-22 exclusive gives 21 days. Dividing by 7 yields exactly 3 whole weeks and 0 remaining days. Decimal weeks are simply totalDays / 7, rounded to six places for readability.

Exclusive versus inclusive counting

When you ask how many weeks between two dates, the answer depends on whether the final day is part of the span. Exclusive counting treats the end date as a boundary that is not included, which matches how most programming languages compute date differences.

Inclusive counting adds one day to the total. This is common when planning events, school terms or work schedules where both the first and last day count. For instance, a workshop running Monday through Friday inclusive spans 5 days, while the exclusive difference between those two dates is only 4 days.

Common reference spans

This table shows the weeks between dates for several standard periods, calculated exclusively (end date not counted).

PeriodTotal daysWhole weeksExtra days
1 calendar month (30 days)3042
1 calendar month (31 days)3143
February (non-leap year)2840
February (leap year)2941
One quarter (90 days)90126
One full year (365 days)365521
One leap year (366 days)366522

Practical uses

Project managers use this calculation to convert a delivery window into sprint cycles. A 73-day project contains 10 whole weeks and 3 days, which helps teams plan iterations without guessing.

Pregnancy tracking relies heavily on week counts. Medical guidelines often refer to gestational age in completed weeks, so knowing the exact span from the first day of the last period matters.

Academic calendars, subscription billing cycles and notice periods for rental agreements all specify durations in weeks. Converting raw dates into weeks removes ambiguity about when a deadline actually falls.

Edge cases and validation

Dates must follow the YYYY-MM-DD format and represent real calendar days. February 29 is accepted only in leap years; entering it for 2026 produces an error because 2026 is not a leap year.

The end date cannot come before the start date. If you need to measure a backward span, swap the two inputs. Negative durations are not meaningful for week counting.

All arithmetic uses UTC timestamps internally. This means crossing a local daylight saving boundary does not add or subtract an hour from the day count, keeping the result consistent regardless of your time zone.

If you need the raw day count rather than weeks, the days between dates calculator provides that directly. For longer spans measured in months, try the months between dates tool instead.

Worked examples

ExampleInputResult
First quarter of 2026Start date: 2026-01-01; End date: 2026-03-31; Include end date: noWhole weeks: 12; Remaining days: 5; Decimal weeks: 12.714286; Total days: 89
Same dayStart date: 2026-06-15; End date: 2026-06-15; Include end date: noWhole weeks: 0; Remaining days: 0; Decimal weeks: 0; Total days: 0
Exactly four weeksStart date: 2026-02-01; End date: 2026-03-01; Include end date: noWhole weeks: 4; Remaining days: 0; Decimal weeks: 4; Total days: 28
Inclusive countStart date: 2026-01-01; End date: 2026-01-14; Include end date: yesWhole weeks: 2; Remaining days: 0; Decimal weeks: 2; Total days: 14

FAQ

How do I calculate weeks between dates manually?

Count the total days between the two dates, then divide by 7. The integer part is whole weeks and the remainder is leftover days. This tool automates that process and handles leap years correctly.

What does inclusive counting mean?

Inclusive counting adds one extra day to the total span so that both the start and end dates are considered part of the period. Choose this option when planning events that include the final day. The end date must still be on or after the start date, so a range that ends before it starts is rejected with an error in both modes.

Why does the tool require YYYY-MM-DD format?

The ISO 8601 format eliminates ambiguity between regional conventions like MM/DD/YYYY and DD/MM/YYYY. It also allows the parser to validate the date reliably without guessing which number is the month.

Does daylight saving time affect the result?

No. All date arithmetic is performed at midnight UTC, so local clock changes never alter the number of days or weeks returned.

Can I enter dates before 1970?

Yes. The underlying UTC timestamp supports dates well before the Unix epoch, so historical dates work as long as they are valid calendar days in YYYY-MM-DD format.

How many weeks are in a typical year?

A standard 365-day year contains 52 whole weeks and 1 extra day. A leap year has 52 whole weeks and 2 extra days.

Is my data sent to a server?

No. Everything runs locally in your browser. The dates you type never leave your device.