How to Calculate Age in Years, Months, and Days
Saying someone is "34 years old" is usually enough. But for official documents, insurance forms, medical records, or eligibility verification, you sometimes need the full breakdown: 34 years, 7 months, and 12 days. That requires a bit more than just subtracting years.
The Age Calculator handles this automatically. This article explains how the calculation works step by step — useful if you need to verify a result, do it manually, or build the logic into a spreadsheet or application.
The Basic Method
To find the age in years, months, and days from a birthdate to a target date:
1. Count completed years — find the most recent birthday on or before the target date 2. Count completed months — from the most recent birthday to the nearest month anniversary on or before the target date 3. Count remaining days — the days left between the last month anniversary and the target date
An example makes this clear.
Birthdate: March 15, 1990 Target date: November 4, 2026
Step 1 — Completed years: The most recent birthday was March 15, 2026. That is 36 complete years.
Step 2 — Completed months from March 15, 2026:
- April 15 = 1 month
- May 15 = 2 months
- June 15 = 3 months
- July 15 = 4 months
- August 15 = 5 months
- September 15 = 6 months
- October 15 = 7 months
- November 4 is before November 15, so we stop at 7 months
Step 3 — Remaining days from October 15 to November 4: October has 31 days. From October 15 to October 31 = 16 days. Plus November 1–4 = 4 days. Total: 20 days.
Result: 36 years, 7 months, 20 days
Why Simple Subtraction Doesn't Work
You might think you can just subtract the birthdates year by year, month by month, day by day. The problem is months have different lengths.
If you were born on January 31 and you want to know your age on March 1:
- January 31 to February 28 (or 29) = 1 month (even though it's fewer days than most months)
- February 28 to March 1 = 1 day
So you are 1 month and 1 day older — not 29 or 30 days, which is what a naive day subtraction would give you.
This is the core complication. Months are variable-length units. When you "add one month" to January 31, you get February 28 (or 29 in a leap year) — the last day of the month — because February has no 31st. This is called month-end clamping.
Month-End Clamping: The Edge Case That Trips People Up
If your birthday is on the 29th, 30th, or 31st of a month, some months do not have that day:
- Born January 30: the monthly anniversary in February is February 28 (or 29)
- Born January 31: same
- Born March 31: the monthly anniversary in April is April 30
This means the "day count" remaining after counting months can appear slightly inflated for people born late in a month. It is not an error — it is the correct result of how monthly anniversaries work in the real world.
Example: Born January 31. Target date: March 5.
- January 31 to February 28 = 1 month (last day of February, since there's no Feb 31)
- February 28 to March 5 = 5 days
- Result: 1 month, 5 days
If instead you had counted "February has 28 days, January 31 to March 5 is 33 days, 33 ÷ 30 = 1 month and 3 days" — you would get the wrong answer.
Leap Year Birthdays
People born on February 29 have a birthday that only exists every four years. In non-leap years, the convention in most countries is:
- Birthday is observed on February 28 (the day before March 1)
- Some countries and legal systems use March 1
For age calculation purposes, the birthday month anniversary in non-leap years is February 28. So a person born February 29, 2000, turns 30 on February 28, 2030 — not March 1.
Their next "real" February 29 birthdays after 2000 are: 2004, 2008, 2012, 2016, 2020, 2024, 2028, 2032. Notice the gap from 1900 (not a leap year) to 2000 (is a leap year, because divisible by 400) means February 29 anniversaries are spaced exactly 4 years apart in the recent past and near future.
How to Calculate Age Manually in a Table Format
For clarity, here is a step-by-step table approach for a birth date of July 22, 1985 and target date of April 10, 2026:
| Step | Calculation | Result |
|---|---|---|
| Most recent birthday | July 22, 2025 (July 22, 2026 is after April 10) | 40 completed years |
| Months from July 22, 2025 | Aug 22, Sep 22, Oct 22, Nov 22, Dec 22, Jan 22, Feb 22, Mar 22 = 8 months | 8 completed months |
| Next anniversary | April 22, 2026 (after April 10) | Stop at March 22, 2026 |
| Days from March 22 to April 10 | March: 22→31 = 9 days; April: 1→10 = 10 days | 19 remaining days |
| Age | 40 years, 8 months, 19 days |
Age in Days, Weeks, and Hours
Sometimes the years/months/days breakdown is not what you need. Exact days are more precise and avoid the variable-month problem entirely.
From July 22, 1985 to April 10, 2026:
- Total days = (2026 - 1985) × 365 + leap year days + adjustment for exact dates
- A simpler approach: use the Age Calculator which shows total days, weeks, and hours as well as the years/months/days result
Total days are most useful for:
- Infant development tracking (paediatric milestones use weeks for the first two years)
- Age verification in systems that use day counts rather than calendar dates
- Historical and scientific contexts where exact elapsed time matters
One week = 7 days exactly. One hour = 1/24 of a day. Converting total days to hours: multiply by 24. Converting to weeks: divide by 7.
Age Calculation in Spreadsheets
In Microsoft Excel or Google Sheets, the DATEDIF function calculates age components:
=DATEDIF(birthdate, today, "Y") — completed years
=DATEDIF(birthdate, today, "YM") — months after last birthday
=DATEDIF(birthdate, today, "MD") — days after last month anniversary
Combining them: =DATEDIF(A1,TODAY(),"Y")&" years, "&DATEDIF(A1,TODAY(),"YM")&" months, "&DATEDIF(A1,TODAY(),"MD")&" days"
Note: DATEDIF is an undocumented function in Excel (inherited from Lotus 1-2-3) and has known bugs with the "MD" parameter for certain end-of-month dates. For reliable results, the Age Calculator is more dependable than spreadsheet formulas when precision matters.
Why Different Tools Give Different Results
Age calculators sometimes disagree by a day, particularly around:
- Month-end birthdates (Jan 31, Mar 31, etc.)
- The day before a birthday
- End-of-February calculations in leap and non-leap years
These differences usually come down to how the tool handles month-end clamping and whether it counts the birthdate day as day 0 or day 1. There is no single universally correct answer for the edge cases — conventions vary by country and legal context. The Days Between tool can help verify the raw day count independently.


