How sunrise is calculated for a city

Sunrise is computed for the chosen city from its latitude, longitude and the date, using the standard geometry of the Sun's apparent position against the horizon.

What it is

The standard altitude used is about minus 0.83 degrees, which accounts for the refraction of the atmosphere and the Sun's disc. Sunrise is the moment the Sun's upper edge reaches that altitude on the eastern horizon.

How it is worked out or read

The result is converted to the local time of the city, and the sunset is found in the same way. Day length is the difference, and Rahu Kaal and Abhijit are fractions of it.

Where it appears on this site

Sunrise and sunset appear in the panchang. The sunrise convention article explains why sunrise sets the day.

What counts as sunrise

In modern astronomy, sunrise is the moment when the upper edge of the Sun's disc appears on a level, unobstructed horizon, taking into account the bending of light by the atmosphere. Refraction lifts the Sun's image by about 34 minutes of arc at the horizon, and the Sun's radius is about 16 minutes, so at the defined moment of sunrise the Sun's centre is actually about 50 minutes of arc below the true horizon. This site's panchang uses this standard definition.

Some traditional almanacs use a different definition, such as the moment the centre of the disc reaches the horizon, with or without refraction. The difference is typically one to three minutes in India.

How it is computed

To find sunrise, a calculator needs the Sun's declination for the date, the observer's latitude and longitude, and the equation of time, which describes how far the Sun runs ahead of or behind a clock through the year. The key step finds the Sun's hour angle at the moment its altitude reaches the defined value. Because the Sun's position changes during the day, precise software repeats the calculation or searches numerically until the answer converges, which is what the library on this site does.

Why sunrise changes through the year

Two effects shift sunrise through the year. The changing declination of the Sun makes days longer in summer and shorter in winter, moving sunrise earlier and later. The equation of time, which reaches about sixteen minutes, shifts both sunrise and sunset together. Because the two effects do not peak at the same time, the earliest sunrise of the year does not fall on the summer solstice, and the latest does not fall on the winter solstice. In much of India, the earliest sunrise comes in early June and the latest in early to mid January.

Longitude within a time zone

All of India shares one time zone, IST, based on longitude 82.5 degrees east. But the Sun rises earlier in the east and later in the west. Sunrise in Kolkata, around 88 degrees east, comes about 45 minutes earlier than in Mumbai, around 73 degrees east, on the same day. This is why every sunrise-based value in the panchang, including Rahu Kaal and Abhijit, must be computed for the actual city.

Elevation and the horizon

The standard definition assumes a sea-level observer with a flat horizon. An observer on a hill sees the Sun slightly earlier, and one in a valley surrounded by mountains sees it later. Panchangs conventionally ignore these local effects and use the standard definition, so the computed sunrise may differ a little from what a person sees from their own window.

Start with the basics