How to count weeks and days between two dates
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)Express a date gap as "6 weeks, 3 days" — ages of projects, pregnancies, sprints.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel (desktop) | =INT((B2-A2)/7)&" weeks, "&MOD(B2-A2,7)&" days" | For a plain decimal week count: =(B2-A2)/7. |
| Google Sheets | =INT((B2-A2)/7)&" weeks, "&MOD(B2-A2,7)&" days" | Identical. |
| LibreOffice Calc | =INT((B2-A2)/7)&" weeks, "&MOD(B2-A2,7)&" days" | Identical. |
How it works
Subtracting dates gives days (46 here, July 24 to September 8); INT of days÷7 gives complete weeks and MOD gives the leftover days — "6 weeks, 4 days". This counts elapsed 7-day blocks from the start date, which is usually what people mean; calendar-week boundaries (how many Mondays passed) are a different question — combine with the first-day-of-the-week recipe for that.
Verified, not just documented
We ran =INT((DATE(2026,9,8)-DATE(2026,7,24))/7)&" weeks, "&MOD(DATE(2026,9,8)-DATE(2026,7,24),7)&" days" in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 6 weeks, 4 days — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 6 weeks, 4 days for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.
Functions used
INT · MOD — see full Excel, Google Sheets & LibreOffice compatibility for each.
Related recipes
- How to convert minutes to hours and minutes
- How to find the next occurrence of a weekday (next Friday)
- How to remove the time from a date-time
- How to sum every nth row
- How to calculate a time difference that crosses midnight