Isn’t it amazing how the sun seems to peek over the horizon a little early in the morning and lingers a bit longer at night? This curious effect isn’t magic—it’s all thanks to our incredible atmosphere and a clever optical trick called refraction.


When sunlight travels through Earth’s atmosphere, it bends, which makes the sun appear slightly higher than its actual position.


This bending is most noticeable near the equator. Without our atmosphere, sunrise would appear about two minutes later, and sunset about two minutes earlier.


The Magic of Refraction


Refraction happens when light passes from one material into another, bending along the way. This simple phenomenon creates spectacular sights like rainbows, mirages, halos, and even the twinkle of stars. It also makes a straw in a glass of water look bent or a diamond sparkle brilliantly. Refraction allows us to see the sun just before it rises and just after it sets.


The amount of bending depends on three main factors: the wavelength of light, the density of the material it enters, and the angle at which it enters. Light moving from a less dense medium, like air, into a denser one, like water or the lower atmosphere, bends toward the perpendicular line of the boundary. If it moves from a denser to a less dense medium, the direction reverses. Interestingly, if light hits perpendicularly, it doesn’t bend at all.


Atmospheric Layers and Bending Light


Earth’s atmosphere isn’t uniform—it gets thinner as altitude increases. This uneven density makes sunlight bend in complex ways as it enters from space. When we look at objects directly overhead, we see them almost exactly where they are. But near the horizon, celestial bodies appear higher than their true positions because of this atmospheric refraction.


Astronomical Refraction Explained


The bending of light from celestial objects entering our atmosphere is called astronomical or atmospheric refraction. Unlike ground-based light refraction, this involves the sun, moon, and stars. Essentially, the atmosphere acts like a lens, slightly altering the apparent positions of objects in the sky.


Displaced Sun, Moon, and Stars


When light approaches Earth at a small angle near the horizon, it bends more than light coming straight down. This is why the sun or moon seems to hover above the horizon even when it has already technically gone below it. At noon, we see objects almost where they are, but near sunrise or sunset, they are visually shifted upward by several minutes of arc. This explains why the day feels slightly longer during equinoxes—the sun is technically below the horizon while we still see its light.


Temperature and Pressure Effects


Refraction doesn’t just depend on density layers; temperature and air pressure matter too. Higher pressure and lower temperature increase refraction, which means on a cold, high-pressure day, the sun might appear above the horizon slightly longer after it has truly set.


Calculating Sunrise and Sunset


To help us track this optical trick, we can use a solar refraction calculator. By entering a city, it estimates sunrise and sunset times accounting for standard atmospheric pressure (101.325 kPa) and temperature (15°C / 59°F). Keep in mind, if the day’s actual temperature or pressure differs from these standard values, the real sunrise or sunset might vary by a few seconds.


Sky Wonders Await


So next time we catch a sunrise or sunset, we know it’s not magic but science—refraction in our atmosphere creating a beautiful optical illusion. We see the sun a little earlier, the moon a little longer, and the stars twinkle in a way that reminds us just how dynamic our sky truly is. Let’s keep looking up and marveling at the universe’s tiny but astonishing tricks.


Advanced sunrise & delayed sunset

Video by Khan Academy India - English