HomeEveryday Life › Age Calculator

Age Calculator

Computes the exact age on a given date as years, months and days by Gregorian calendar arithmetic, plus total days and weeks, the weekday of birth, and the date of and days until the next birthday.

When to use

You need someone's exact age on a date, the total number of days lived, the weekday they were born on, or how many days remain until their next birthday.

Do not use when: You need the difference between two arbitrary dates with a business-day count (use date-difference) or a countdown to an event (use days-until).

Formula

years, months, days = calendar difference birth_date → as_of_date (when the day-of-month is smaller, days are borrowed from the month before as_of_date); total_days = as_of_date − birth_date; total_weeks = total_days / 7; age_decimal_years = total_days / 365.2425; next_birthday = first (month, day) of birth on or after as_of_date

Uses the proleptic Gregorian calendar in UTC; no time zones or times of day are considered. A person born on 29 February is treated as having their birthday on 1 March in common years.

Inputs

ParameterTypeUnitRequiredDescription
birth_datedateyesDate of birth (ISO 8601, YYYY-MM-DD).
as_of_datedatedefault todayDate on which to evaluate the age; defaults to the current UTC date.

Outputs

OutputTypeUnitDescription
yearsintegerCompleted years.
monthsintegerCompleted months beyond the years (0–11).
daysintegerDays beyond the completed months.
age_textstringAge written as years, months and days (zero parts omitted).
total_daysintegerdaysDays from birth_date to as_of_date.
total_weeksnumberweekstotal_days / 7.
age_decimal_yearsnumberyearstotal_days / 365.2425 (mean Gregorian year).
next_birthday_datedateFirst birthday anniversary on or after as_of_date (a 29 February birthday falls on 1 March in non-leap years).
days_until_next_birthdayintegerdays0 on the birthday itself.
day_of_week_bornstringDay of the week of birth_date.

Example

Born 1990-05-17, as of 2026-09-23: {"birth_date":"1990-05-17","as_of_date":"2026-09-23"}{"years":36,"months":4,"days":6,"age_text":"36 years 4 months 6 days","total_days":13278,"total_weeks":1896.9,"age_decimal_years":36.35,"next_birthday_date":"2027-05-17","days_until_next_birthday":236,"day_of_week_born":"Thursday"}

Born 1985-12-25, as of 2026-01-10: {"birth_date":"1985-12-25","as_of_date":"2026-01-10"}{"years":40,"months":0,"days":16,"age_text":"40 years 16 days","total_days":14626,"next_birthday_date":"2026-12-25","days_until_next_birthday":349,"day_of_week_born":"Wednesday"}

GET https://tttkmbb.com/api/v1/calculate/age?birth_date=1990-05-17&as_of_date=2026-09-23

Machine access

Sources

FAQ

How are months counted when the day of the month does not fit?

Whole months are counted first; the leftover days are borrowed from the month preceding as_of_date. Born 31 January, on 1 March the age is 1 month 1 day (February has 28 or 29 days).

What happens with a 29 February birthday?

In common years the birthday is taken as 1 March, so days_until_next_birthday counts to 1 March; in leap years it counts to 29 February.

Related calculators