How years and days are counted
Field A is the birth date and B is an optional “as of” date. If B is empty, today is used. Both strings are passed to the browser's date parser — use ISO form YYYY-MM-DD for predictable results.
Years subtract birth year from the reference year, then subtract one if the reference month/day is before the birthday. Days is the floor of milliseconds between the two instants divided by 86,400,000 (one UTC day in ms).
Invalid dates
If either value does not parse, the tool prints “Invalid date”. It does not break months into separate counters — only years plus total days. For gap between two arbitrary dates, try the date difference tool.
When exact age matters
School cutoffs, sports brackets, visa or contest eligibility, and milestone planning need years against a specific “as of” day—not a rough guess from birth year alone. Enter the official cutoff in B instead of leaving it blank when admissions or rules use a fixed date rather than today.
Questions
Does it account for leap years?
Yes, through the underlying Date object when computing the day count.
Is this a legal age-verification service?
No. It only does arithmetic from the dates you type. It does not check ID documents or issue certificates.