Formulas and sources
Each formula this calculator uses, where it comes from, and what it leaves out. "How it works" shows the same formula with your own numbers.
Age in years, months and days
Simple and Date Check modes
- Age
- whole years, then whole months, then the days left over
- DOB
- date of birth
- As of
- the date the age is measured on: today, or the date you choose in Date Check
When a month has no day matching the birthday (February 29 in a common year, or the 31st in a shorter month), that month is complete on the 1st of the next month.
Source: Uses the Gregorian calendar as the JavaScript and HTML standards define it [1][2]. The month-end rule is CalcTrail's own; for a February 29 birthday it gives March 1, as current Hong Kong law does [3]. Other rules differ: US Social Security counts an age from the day before the birthday [4]. The unit factors are NIST's [5].
Next birthday and milestones
Simple and Date Check modes
The next birthday and the 50th birthday follow the same calendar and month-end rule. The 10,000-day, 25,000-day and billion-second countdowns start from the total days, the count of days between the two dates. Hours, minutes and seconds are that count × 24, × 1,440 and × 86,400, from midnight to midnight.
Source: CalcTrail's own round-number milestones; no publisher.
Sources
- Ecma International. ECMA-262, ECMAScript 2026 Language Specification, §21.4.1.1 Time Values and Time Range, and §21.4.1.5 DaysInYear. 17th edition, June 2026.
- WHATWG. HTML Living Standard, §2.3.5 Dates and times. Living Standard, read October 5, 2026.
- Hong Kong SAR, Hong Kong e-Legislation. Age of Majority (Related Provisions) Ordinance (Cap. 410), section 5, Time at which a person attains a particular age. Version of December 13, 2018.
- Social Security Administration. 20 CFR 404.2: General definitions and use of terms, paragraph (c)(4), Attainment of age. eCFR, current as of October 1, 2026.
- National Institute of Standards and Technology. NIST Guide to the SI, Appendix B.8: Factors for units listed alphabetically, day, hour and minute. Special Publication 811, 2008 edition.
What this calculator does not cover
- It works in whole calendar days, so the time and the time zone of birth are not used.
- Every date is read as a Gregorian date, even one from before a country adopted that calendar.
Sources checked on .