The longest episode is The Two Hundredth, which was the only time Frasier ever played into NBC's penchant at the time for "super-sized" episodes. It runs 27 minutes.
The longest episode that was not advertised as being a "special" extended episode is Daphne Does Dinner at 25 minutes. This episode was only aired once in its full version, and a lot of people missed the opening scene, as it aired before the hour actually started while shows such as American Idol were still ending on other networks. NBC never aired it again in full, and the opening scene was one of the parts that was cut (along with the art restorer and the Speedy Gonzalez stuff). Of course, it is still highly sliced and diced in syndication. Since Season 10 was the last to be released on DVD, it was a long time before fans who missed the opening scene or the other parts were able to see the episode in its full, uncut version.
DDD is even longer than any half of an hourlong episode (see below), making it truly unique in its extended running time.
There are three episodes that are listed at 20 minutes, which would make them the shortest: A Day in May, Fraternal Schwinns, and A Man, A Plan, and a Gal: Julia. Two of these are short because their edits were based on first airings that were paired with other, slightly longer episodes (a season finale and a season premiere). I'm not sure why Fraternal Schwinns is so short. I don't know which of these is the shortest to the second, but my bet is on A Day in May. I love the episode, but for obvious reasons, the laugh track isn't very active, which may have affected the total time of the final edit.
All of this considers the hourlong episodes as being split into two parts. The two halves of "Three Dates and a Breakup" are 24 minutes each, at the time the longest half-hours the show had ever had. Any syndicated runs of either half are going to be heavily butchered. The second halves of "Shutout in Seattle," "Something Borrowed, Someone Blue," and "Don Juan in Hell" are all also 24 minutes, with shorter first halves (all 21 minutes). The two halves of "Dish/Spoon" are normal length. The series finale, "Goodnight, Seattle," has two 23-minute halves, making it the longest total hourlong episode besides "Three Dates and a Breakup." Other than these second halves of hourlong episodes, the only episode that runs 24 minutes is "The 1000th Show."
Useless, random information, but interesting nonetheless.