What counting the weeks between two dates is for
Plenty of everyday timelines are tracked in weeks rather than loose days: pregnancy weeks logged at each prenatal visit, training blocks before a race, project sprints, course schedules, or how long you’ve been saving toward a goal. Turning a gap between two dates into weeks by hand is fiddly, because months vary in length and February changes in leap years.
This calculator takes your start date and end date and gives you the same gap in three shapes: the total days, the split into full weeks plus leftover days (for example, “16 weeks and 3 days”), and the weeks as a decimal (days divided by 7, to two places).
How to use it
- Pick the start date in the first field.
- Pick the end date in the second.
- Read the headline card: the weeks and days.
- Check the total days and decimal weeks cards.
- Swapping the dates is harmless: the tool shows the absolute difference and notes that the end date is before the start date. Use Copy result to send the summary to your clipboard.
How it is calculated
The method has three steps, and it is exactly what the tool runs:
- Total days = the absolute value of
(end − start), with each date measured at midnight. In code:Math.abs(end − start) / 86,400,000, where86,400,000is the number of milliseconds in a day. - Full weeks = the integer part of
days ÷ 7(the floor). - Leftover days = the remainder of that division, that is
days mod 7.
The decimal weeks are simply days ÷ 7 without rounding to a whole number, shown to two decimals.
To stop your time zone or daylight saving from shifting the result, each date is anchored to UTC midnight. That way the gap between two calendar dates always yields the same day count wherever you are. The count is exclusive: it counts the nights between the two dates and leaves out the start date, which is the standard for deadlines.
Worked example
How many weeks are there from September 1, 2026 to December 25, 2026? Count it in stretches: September 1 to October 1 is 30 days (September has 30); October 1 to November 1 is 31 days; November 1 to December 1 is 30 days; and December 1 to December 25 is 24 days. Altogether, 30 + 31 + 30 + 24 = 115 days.
Now divide: 115 ÷ 7 = 16 with a remainder of 3, so that is 16 weeks and 3 days. As a decimal, 115 ÷ 7 = 16.43 weeks. If you had entered the dates the other way around, you would get the same 115 days, and the tool would flag that the end date is earlier than the start date.
Handy equivalents
| Days | Weeks and days | Decimal |
|---|---|---|
| 7 | 1 week exactly | 1.00 |
| 14 | 2 weeks exactly | 2.00 |
| 30 | 4 weeks and 2 days | 4.29 |
| 90 | 12 weeks and 6 days | 12.86 |
| 100 | 14 weeks and 2 days | 14.29 |
| 365 (common year) | 52 weeks and 1 day | 52.14 |
| 366 (leap year) | 52 weeks and 2 days | 52.29 |
Frequently asked questions
Why isn’t a year exactly 52 weeks?
Because 52 weeks is 364 days and a common year has 365. That extra day leaves the year at 52 weeks and 1 day, and a leap year (366 days) at 52 weeks and 2 days. This is why a given date lands one weekday later each year, and two later after a leap-year February.
Does the tool include the start date in the count?
No. It counts the nights between the two dates, so the start date is not added. Monday to Thursday is 3 days, not 4. If your rules say to count “including the first day,” add 1 to the total days before dividing by 7.
Can I use it for pregnancy weeks?
As a rough guide, yes: set the first day of your last period as the start date and today as the end date, then read the weeks and days. Even so, tracking a pregnancy is always a job for a health professional; this tool is not a substitute for medical advice.
What happens if the end date is before the start date?
Nothing breaks. The tool takes the difference as an absolute value, shows the same number of weeks and days, and adds a note saying the end date is earlier than the start date, in case you filled the fields in the wrong order.
Does daylight saving affect the result?
No. Because each date is measured at UTC midnight and the result is rounded to whole days, your country’s clock changes never add or remove a day from the count.