AgeCalc

Calculation Methodology & Edge Cases

Every AgeCalc calculator runs on the same small set of date-arithmetic rules, documented here so you can reproduce any result by hand.

The Core Rules

  • Complete units only. A year or month is counted only when it is fully complete. Whatever is left over is expressed in the next smaller unit, ending in days.
  • Month-end clamping. When a monthly anniversary does not exist in a shorter month, it is observed on the last day of that month. For example, the one-month anniversary of January 31 is February 28 (or February 29 in a leap year). So January 31 to March 1 is 1 month, 1 day โ€” not a negative or fractional result.
  • Leap-day birthdays. A person born on February 29 has their birthday observed on February 28 in non-leap years. February 29, 2024 to February 28, 2025 is exactly 1 year.
  • Midnight normalization. All dates are compared at midnight local time, so the time of day never changes a result.
  • Totals are exact. Total days, weeks, hours, and minutes are computed from the exact number of midnights between the two dates, so leap years are always counted correctly (2020-01-01 to 2021-01-01 is 366 days).

The Years;Months Assessment Format

School and clinical assessments commonly record chronological age as years;months (for example, 5;4 for 5 years and 4 months). Partial months are always rounded down โ€” a child who is 5 years, 4 months, and 26 days old is recorded as 5;4. AgeCalc produces this format on the assessment age calculator, Brigance age calculator, Pearson age calculator, and age in months calculator.

Corrected (Adjusted) Age Formula

Corrected age for premature babies is the age the child would be if born on their due date:

  • Corrected age = assessment date โˆ’ due date
  • Weeks premature = (due date โˆ’ birth date) รท 7
  • Equivalently: corrected age = chronological age โˆ’ weeks premature.

If the assessment date falls before the due date, corrected age is negative and reported as 0. Following guidance from the American Academy of Pediatrics (HealthyChildren.org), correction is typically used until the child's second birthday, and only for developmental milestones and growth โ€” never for vaccination schedules or medication dosing, which always use chronological age. See the adjusted age calculator for the interactive version and sources.

Edge Cases We Test

The calculation functions are covered by automated unit tests that run on every change, including:

  • Month ends: Jan 31 โ†’ Feb 28/29, Mar 31 โ†’ Apr 30, Dec 31 โ†’ Jan 30
  • Leap days: Feb 29 birthdays across leap and non-leap years
  • Future dates and same-day dates (result is zero, never negative)
  • Time-of-day boundaries (11:59 PM vs midnight)
  • Due date before, on, and after the birth date (preterm, term, post-term)
  • Corrected age before the due date (reported as 0)
  • The second-birthday boundary where correction typically stops

Editorial Review

Pages that make health-adjacent or assessment-related claims show a visible review panel with sources and a last-reviewed date. Content is reviewed by the AgeCalc Editorial Team against primary sources such as the American Academy of Pediatrics' HealthyChildren.org before publication and after any change to the calculation logic. AgeCalc calculators are educational tools and are not affiliated with Brigance, Pearson, or any other assessment publisher.

Found a calculation you believe is wrong? The conventions above are the contract โ€” if a result contradicts them, it is a bug. Reach us via the about page.