Compare the month and day with the as-of date before you trust the year gap. If today is before the birthday, the person is one year younger than the raw subtraction. If the day of the month has not arrived, the current month is not a full month either.
Leap-day birthdays only exist on February 29. A calculator should reject February 30 and should not invent a birthday. For a form that says “age attained on the anniversary,” follow that form instead of a general calendar age.