How to Calculate Age From a Date of Birth
By the Calculator.hair team · Updated · 7 min read
Short answer
To calculate age, subtract the birth date from the target date in three parts: years, months, then days. If the days come out negative, borrow the length of the previous month. If the months come out negative, borrow 12 months from the years. Someone born October 20, 1990 is 35 years, 4 months and 18 days old on March 10, 2026.
Key takeaways
- Age counts completed units: whole years first, then whole months, then the days left over.
- When the day subtraction goes negative, add the length of the month before the target date's month.
- Our calculator treats the birth date as day zero, so you are 0 days old on the day you are born.
- A February 29 birthday falls on March 1 in common years in our calculator, the same day the year count ticks over.
- In a spreadsheet, DATEDIF returns the same whole years and months, but Microsoft warns against its "MD" unit for the days.
What is the formula for calculating age?
Age = target date − date of birth, subtracted one unit at a time: years minus years, months minus months, days minus days. The result is your age in completed units, so a person is 35 until the full 36th year is finished, not when it begins.
When the target day and month are both at or past the birth day and month, no adjustment is needed. For someone born June 15, 1990, the age on August 20, 2026 takes three subtractions, shown in the table. The age calculator returns the same 36 years, 2 months and 5 days.
| Unit | Target date | Birth date | Difference |
|---|---|---|---|
| Years | 2026 | 1990 | 36 |
| Months | 8 (August) | 6 (June) | 2 |
| Days | 20 | 15 | 5 |
How do you borrow when the days or months are negative?
Add the length of the previous month to the negative days and take 1 from the months, then add 12 to any negative months and take 1 from the years. Borrowing here works like borrowing in column subtraction, except that a month holds 28 to 31 days instead of a fixed 10.
Worked example: born October 20, 1990, age on March 10, 2026. The first pass gives 36 years, −7 months and −10 days, so both the days and the months need a borrow. The month before March 2026 is February, which has 28 days that year.
| Step | Years | Months | Days |
|---|---|---|---|
| Subtract each unit | 36 | 3 − 10 = −7 | 10 − 20 = −10 |
| Borrow 28 days from February | 36 | −7 − 1 = −8 | −10 + 28 = 18 |
| Borrow 12 months from the years | 36 − 1 = 35 | −8 + 12 = 4 | 18 |
You can check the answer by counting forward. The 35th birthday was October 20, 2025. Four months later is February 20, 2026, and 18 more days reaches March 10. That is 35 years, 4 months and 18 days, which matches the table.
How does our age calculator count?
It compares calendar dates only and counts completed years, then months, then days, with the birth date as day zero. There is no time of birth field, so the answer doesn't change during the day and no time zone or daylight saving shift can affect it.
The fine print matters only near the ends of months, where different tools can disagree by a day or two:
- The birth date itself is not counted as a day. Your age on your date of birth is 0 years, 0 months and 0 days.
- Days are borrowed from the month just before the target date's month, as in the example above.
- If the birth day doesn't exist in that shorter month, whole months are counted with the date clamped to the end of the month. Born January 31, 1990, the age on March 1, 2026 is 36 years, 1 month and 1 day, because 36 years and 1 month lands on February 28, and one more day reaches March 1.
- The totals are exact day counts converted to other units, using 24-hour days.
The table shows everything the calculator reports for the October 20, 1990 example. The month total is 35 × 12 + 4 = 424, with the same 18 days left over.
| Measure | Born October 20, 1990, on March 10, 2026 |
|---|---|
| Years, months, days | 35 years 4 months 18 days |
| Months and days | 424 months 18 days |
| Weeks and days | 1,846 weeks 3 days |
| Days | 12,925 days |
| Hours | 310,200 hours |
| Born on a | Saturday |
| Next birthday | Tuesday, October 20, 2026 (in 224 days) |
How do you calculate age for a February 29 birthday?
Use the same subtraction, and treat March 1 as the birthday in common years. That is how our calculator works: someone born February 29, 2000 reaches a new year of age on March 1 in a common year and on February 29 in a leap year. The day before, they are still one day short of the next whole year.
February 29 exists only in leap years. In the Gregorian calendar, a year divisible by 4 is a leap year, except that century years must be divisible by 400, according to the US Naval Observatory. So 2000 was a leap year, and 2100 won't be.
| Born February 29, 2000, age on | Age | Next birthday shown |
|---|---|---|
| February 28, 2026 | 25 years 11 months 30 days | March 1, 2026 (in 1 day) |
| March 1, 2026 | 26 years 0 months 0 days | March 1, 2027 (in 365 days) |
| February 28, 2028 | 27 years 11 months 30 days | February 29, 2028 (in 1 day) |
| February 29, 2028 | 28 years 0 months 0 days | March 1, 2029 (in 366 days) |
March 1 is a counting rule in our calculator, not a legal definition. If a license, benefit or contract depends on the exact date a leap-day birthday turns a given age, ask the agency or organization involved how it counts.
How do you calculate age in Excel or Google Sheets?
Use DATEDIF(start_date, end_date, unit), with the birth date in one cell and the target date in another. Both Excel and Google Sheets support it. With the birth date in A2 and the target date in B2, this formula builds the full result:
=DATEDIF(A2,B2,"Y")&" years "&DATEDIF(A2,B2,"YM")&" months "&DATEDIF(A2,B2,"MD")&" days"
For the October 20, 1990 example, the three parts should come to 35, 4 and 18. To get a current age in whole years, use =DATEDIF(A2,TODAY(),"Y").
| Unit | What it returns | Use for |
|---|---|---|
| "Y" | Complete years | Age in years |
| "M" | Complete months | Total months |
| "D" | Total days | Total days |
| "YM" | Months, ignoring years | The months part of an age |
| "MD" | Days, ignoring months and years | The days part of an age (see the warning below) |
| "YD" | Days, ignoring years | Days since the last birthday |
Microsoft advises against the "MD" unit because it has known limitations and can return a negative number, zero or an inaccurate result. If the days part of an age matters, for example near the end of a month, check it against the age calculator. Whole years from "Y" are enough for most uses.
How do you find your age in days, weeks or months?
Count the total days between the two dates, then divide by 7 for weeks. The October 20, 1990 example is 12,925 days, and 12,925 ÷ 7 = 1,846 weeks with 3 days left over. Months come from the calendar result rather than from a division, because months vary in length: 35 years and 4 months is 424 months.
Dividing total days by 365.25 gives a useful decimal age: 12,925 ÷ 365.25 is about 35.39 years. It is an approximation, and it doesn't convert neatly to months and days, so use the calendar method when you need an exact age.
The day counter gives the same day total for any two dates, and our guide to counting the days between dates explains the hand method. To go the other way and find the date a set number of days after a birthday, use the add-or-subtract form on the date calculator.
How do you work out a birth year from an age?
Subtract the age from the current year, then subtract 1 more if this year's birthday hasn't happened yet. On March 10, 2026, someone who is 35 with an October birthday was born in 2026 − 35 − 1 = 1990. If the birthday has already passed, skip the extra subtraction.
The same logic gives a quick mental age: subtract the birth year from the current year, then take off 1 if the birthday is still ahead. Born in 1990 and checking in March 2026 with an October birthday, 2026 − 1990 − 1 = 35. That shortcut gives whole years only, which is usually all a form asks for.
Calculators in this guide
Frequently asked questions
How do I calculate my age from my date of birth?
Subtract your birth year, month and day from the target year, month and day. Borrow from the previous month if the days are negative, and borrow 12 months from the years if the months are negative.
What is the age calculation formula?
Age = target date − date of birth, in completed years, months and days. For age in whole years only, subtract the birth year from the current year and take off 1 if this year's birthday hasn't arrived.
How old am I if I was born in 2000?
It depends on the date you check and on your birthday. On November 4, 2026, you are 26 if your birthday has already passed this year and 25 if it hasn't.
Does an age calculator count the day you were born?
Ours doesn't. The birth date is day zero, so your age is 0 days on that date, and the first full day is counted on the following date.
When does someone born on February 29 turn a year older?
In our calculator, on March 1 in common years and on February 29 in leap years. Legal treatment can differ, so check with the organization involved if the exact date matters.
Why do two age calculators give different days?
They can borrow days from different months or handle month ends differently, such as a January 31 birth date near March 1. The years and months nearly always match, and the difference is usually a day or two.