noun
how many years; how long
Asks about the length of time measured in years. Often used with verbs of living, studying, working, continuing, or elapsed time.
日本語を何年勉強していますか。
How many years have you been studying Japanese?
ここに住んで何年になりますか。
How many years has it been since you started living here?
noun
what year
Asks for a specific calendar year, school year, fiscal year, or year in a timeline, rather than a duration.
彼が生まれたのは何年ですか。
What year was he born?
東京オリンピックは何年に開かれましたか。
What year were the Tokyo Olympics held?
Asks age in years old, while 何年 asks about years as a duration or date.
Transparent compound of 何, the interrogative 'what/how many,' and 年, 'year.' The reading なんねん is the regular counter-like reading used when asking about years.