The time of sunset is defined in astronomy as the moment the trailing edge of the sun's disk disappears below the horizon in the west. Due to refraction of light in the atmosphere, the ray path of the setting sun is highly distorted near the horizon making the apparent astronomical sunset occur when the sun’s disk is already about one diameter below the horizon. Sunset should not be confused with dusk, which is the moment at which darkness falls, when the sun is about eighteen degrees below the horizon. The period between the astronomical sunset and dusk is called twilight. - Wiki
Stunning isn't it?