Frasier is 40 when the show begins, and 51 when it ends. Niles is his younger brother. Frasier is depicted as being old enough to say "I don't like him" at Niles' birth, and both are clearly referenced and depicted as being in prep school together. Is Niles' age ever explicitly stated, beyond being younger than Frasier? If not, how far can we narrow down the age difference?
Most Internet sources (Wikipedia, Wikia, IMDb, etc.) state/estimate that Frasier was born in 1952 while Niles was born in 1957. There appears to be no listed source for Niles' date of birth, but Frasier is well covered: