To calculate age in Excel, subtract the birth date from today's date and format the result, or use one of three purpose-built formulas: DATEDIF for years, months, and days; YEARFRAC for a decimal age; and INT((TODAY()-DOB)/365.25) for a quick whole-year estimate. Each formula returns an age from a date of birth, but they handle the calendar arithmetic differently. DATEDIF is the most precise because it counts full years first, then leftover full months, then the remaining days — the same step-forward approach used by reliable date libraries such as date-fns. YEARFRAC returns a single decimal-year figure that is useful for financial and statistical work. INT with the 365.25 divisor is the fastest but least accurate, drifting by up to a day around leap years. For a true years-months-days breakdown that survives the 31st-of-the-month and February 29 edge cases, a dedicated age tool that runs the same borrowing logic in your browser is the safer choice. The free Age Calculator delivers that breakdown plus totals in months, weeks and days, and a live countdown to your next birthday, all updated live as you change the dates.

how to calculate age in excel
how to calculate age in excel

Excel Formulas That Return an Age

Excel ships with three built-in ways to convert a date of birth into an age, and each one fits a slightly different job. The most precise is DATEDIF, a hidden function that takes a start date, an end date, and a unit code — "Y" for whole completed years, "YM" for leftover months after the last full year, and "MD" for leftover days after the last full month. YEARFRAC returns a single decimal number of years between two dates under a chosen day-count basis. INT applied to the day difference divided by 365.25 is the bare-bones shortcut that many tutorials reach for first.

  1. Type the date of birth into cell A1 (for example, 15-Apr-1990) and make sure the cell is formatted as a date so Excel reads it as a serial number, not text.
  2. In cell B1 enter =DATEDIF(A1, TODAY(), "Y") to get the number of whole completed years between the birth date and today.
  3. To get the full years-months-days breakdown, chain three DATEDIF calls: =DATEDIF(A1,TODAY(),"Y")&"y "&DATEDIF(A1,TODAY(),"YM")&"m "&DATEDIF(A1,TODAY(),"MD")&"d" — the "YM" unit ignores whole years and "MD" ignores both years and full months, so the three pieces add back together cleanly.
  4. For a decimal age suitable for financial or actuarial work, use =YEARFRAC(A1, TODAY(), 1), where the final 1 selects the actual/actual day-count basis.
  5. For a rough but instant estimate, enter =INT((TODAY()-A1)/365.25); expect this to be off by up to a day on either side of a leap year, so treat it as approximate.

Working through a single substitution with DATEDIF: if A1 holds 1990-04-15 and the target date is 2026-11-20, then DATEDIF with "Y" returns 36 (full years from 15-Apr-1990 to 15-Apr-2026), DATEDIF with "YM" returns 7 (months from 15-Apr-2026 to 15-Nov-2026), and DATEDIF with "MD" returns 5 (days from 15-Nov-2026 to 20-Nov-2026). The combined result is 36 years, 7 months, 5 days, with no negative units and no borrowed month hiding in the background.

FormulaReturnsBest forKnown limit
=DATEDIF(A1, TODAY(), "Y")Whole completed yearsQuick birthday checks, eligibility flagsHides leftover months and days unless combined with "YM" and "MD"
=DATEDIF(...) chained with "Y", "YM", "MD"Years, months, days as textHuman-readable age in a single cellReturns #NUM if A1 is after TODAY() — guard with IF(A1<=TODAY(), ...)
=YEARFRAC(A1, TODAY(), 1)Decimal years (for example 36.61)Financial, actuarial, statistical workNot a human-readable age without rounding and a unit label
=INT((TODAY()-A1)/365.25)Rough whole yearsFast estimates on small listsDrifts by up to a day around each leap year

The Excel Age Problem: Borrowed Days and Short Months

The reason age arithmetic trips people up is borrowing. Months are not all the same length — February has 28 or 29 days, April has 30, and the rest have 31 — so subtracting day-from-day and month-from-month independently can produce impossible values such as a negative day count. The classic example is the gap from January 31 to March 1: by the naive shortcut, subtracting day-from-day and month-from-month independently yields an impossible result that needs to be cleaned up. Stepping forward from January 31 by one month lands on February 28 (or February 29 in a leap year), and one more day reaches March 1, so the correct answer is 1 month and 1 day. That is exactly the rule the Age Calculator follows, and the same rule DATEDIF implements internally.

When the current day is earlier in the month than the birth day, the calculator borrows one month and adds that month's real length to the day count — 28, 29, 30, or 31 days, never a fixed 30. If borrowing one month is still not enough to make the days non-negative, it borrows a whole year as well, keeping every component in its proper place. The result is self-consistent: the years, months, and days you read on screen always add back up to the exact span between the two dates, no matter where the birthdays fall.

Use the Age Calculator for an Exact Result

The Age Calculator runs the same step-forward arithmetic as DATEDIF, but applies it for you in real time and adds totals that DATEDIF alone does not give. Everything happens in your browser, so no date ever leaves your device, and the moment you change either field the numbers update without a refresh.

  1. Click the first date field labelled "Date of Birth" and pick or type your birth date — your exact age in years, months, and days appears immediately, with no button to press.
  2. Leave the second date on today's date to read your current age, or change it to any past or future reference date to see how old you were — or will be — at that moment.
  3. Read the full result: the years-months-days breakdown at the top, the totals in months, weeks, and days below it, and a live countdown to your next birthday.

If you also need to do the calculation inside Excel rather than online, our step-by-step Excel age formula guide walks through the same formulas with screenshots and guard clauses for blank cells.

What the Age Calculator Shows You

Beyond the headline years-months-days split, the tool exposes three totals that are useful for milestones where the units themselves matter. A baby's age in weeks is the standard for paediatric check-ups in the first year; an anniversary counted in days is what insurance and pension forms ask for; total months is the figure that some legal age thresholds state explicitly. The years-months-days breakdown and the totals describe the same span — the calendar-day count between the two dates — so you can quote whichever unit the form or conversation needs without converting anything in your head.

The next-birthday countdown counts forward from today to the next occurrence of your birth month-and-day, applying the same February 28 fallback that the rest of the calculator uses. If your birthday is February 29, the countdown targets February 28 in common years and February 29 in leap years, so your birthday repeats every year — exactly how often you gain a full year.

Edge Cases the Tool Handles for You

Three situations regularly break home-grown age math, and the Age Calculator has rules for all of them. First, February 29 birthdays: a year is a leap year under the Gregorian rule if it is divisible by 4, except for century years that must also be divisible by 400 — so 2000 was a leap year but 1900 and 2100 were not. In common years, the tool observes your birthday on February 28, the convention used across much of Europe and in many legal systems, so you gain a full year each year rather than only once every four. Second, future or past reference dates: setting the second field to a date before your birth produces an explicit "date is in the future" message rather than a negative age. Third, the gap between Western and East Asian nominal age (虚岁), where a person is one at birth and gains a year at Lunar New Year rather than on their birthday — the two systems can differ by one to two years, and the calculator deliberately reports only the Western count.

AspectWestern age (this tool)East Asian nominal age (虚岁)
Age at birth01
When age incrementsEach individual birthdayLunar New Year, sometimes also at birth
Direction of difference vs. the other systemUsually 1–2 years lowerUsually 1–2 years higher
Used byIDs and official forms in most of the worldTraditional and some legal uses in China, Korea, parts of Japan

Because the Age Calculator runs entirely in your browser, you can experiment freely: change the reference date to next year to see how old you will be, set it to your wedding date to see how long you have been married, or set it to the date a form asks about and copy the years figure straight into the field. If you also want to do the math offline in Excel, the DATEDIF formulas above give you a reliable starting point, and the totals in months, weeks, and days from the calculator tell you whether the spreadsheet's "years only" answer is enough.