Time & Dates

Age calculator: exact age in years, months and days

Calendar age is three subtractions with borrowing, not one division. Here is the algorithm, a worked example across a month boundary, and why decimal age differs.

By the Life Calculator team Updated Free, no sign-up Nothing you type leaves your device

Your numbers

Result

Result
--

Runs entirely in your browser. Nothing you type is sent anywhere, stored or shared.

In short

  • Calendar age subtracts years, months and days separately, borrowing the length of the preceding month when the day figure goes negative.
  • Total days divided by 365.25 answers a different question and can round a 37-year-old up to 38 the day before a birthday.
  • A Gregorian year is a leap year if divisible by 4, not if divisible by 100, unless also divisible by 400.
  • A February 29 birth has no anniversary in common years, so the age increments on March 1 under this arithmetic.
  • Legal age is defined in whole completed years, which is why thresholds never use a rounded decimal age.
On this page
  1. The formula behind calendar age
  2. A worked example, done by hand
  3. Calendar age against decimal age
  4. Leap years and the February 29 problem
  5. Where each input comes from
  6. How to read the result
  7. Other systems of age reckoning
  8. What this model leaves out
  9. Common mistakes

Your age is not a subtraction. It is a comparison of two calendar dates handled in three separate units -- years, months and days -- where each unit can borrow from the one above it. That is why an age of "37 years, 3 months, 12 days" cannot be reached by dividing a day count by 365, and why two tools can disagree about your age in months while agreeing exactly on your age in years.

This calculator takes a date of birth and an "age as of" date, defaulting to today when the second field is left blank, and returns the calendar age in years, months and days, plus the totals that follow from it: days lived, weeks, completed months, approximate hours, the weekday you were born on, your next birthday, the days remaining until it, and the age you reach on it.

The sections below set out the borrowing algorithm, work an example by hand across a month boundary, explain why the decimal method gives a different answer, and cover the leap-year rules that make the whole thing awkward.

The formula behind calendar age

Write the birth date as Y1-M1-D1 and the reference date as Y2-M2-D2. Subtract each component separately, then repair any negative result by borrowing.

Formula: years = Y2 - Y1, months = M2 - M1, days = D2 - D1. If days < 0, add the number of days in the month preceding the reference date to days and subtract 1 from months. If months < 0 after that, add 12 to months and subtract 1 from years.

Every symbol: Y1, M1, D1 are the year, month number (1 to 12) and day of month of birth; Y2, M2, D2 are the same three for the date you are measuring to. The borrow quantity is not a constant -- it is the length of the month before the reference month, which is 28, 29, 30 or 31 depending on where in the calendar you are standing.

That variable borrow is the whole reason age arithmetic resists a one-line formula. Two people the same number of days old can differ by a day in the month field simply because one of them crossed February and the other crossed July.

Total days lived is a separate calculation and a much simpler one: it is the count of midnights between the two dates, leap days included, with no borrowing anywhere.

A worked example, done by hand

Worked example: born November 23, 1988, measured as of March 7, 2026.

  1. Subtract the components: years 2026 - 1988 = 38, months 3 - 11 = -8, days 7 - 23 = -16.
  2. Days are negative. The month before March 2026 is February 2026, which has 28 days because 2026 is not a leap year. So days = -16 + 28 = 12 and months = -8 - 1 = -9.
  3. Months are still negative. Borrow a year: months = -9 + 12 = 3 and years = 38 - 1 = 37.
  4. The calendar age is 37 years, 3 months, 12 days.

Now the day total, computed independently as a check. Thirty-seven full years from November 23, 1988 to November 23, 2025 contain 9 leap days (1992, 1996, 2000, 2004, 2008, 2012, 2016, 2020 and 2024), so that stretch is 37 x 365 + 9 = 13,514 days. From November 23, 2025 to March 7, 2026 is 30 + 31 + 31 + 12 = 104 days. The total is 13,514 + 104 = 13,618 days.

From that single number the rest follows: 13,618 / 7 = 1,945 complete weeks with 3 days left over; 37 x 12 + 3 = 447 completed months; and 13,618 x 24 = 326,832 hours. That birth date fell on a Wednesday, the next birthday is November 23, 2026, which is 261 days after March 7, and the age reached then is 38.

Calendar age against decimal age

Divide 13,618 days by 365.25 and you get 37.28 years. That is not wrong, it is a different question: it measures elapsed time as a quantity, where calendar age measures completed anniversaries. The two answers diverge most sharply just before a birthday.

Age as of Calendar age Total days Days / 365.25
Mar 7, 2026 37 y, 3 mo, 12 d 13,618 37.28
Jun 1, 2026 37 y, 6 mo, 9 d 13,704 37.52
Nov 22, 2026 37 y, 11 mo, 30 d 13,878 38.00
Nov 23, 2026 38 y, 0 mo, 0 d 13,879 38.00
Jan 1, 2027 38 y, 1 mo, 9 d 13,918 38.11

Look at the November 22 row. The decimal method reports 37.996 years, which displays as 38.00 at two decimal places, while the calendar method correctly says the person is still 37. On the day before a birthday, rounding a decimal age makes people a year older than they legally are.

Use calendar age for anything with a threshold in it -- eligibility, consent, licensing, retirement. Use decimal age when you need a continuous variable for arithmetic, such as growth curves, actuarial tables or plotting a quantity against age. The divisor 365.25 is itself an approximation; the mean Gregorian year is 365.2425 days, which changes 37.284 to 37.285 here.

Leap years and the February 29 problem

The Gregorian rule has three clauses, applied in order: a year is a leap year if it is divisible by 4, except that it is not if it is divisible by 100, except that it is if it is divisible by 400. That gives 97 leap days per 400 years and a mean year of 365.2425 days.

Year Divisible by 4 By 100 By 400 Leap year
1900 yes yes no no
1996 yes no -- yes
2000 yes yes yes yes
2024 yes no -- yes
2026 no -- -- no
2100 yes yes no no

A birth on February 29 has no anniversary in three years out of four. The borrowing algorithm resolves this by arithmetic rather than by decree, and the result is that the age increments on March 1 in common years.

Age as of Age of a Feb 29, 2004 birth Total days
Feb 28, 2026 21 y, 11 mo, 30 d 8,035
Mar 1, 2026 22 y, 0 mo, 0 d 8,036
Feb 29, 2028 24 y, 0 mo, 0 d 8,766

Jurisdictions do not all agree with that. Some statutes treat the anniversary as falling on February 28 in common years, which matters only for people whose birthday sits exactly on the boundary of a legal threshold. The day count is unaffected either way.

Where each input comes from

The date of birth should come from a birth certificate or passport rather than memory of a document, because transposed month and day fields are the most common source of a wrong answer, particularly when a record was created under a day-month-year convention and is being read as month-day-year.

The "age as of" field is the one people underuse. Leave it blank for today. Fill it in when a rule fixes the measuring date -- age on the first day of a school year, age at the end of a plan year, age on the date a policy is written, age on the date of an exam. The answer can differ by a full year from today's age.

The result is far more sensitive to the reference date than to anything else, and the sensitivity is concentrated in a single day: the birthday. Nothing else in this calculation produces a discontinuity.

How to read the result

The years figure is the number that has legal meaning almost everywhere. The months and days remainder tells you how far you are past that anniversary, which matters for pediatric growth references, developmental milestones and any rule expressed in months.

Completed months is years x 12 + months and always rounds down. A child of 447 completed months is 37 years and 3 months old, with the extra 12 days discarded. Do not compare that figure against a total-days-divided-by-30.44 estimate -- they answer different questions.

The hours figure is exact in the sense of days x 24 and approximate in the sense that civil days are not always 24 hours long. Where daylight saving is observed, one day a year runs 23 hours and another runs 25, so a wall-clock hour total drifts by a few hours over a lifetime. For scheduling work in hours, the date difference calculator and the time card calculator are the better tools.

Other systems of age reckoning

International age -- completed elapsed years, starting at zero -- is not the only convention that has been used. Traditional East Asian reckoning counted a newborn as one year old and advanced everyone by a year at the new year rather than on their birthday, so a person could be "two" a day after being born in late December. South Korea standardized on international age for most official purposes in 2023.

Life insurance underwriting sometimes uses "age nearest birthday", which rounds to the closest anniversary rather than the last one, so someone 37 years and 8 months old is treated as 38. Some pension and benefit rules use age at the last birthday preceding a fixed date, which is international age measured to a date other than today.

None of these are errors. They are different definitions, and the only real mistake is using a number produced under one convention where another is required.

What this model leaves out

  • Time of day. The calculation works in whole calendar dates. Someone born at 11:50 pm and someone born at 12:10 am the next morning are treated as a day apart even though 20 minutes separate them.
  • Time zones. The date of birth is the local date at the place of birth. Cross enough meridians and the local date elsewhere at that instant was different.
  • Calendar changes. Dates before the local adoption of the Gregorian calendar do not map cleanly onto it. Historical records can be stated in the Julian calendar, which drifted by 10 to 13 days depending on the century.
  • End-of-month ambiguity. From January 31 to March 1, is the elapsed span one month and one day, or two days short of two months? A single borrow of February's 28 days does not resolve it cleanly, and implementations differ. The day count never suffers from this.
  • Leap seconds. The hours figure ignores them entirely, which is correct for every practical purpose.

Common mistakes

Dividing by 365 instead of counting. Over 37 years, 9 leap days accumulate, so 13,618 / 365 = 37.31 overstates the decimal age by about 0.025 years -- roughly 9 days. The error grows with the span.

Rounding a decimal age up. As the table above shows, 37.996 years is not 38 years old. Anything with an eligibility threshold needs the calendar method.

Confusing "in your 38th year" with "38 years old". A person aged 37 is living through their 38th year. The ordinal is one ahead of the cardinal, which is the same off-by-one that makes the year 2000 part of the 20th century.

Assuming months are interchangeable. Two months from December 31 and two months from January 31 do not land the same distance apart in days. If a deadline is expressed in months, count it on a calendar rather than in units of 30.

Using today when a rule fixes another date. Eligibility rules almost always specify the measuring date. Age today and age on the required date are frequently different by a year.

If you are measuring a span that is not an age -- a project length, a notice period, a tenure -- the date difference calculator handles inclusive counting and weekday totals. For long-horizon planning where the number of years drives the outcome, see the compound interest calculator and the inflation calculator, or browse everything on the full calculator index.

Frequently asked questions

How do you calculate age from a date of birth by hand?
Subtract the year, month and day of birth from the year, month and day of the reference date, treating each as a separate column. If the day result is negative, add the number of days in the month before the reference date and reduce the month result by one. If the month result is then negative, add twelve and reduce the year result by one. What remains is the age in completed years, months and days. The years figure is the one used for legal purposes almost everywhere.
Why does dividing total days by 365 give a different age?
Because roughly one year in four has 366 days. Over 37 years about 9 leap days accumulate, so a straight division by 365 credits you with more elapsed years than you have actually lived. Dividing by 365.25 is closer, and 365.2425 is closer still, since that is the mean length of a Gregorian year. Neither division can reproduce calendar age exactly, because calendar age counts completed anniversaries rather than measuring a quantity of elapsed time.
When does someone born on February 29 have a birthday?
In leap years the anniversary falls on February 29. In common years there is no such date, so a convention is needed. The borrowing arithmetic used here increments the age on March 1, because February 28 is still one day short of a completed year. Some statutes instead treat February 28 as the anniversary in common years. The total number of days lived is identical under either convention, so only threshold questions are affected.
What are the leap year rules exactly?
A Gregorian year is a leap year if it is divisible by 4, unless it is also divisible by 100, in which case it is not, unless it is further divisible by 400, in which case it is. So 1996 and 2024 are leap years, 1900 and 2100 are not, and 2000 is. The result is 97 leap days in every 400 years, giving a mean year of 365.2425 days -- close enough to the solar year that the drift is about one day in 3,200 years.
Should I use the age in years, or the age in years, months and days?
Use whole years for anything with an eligibility threshold: licensing, benefits, consent, retirement rules. Use the years, months and days breakdown when the remainder carries information, as it does for infant and child development references, or when you are describing tenure precisely. Use total days or decimal years when you need a continuous number to compute with, such as plotting a measurement against age or interpolating in an actuarial table.
Why does the calculator ask for an 'age as of' date?
Because many rules fix the date on which age is measured, and it is rarely today. School enrollment cutoffs, plan years, insurance policy dates, exam eligibility and benefit calculations all specify a measuring date. Entering that date returns the age that the rule actually uses. Left blank, the field defaults to today, which answers the everyday question. The difference between the two can be a full year when a birthday falls in between.
How many days are in a given number of years?
It depends on which years. A span of 4 consecutive years usually contains 1,461 days, but a span crossing 1900 or 2100 contains 1,460 because those centuries skip their leap day. Over long periods the average is 365.2425 days per year. For any specific pair of dates, counting the actual days between them is the only exact method, which is what the day total shown here does.
Is age counted the same way everywhere in the world?
Not historically. Traditional East Asian reckoning treated a newborn as one year old and advanced everyone at the new year rather than on individual birthdays, which could make a baby born in late December two years old within days. South Korea standardized on international age for most official purposes in 2023. Some insurance underwriting still uses age nearest birthday, which rounds to the closest anniversary rather than the most recent one.

Sources and further reading

Where this page relies on a published formula, an official figure or a legal rule, the primary source is listed here. External links open in a new tab and we earn nothing from them.

  1. USA.gov -- how to obtain vital records and birth certificates
  2. Social Security Administration -- age rules for retirement benefits
  3. NIST -- time and frequency, civil timekeeping standards
  4. CDC -- National Center for Health Statistics, birth and vital statistics
  5. Bureau of Labor Statistics -- data tabulated by age group

Related calculators

All time & dates tools →