When the age itself is a noun, year old still needs to be hyphenated. For example: The 10-year-old was very loud. For being a 5-year-old, she's very independent.
Is six year old hyphenated?
If the phrase “year old” is used as a noun or comes before a noun, hyphenate it: My ten-year-old computer takes five minutes to boot up. That six-year-old paints like Jackson Pollock. A six-year-old doughnut is no longer edible.
Is 3 year old hyphenated?
So to sum up, you hyphenate an age when it's a noun or when it's a modifier that comes before a noun. The main time you don't hyphenate an age is when it comes after the noun it modifies. Ages are like every other compound modifier that way: you hyphenate them before the noun but not after the noun.