Sometimes you need an age in weeks or total months, not years — a baby’s age, a subscription length, a project span. Simple division and DATEDIF give each unit.
The example
A start date measured in weeks and months.
| A | B | |
|---|---|---|
| 1 | Unit | Value |
| 2 | Weeks | 34.3 |
| 3 | Total months | 7 |
The formula
Weeks by division, months by DATEDIF:
How it works
Pick the unit that fits:
- Weeks:
(end − start) / 7— the day gap divided by 7. Wrap with INT or ROUNDDOWN for whole weeks. - Total months:
DATEDIF(start, end, "m")counts complete months. - Years as a decimal:
YEARFRAC(start, end)gives e.g. 7.5 years. - Combine units for a label: weeks for infants, months for tenure, years for anniversaries.
Whole weeks plus leftover days: =INT((end-start)/7)"w "&MOD(end-start,7)&"d". For a precise years-months-days breakdown, see the exact-age recipe with DATEDIF’s y/ym/md codes.
Try it: interactive demo
Pick a start date.
Variations
Whole weeks
Round down:
Years (decimal)
YEARFRAC:
Weeks + days
Combined label:
Pitfalls & errors
Weeks are decimal. /7 gives a fraction; use INT/ROUNDDOWN for whole weeks if needed.
DATEDIF "m" is whole months. It ignores leftover days — pair with "md" for the remainder.
YEARFRAC basis. The default day-count basis affects the decimal slightly; set the basis argument for financial precision.
Practice workbook
Frequently asked questions
How do I calculate age in weeks in Excel?
How do I get total months between two dates?
How do I get age as a decimal number of years?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class