What are the Mathematical Algorithms/Formulas behind hindu Sunrise and Sunset Calculations? There are differences between Astronomical Sunrise/Sunset calculation and Hindu calendar Sunrise/Sunset calculations. The astronomical algorithms to calculate the sunrise/sunset can be found over the internet. Here is a calculation that I followed to correctly calculate the astronomical sunrise/sunset time.
Sunrise and Sunset algorithm
In the Hindu calendar, sunrise/sunset is considered when the center of the Sun disk is at the horizon, also the refraction effect must be considered.
Sunrise on the Hindu calendar = Astronomical Sunrise + Time taken by the Sun to rise half of its diameter + Time taken by the Sun to rise further to neutralize the refraction effect.
Similarly, Sunset = Astronomical Sunset - Time taken by the Sun to set half of its diameter - Time taken by the Sun to set further to neutralize the refraction effect.
I am able to derive the Astronomical Sunrise/Sunset, but how to do the calculation for the following?:

Time taken by the Sun to rise half of its diameter.
Time taken by the Sun to rise further to neutralize the refraction effect.
Time taken by the Sun to set half of its diameter.
Time taken by the Sun to set further to neutralize the refraction effect.
In the linked algorithm,  the &quot;zenith&quot; is the position of the sun at sunrise.  This is the number you need to change.
If you want to calculate the time when the top of the sun reaches the horizon you use the &quot;official&quot; zenith of 90⁰50' This is intended to account for refraction and should estimate the time when the sun first appears over the horizon.
Since the sun in 30' across, if you want the time when the centre of the sun is on the horizon, just subtract 15'  ie use a zenith of 90⁰35' (90.583 degrees)
It isn't possible to be more accurate as the amount of refraction varies with the weather. But this should give values that are correct to the minute.