Age Calculator Tool calculates a calendar difference by counting complete years, complete months, and remaining days in that order. It calculates total days separately from normalized date-only values, and it moves a nonexistent target day to the final valid day of the target month.

Scope and date model

Age Calculator Tool accepts Gregorian calendar dates from January 1, 1900 through December 31, 2100. An input contains a year, month, and day, without a time of day or time zone. The “Today” control reads the visitor’s current local calendar date.

A start date must be on or before its endpoint. On the chronological age page, the start is the date of birth and the endpoint is the reference date. On the age difference page, the calculator sorts the two birth dates and uses the earlier date as the start.

Calendar difference algorithm

  1. Find the greatest whole number of years that can be added to the start date without passing the endpoint. This produces the year anchor.
  2. From the year anchor, find the greatest number from 0 through 11 of whole months that can be added without passing the endpoint. This produces the month anchor.
  3. Count calendar days from the month anchor up to the endpoint. Do not add the endpoint as an extra inclusive day.
  4. Calculate total days separately from normalized UTC day numbers, avoiding daylight-saving offsets.

Clamping nonexistent dates

When a target month does not contain the original day, the target is clamped to the last valid day of that month. January 31 plus one month becomes February 28 in 2023 or February 29 in 2024. March 31 plus one month becomes April 30.

Candidate months are calculated from the same year anchor. They are not created by repeatedly adding one month to the last clamped value. This prevents January 31 from drifting to the 28th in later months that do contain a 31st.

Leap-year convention

A year is a leap year when it is divisible by 4, except a century year must also be divisible by 400. Therefore 1900 and 2100 are not leap years, while 2000 is. This rule matches the U.S. Naval Observatory description of Gregorian leap years.

Under this site’s clamping rule, a February 29 birth anniversary falls on February 28 in a non-leap year. Other institutions or jurisdictions may define March 1. Their stated rule should control any official decision.

Reference examples

StartEndExpected result
June 15, 2000June 15, 202424 years, 0 months, 0 days
June 15, 2000June 14, 202423 years, 11 months, 30 days
December 31, 2024January 1, 20250 years, 0 months, 1 day
January 31, 2023February 28, 20230 years, 1 month, 0 days
January 31, 2024March 1, 20240 years, 1 month, 1 day
February 29, 2000February 28, 202525 years, 0 months, 0 days

Limits of the result

The calculators provide general calendar arithmetic. They do not calculate corrected gestational age, interpret test publisher rules, determine eligibility, or replace legal, medical, educational, or administrative guidance. When an authority supplies a specific convention, apply that convention to the official record.

Sources and verification

The Gregorian calendar and leap-year facts on this page are checked against the U.S. Naval Observatory references on calendar systems and leap years. The month-end clamping rule is this site's documented implementation choice. Use the age calculator verification checklist to replay a result and the common mistakes guide to diagnose disagreements.