How to calculate age from date of birth
Born on 15 March 1998, as of 6 October 2026, the age calculator returns 28 years, 6 months, and 21 days. That is the exact calendar age for those two dates. The same tool can freeze any as-of date, so you are not stuck with “today only.” Enter both dates in ISO form (YYYY-MM-DD) when you follow the worked example, so the numbers match the article’s locked calculator test.
Method in the calculator
- Enter date of birth.
- Enter the as-of date (or leave it for today when you use the live tool).
- Read years, months, and days in the result panel.
For the worked pair above, the breakdown also shows 10,432 total days, total weeks with leftover days, total hours, the weekday of birth, and days until the next birthday. Those extras come from the same calculation as the Y/M/D triple; they are not separate tools.
Future birth dates show a specific error. Invalid calendar dates (for example a day that does not exist in that month) also fail validation. Fix the inputs and recalculate rather than editing the displayed years by hand.
Birthday edge case
Take birth date 1 July 2010:
- As of 1 July 2030: 20 years, 0 months, 0 days (the anniversary itself).
- As of 30 June 2030: 19 years, 11 months, 29 days (the day before).
That pair is the same logic as the main example: the calculator advances the year count on the anniversary date, not the day before. Use it when a form cares about birthday eve versus birthday day.
Spreadsheet formulas
People often rebuild age in Excel with DATEDIF. Common unit strings are "y" and "ym".
Example shape (cell references are yours to choose):
- Years:
=DATEDIF(A1,B1,"y") - Months after years:
=DATEDIF(A1,B1,"ym")
Microsoft does not recommend the "md" unit. That argument can return a negative number, zero, or an inaccurate result. Prefer the on-site age calculator when you want the same Y/M/D logic as the rest of Numbrixiya.
For leftover days after complete years and months, subtract an EDATE shift of the total completed months from the end date:
=B1-EDATE(A1,DATEDIF(A1,B1,"y")*12+DATEDIF(A1,B1,"ym"))
Microsoft documents EDATE here: EDATE function.
When you need days instead of age
If the question is “how many calendar days between two dates?” rather than “how old?”, use how many days between two dates. Age and day-count tools answer different sentences. Day-count helpers also cover shifting a start date by N days; that is a planning task, not a calendar age.
Manual check without a spreadsheet
You can roughly verify 28 years, 6 months, 21 days by walking calendars: from 15 March 1998 to 15 March 2026 is 28 years; from 15 March 2026 to 15 September 2026 is 6 months; from 15 September 2026 to 6 October 2026 is 21 days. That walk matches the calculator for this pair. Leap days and month-length borrows get harder by hand, which is why the tool exists.
If a form asks only for completed years, report the years field and ignore months and days unless the form says otherwise.
Schools, visas, and clubs often mean “age as of a registration deadline,” not “age when you opened the browser.” Put that deadline in the as-of field so the Y/M/D triple matches the form’s date. The worked example freezes 2026-10-06 so the numbers stay reproducible in the article’s calculator test.
Try it
Enter 1998-03-15 and 2026-10-06 and confirm 28 / 6 / 21. Then flip the as-of date across a birthday to watch months and days reset. If you mistype a future birth date, expect an error message instead of a negative age.
Frequently asked questions
Can I calculate age on a date other than today?
Yes. Set the as-of date in the age calculator. The worked example uses 2026-10-06 on purpose.
What happens on the birthday itself?
On the anniversary date, years increase and months and days are zero in this calculator. The day before still shows the previous year count.
Does this replace legal age rules?
No. Forms and statutes can define age differently. Use the calculator for planning, then follow the form’s instructions.
How is this different from days between dates?
Age breaks the span into years, months, and days on a calendar basis. The date difference tool focuses on day counts and shifting dates.
Related articles
Dates & Time
How many days between two dates
From 1 Jan 2026 to 1 Apr 2026 is 90 calendar days (3 months). Add or subtract days, or count weekdays only, with the date difference calculator.