The rules about references to age, and the proper use of hyphens in such references, are simple yet easily misunderstood. Here are a few explanations in response to readers’ questions about the topic.
1. Could you help me understand the correct way to write ages? For example, “My three-year-old was too young for the movie” is hyphenated, while “He is three years old” is not, or at least I don’t think it is.
Your examples are correct: Hyphenate “three-year-old” and similar phrases only when they serve as phrasal adjectives describing someone or something (or when, as in the case of the first example above, the someone or something of that age is implied). The simple phrase “three years old” merits no hyphenation, because it isn’t being combined to modify anything. Unfortunately, many people are confused by this distinction, so the phrase is often hyphenated incorrectly, and the frequently seen error perpetuates the confusion.
2. In your sentence “Write ‘fifty years old,’ for example, rather than ‘aged fifty years,’” the phrase should read “fifty years-old,” shouldn’t it?
“Fifty years old” should be styled just like that, as explained in the previous response; in reference to a fifty-year-old, hyphenate as shown whether what is fifty years old is explicit or implicit. Never hyphenate years and old while leaving the preceding number detached, and never hyphenate fifty and year without also including old in the hyphenated string of words; “fifty-year old man” refers to an old man who is fifty years, which is nonsensical. The only case in which years and old would be hyphenated is in a sentence such as “It’s a years-old tradition” — a reference to a tradition that is (many) years old.
3. “When a doctor was dictating a report, he said, ‘This is an approximately 40 50 year old woman . . . .’ It’s my job as a transcriptionist to make the doctor look good; I don’t just type verbatim. So I put, ‘This is an approximately 40- to 50-year-old woman . . . .’ ‘This is a 40-50-year-old woman . . .’ looks awful and confusing, even though that is actually what the doctor said. I could also have written, ‘This is a woman who is approximately 40 or 50 years old . . . .’”
Both of your solutions are elegant. If, however, you were required to transcribe verbatim — and I think doing so would be necessary only in a legal context — the solution would be, “This is an approximately 40-, 50-year-old woman.” The comma indicates a pause for expansion or self-correction.