<p>The azimuth angle from due south to the point where an object rises or sets is a function of the latitude (lat) and declination (decl), as follows:
cos(angle) = -sin(decl)/cos(lat) </p>

<p>This ignores refraction and the radius of the object, so it will introduce some inaccuracy for the Sun. (The refraction and radius of the Sun amount to 50 arcminutes. The change in azimuth when the Sun rises 50 arcminutes is the error in using this formula. Unless you are at a latitude near a pole, the equation should be accurate to a fraction of a degree.)</p>

<p>(edit Jan 23). The maximum declination of the Sun to use in the my formula above is equal to either the mean obliquity of the ecliptic (ζ in your equations) or the corrected obliquity (ϵ) depending on the desired accuracy. The minimum declination of the Sun is equal to the negative value of the obliquity. Thus, you can calculate the maximum and minimum azimuth of the rising and setting sun without knowing the date or time.</p>

<p>The obliquity is approximately 23.5 degrees, and if you use a latitude of 40 for example, my formula indicates the cosine of the rise point is -sin(23.5)/cos(40) which yields a rise point of 121.4 degrees east of south, or an azimuth of 58.6 degrees (180-121.4=58.6). Sunset is 121.4 degrees west of south, or an azimuth of 301.4 (180+121.4=301.4).</p>

CC BY-SA 3.0
2018-01-22T17:28:50.613Z
This doesn't answer my question. Solving the Azimuth formula I provided for sunrise and sunset does not remove the try lots of times problem I asked about.
antgiant
CC BY-SA 3.0
2018-01-22T17:53:12.880Z
Maybe I did not understand the question. I thought you wanted to know the azimuth of where an object (like the Sun) rises. If you know the declination (such as 23.5 on the June solstice) and latitude (40 for example), my formula indicates the rise point is -sin(23.5)/cos(40) which yields 121.4 degrees east of south, or an azimuth of 58.6. Sunset is 121.4 degrees west of south, or an azimuth of 301.4. If this is not what you want, can you clarify what other information you want?
JohnHoltz
CC BY-SA 3.0
2018-01-22T19:00:23.320Z
Knowing declination requires knowing time. I need an answer that allows me to know the time, and then figure out the declination.
antgiant
CC BY-SA 3.0
2018-01-24T12:38:08.290Z
@barrycarter you are correct. The edit that occurred after my comment and answer explained that in a way that I could understand. I have marked JohnHoltz's answer as the solution since it is much simpler than my own. Thank You JohnHoltz.
antgiant
CC BY-SA 3.0
2018-01-22T02:25:57.130Z
2018-01-23T18:06:59.810Z
2018-01-23T18:06:59.810Z
JohnHoltz
<p>Thanks to <a href="https://astronomy.stackexchange.com/users/21113/ralf-kleberhoff">Ralf Kleberhoff</a> for Pointing me in the right direction.</p>

<p><strong>Step 1: Find Summer Solstice Date</strong></p>

<p>For the accuracy needs of this question simply finding the hemisphere and picking the most common date will work. (June 21 in the Northern Hemisphere and December 22 for the Southern Hemisphere). If greater accuracy is required. <a href="https://astronomy.stackexchange.com/questions/13008/are-there-accurate-equinox-and-solstice-predictions-for-the-distant-past">There</a> <a href="https://stellafane.org/misc/equinox.html" rel="nofollow noreferrer">are</a> <a href="https://farside.ph.utexas.edu/Books/Syntaxis/Almagest/node36.html" rel="nofollow noreferrer">many</a> <a href="https://en.wikipedia.org/wiki/Summer_solstice" rel="nofollow noreferrer">resources</a> <a href="https://www.esrl.noaa.gov/gmd/grad/solcalc/" rel="nofollow noreferrer">available</a>.</p>

<p><strong>Step 2: Find Sunrise and Sunset Times on Solstice Date</strong></p>

<p>This is straightforward. However, for completeness. (Note: <a href="https://en.wikipedia.org/wiki/Twilight" rel="nofollow noreferrer">90.833 is the solar elevation angle for sunrise and sunset.</a>. However, 90 is sufficient for this accuracy and simplifies the equations.)</p>

<p>$ha = \arccos\left(\frac{\cos(90^o)}{\cos(\Xi^{rad})\cos(\delta^{rad})} - \tan(\Xi^{rad})\tan(\delta^{rad})\right)^o =  \arccos\left(-\tan(\Xi^{rad})\tan(\delta^{rad})\right)$</p>

<p>$solarnoon = \frac{720 - 4\Xi - \Gamma}{1440}$</p>

<p>$sunrisetime = solarnoon - \frac{4ha}{1440}$</p>

<p>$sunsettime = solarnoon + \frac{4ha}{1440}$</p>

<p><strong>Step 3: Solve Azimuth Equation for Sunrise and Sunset Times</strong></p>

<p>Simply plug the $sunrisetime$ and $sunsettime$ into the equations provided in the question.</p>

CC BY-SA 3.0
2018-01-23T12:02:34.413Z
Very nice solution! It's also great to take the time to post your solution for the benefit of future readers.
uhoh
CC BY-SA 3.0
2018-01-22T19:47:22.770Z
2018-01-22T19:47:22.770Z
antgiant
<p>Take absolute of both latitude and sun declination, if latitude is less then declination, then by following formula you can find maximum azimuth angle that sun can go towards east or west with respect of true North or south, depending upon the latitude,
Let's say latitude = - 12, declination = 19,
Maximum azimuth = atan(1÷√(cos(-12)^2tan(19)^2-sin(-12)^2))
=75.159374710582
=75°09’33.75”
From true North</p>

CC BY-SA 4.0
2021-09-19T23:10:37.980Z
Welcome to Astronomy SE! Right now it's hard to tell if the answer is right or wrong because it shows and equation but does not explain where the equation comes from or how it applies. Can you add a link or cite a source for this expression? Also, in Stack Exchange we use [MathJax](https://math.meta.stackexchange.com/q/5020/284619) to write equations. That way for example it would be easier to see how the square root extends. If you can add some more information, a screenshot and/or a link, I (or someone else) can help reformat your expression. *Thanks!*
uhoh
CC BY-SA 4.0
2021-09-17T20:41:20.867Z
2021-09-17T20:41:20.867Z
Mahmood Ahmad
<p>Every Azimuth equation I have been able to locate so far depends on inputting a time, and I do not want to have to brute force the solution by simply trying all of the times. (See below for standard equations.)</p>

<p>My use case doesn't require great precision, within a few degrees is fine. So, ideally I'm looking for equation(s) that take only latitude (and possibly longitude?) as input and output max and/or min azimuth angles for that location.  Also, I'm only going to care about years within a century of now so I don't believe that the year to year variation will matter given my precision requirements, but if I'm wrong I'm happy to provide the current year as well.</p>

<p><strong>Standard Solar Equations</strong> Based on <a href="http://www.esrl.noaa.gov/gmd/grad/solcalc/calcdetails.html" rel="nofollow noreferrer">NOAA's Solar Calculator</a></p>

<pre><code>Note: The sunrise and sunset results are theoretically accurate to within a minute
 for locations between +/- 72° latitude, and within 10 minutes outside of those latitudes.  
 However, due to variations in atmospheric composition, temperature, pressure and conditions, 
 observed values may vary from calculations.
...
Please note that calculations in the spreadsheets are only valid for dates between 1901 and 2099, 
 due to an approximation used in the Julian Day calculation." 
</code></pre>

<p>$\Xi = $Latitude (+ to N)</p>

<p>$\Phi = $Longitude (+ to E)</p>

<p>$\omega = $Time Zone (+ to E)</p>

<p>$d = $Date</p>

<p>$\tau = $Time (hrs past local midnight)</p>

<p>$\upsilon = $Julian Day = $d + 2415018.5 + \tau - \frac{\omega}{24}$</p>

<p>$\sigma = $Julian Century = $\frac{\upsilon - 2451545}{36525}$</p>

<p>$\rho = $Geom Mean Long Sun (deg) = $\left(280.46646 + \sigma
\left(36000.76983 + 0.0003032\sigma\right)\right) \bmod 360$</p>

<p>$\xi = $Geom Mean Anom Sun (deg) = $357.52911 + \sigma\left(35999.05029 - 0.0001537\sigma\right)$</p>

<p>$\mu = $Eccent Earth Orbit = $0.016708634 - \sigma\left(0.000042037 + 0.0000001267\sigma\right)$</p>

<p>$\lambda = $Sun Eq of Ctr = $\sin\left(\xi^{rad}\right)\left(1.914602 - \sigma\left(0.004817+0.000014\sigma\right)\right) + \sin\left(2\xi^{rad}\right)\left(0.019993 - 0.000101\sigma\right) + 0.000289\sin\left(3\xi^{rad}\right)$</p>

<p>$\kappa = $Sun True Long (deg) = $\rho + \lambda$</p>

<p>$\iota = $Sun True Anom (deg) = $\xi + \lambda$</p>

<p>$\theta = $Sun Rad Vector (AUs) = $\frac{1.000001018\left(1 - \mu^2\right)}{1 + \mu\cos\left(\iota^{rad}\right)}$</p>

<p>$\eta = $Sun App Long (deg) = $\kappa - 0.00569 - 0.00478\sin\left(\left(125.04-1934.136\sigma\right)^{rad}\right)$</p>

<p>$\zeta = $Mean Obliq Ecliptic (deg) = $23 + \frac{26 + \frac{21.448 - \sigma\left(46.815+\sigma\left(0.00059 - \sigma0.001813\right)\right)}{60}}{60}$</p>

<p>$\epsilon = $Obliq Corr (deg) = $\zeta + 0.00256\cos\left(\left(125.04-1934.136\sigma\right)^{rad}\right)$</p>

<p>$\delta = $Sun Declin (deg) = $\left(\arcsin\left(\sin\left(\epsilon^{rad}\right)\sin\left(\eta^{rad}\right)\right)\right)^o$</p>

<p>$y = $var y = $\tan\left(\left(\frac{\epsilon}{2}\right)^{rad}\right)^2$</p>

<p>$\Gamma = $Eq of Time (minutes) = $4\left(y\sin\left(2\rho^{rad}\right)-2\mu\sin\left(\xi^{rad}\right)+4\mu y\sin\left(\xi^{rad}\right)\cos\left(2\rho^{rad}\right)-0.5y^2\sin\left(4\rho^{rad}\right)-1.25\mu^2\sin\left(2\xi^{rad}\right)\right)^o$</p>

<p>$\gamma = $True Solar Time (min) = $\left(1440\tau + \Gamma + 4\Phi - 60\omega\right) \bmod 1440$</p>

<p>$\beta = $Hour Angle (deg) = $if\left(\frac{\gamma}{4}&lt;0\right) \{\\
\frac{\gamma}{4}+180\\
\} else \{\\
\frac{\gamma}{4}-180\\
\}$</p>

<p>$\Omega = $Solar Zenith Angle (deg) = $\left(\arccos\left(\sin\left(\Xi^{rad}\right)\sin\left(\delta^{rad}\right)+\cos\left(\Xi^{rad}\right)\cos\left(\delta^{rad}\right)\cos\left(\beta^{rad}\right)\right)\right)^o$</p>

<p>$\alpha = $Solar Azimuth Angle (deg cw from N) = 
$if\left(\beta&gt;0\right) \{\\
\left(\arccos\left(\frac{\sin\left(\Xi^{rad}\right)\cos\left(\Omega^{rad}\right)-\sin\left(\delta^{rad}\right)}{\cos\left(\Xi^{rad}\right)\sin\left(\Omega^{rad}\right)}\right)^o+180\right) \bmod 360\\
\} else \{\\
\left(540-\arccos\left(\frac{\sin\left(\Xi^{rad}\right)\cos\left(\Omega^{rad}\right)-\sin\left(\delta^{rad}\right)}{\cos\left(\Xi^{rad}\right)\sin\left(\Omega^{rad}\right)}\right)^o\right) \bmod 360\\
\}$</p>

CC BY-SA 3.0
2018-01-20T03:06:35.750Z
Thanks for the suggestion @uhoh. I have added the equations as you suggested.
antgiant
CC BY-SA 3.0
2018-01-20T03:08:34.713Z
Wow that's a lot of work, looks great!
uhoh
CC BY-SA 3.0
2018-01-20T14:51:27.513Z
If I understand your question correctly, you ask for the sunrise and sundown azimuth for the longest day of a given location on earth? Within a few degrees? So treating the earth as a perfect globe and ignoring any atmosphere effects would be OK?
Ralf Kleberhoff
CC BY-SA 3.0
2018-01-20T16:58:29.957Z
Sounds reasonable to me that those assumptions would not cause more than a few degrees of error.
antgiant
CC BY-SA 3.0
2018-01-20T17:29:28.173Z
Actually @ralf-kleberhoff that points to the exact solution! Thank you! Just calculate the summer solstice date. Use that to find sunrise and sunset times. Use those to calculate the min and max.
antgiant
CC BY-SA 3.0
2018-01-20T17:56:57.640Z
[Sunrise equation](https://en.wikipedia.org/wiki/Sunrise_equation)?
Keith McClary
<the-sun><earth><azimuth>
How to calculate the maximum and minimum solar azimuth at a given location?
antgiant
# How to calculate the maximum and minimum solar azimuth at a given location?

(Asked by: username_0 on 2018-01-19)

Every Azimuth equation I have been able to locate so far depends on inputting a time, and I do not want to have to brute force the solution by simply trying all of the times. (See below for standard equations.)
My use case doesn't require great precision, within a few degrees is fine. So, ideally I'm looking for equation(s) that take only latitude (and possibly longitude?) as input and output max and/or min azimuth angles for that location.  Also, I'm only going to care about years within a century of now so I don't believe that the year to year variation will matter given my precision requirements, but if I'm wrong I'm happy to provide the current year as well.
Standard Solar Equations Based on NOAA's Solar Calculator
Note: The sunrise and sunset results are theoretically accurate to within a minute
 for locations between +/- 72° latitude, and within 10 minutes outside of those latitudes.  
 However, due to variations in atmospheric composition, temperature, pressure and conditions, 
 observed values may vary from calculations.
...
Please note that calculations in the spreadsheets are only valid for dates between 1901 and 2099, 
 due to an approximation used in the Julian Day calculation." 

$\Xi = $Latitude (+ to N)
$\Phi = $Longitude (+ to E)
$\omega = $Time Zone (+ to E)
$d = $Date
$\tau = $Time (hrs past local midnight)
$\upsilon = $Julian Day = $d + 2415018.5 + \tau - \frac{\omega}{24}$
$\sigma = $Julian Century = $\frac{\upsilon - 2451545}{36525}$
$\rho = $Geom Mean Long Sun (deg) = $\left(280.46646 + \sigma
\left(36000.76983 + 0.0003032\sigma\right)\right) \bmod 360$
$\xi = $Geom Mean Anom Sun (deg) = $357.52911 + \sigma\left(35999.05029 - 0.0001537\sigma\right)$
$\mu = $Eccent Earth Orbit = $0.016708634 - \sigma\left(0.000042037 + 0.0000001267\sigma\right)$
$\lambda = $Sun Eq of Ctr = $\sin\left(\xi^{rad}\right)\left(1.914602 - \sigma\left(0.004817+0.000014\sigma\right)\right) + \sin\left(2\xi^{rad}\right)\left(0.019993 - 0.000101\sigma\right) + 0.000289\sin\left(3\xi^{rad}\right)$
$\kappa = $Sun True Long (deg) = $\rho + \lambda$
$\iota = $Sun True Anom (deg) = $\xi + \lambda$
$\theta = $Sun Rad Vector (AUs) = $\frac{1.000001018\left(1 - \mu^2\right)}{1 + \mu\cos\left(\iota^{rad}\right)}$
$\eta = $Sun App Long (deg) = $\kappa - 0.00569 - 0.00478\sin\left(\left(125.04-1934.136\sigma\right)^{rad}\right)$
$\zeta = $Mean Obliq Ecliptic (deg) = $23 + \frac{26 + \frac{21.448 - \sigma\left(46.815+\sigma\left(0.00059 - \sigma0.001813\right)\right)}{60}}{60}$
$\epsilon = $Obliq Corr (deg) = $\zeta + 0.00256\cos\left(\left(125.04-1934.136\sigma\right)^{rad}\right)$
$\delta = $Sun Declin (deg) = $\left(\arcsin\left(\sin\left(\epsilon^{rad}\right)\sin\left(\eta^{rad}\right)\right)\right)^o$
$y = $var y = $\tan\left(\left(\frac{\epsilon}{2}\right)^{rad}\right)^2$
$\Gamma = $Eq of Time (minutes) = $4\left(y\sin\left(2\rho^{rad}\right)-2\mu\sin\left(\xi^{rad}\right)+4\mu y\sin\left(\xi^{rad}\right)\cos\left(2\rho^{rad}\right)-0.5y^2\sin\left(4\rho^{rad}\right)-1.25\mu^2\sin\left(2\xi^{rad}\right)\right)^o$
$\gamma = $True Solar Time (min) = $\left(1440\tau + \Gamma + 4\Phi - 60\omega\right) \bmod 1440$
$\beta = $Hour Angle (deg) = $if\left(\frac{\gamma}{4}<0\right) \{\\
\frac{\gamma}{4}+180\\
\} else \{\\
\frac{\gamma}{4}-180\\
\}$
$\Omega = $Solar Zenith Angle (deg) = $\left(\arccos\left(\sin\left(\Xi^{rad}\right)\sin\left(\delta^{rad}\right)+\cos\left(\Xi^{rad}\right)\cos\left(\delta^{rad}\right)\cos\left(\beta^{rad}\right)\right)\right)^o$
$\alpha = $Solar Azimuth Angle (deg cw from N) = 
$if\left(\beta>0\right) \{\\
\left(\arccos\left(\frac{\sin\left(\Xi^{rad}\right)\cos\left(\Omega^{rad}\right)-\sin\left(\delta^{rad}\right)}{\cos\left(\Xi^{rad}\right)\sin\left(\Omega^{rad}\right)}\right)^o+180\right) \bmod 360\\
\} else \{\\
\left(540-\arccos\left(\frac{\sin\left(\Xi^{rad}\right)\cos\left(\Omega^{rad}\right)-\sin\left(\delta^{rad}\right)}{\cos\left(\Xi^{rad}\right)\sin\left(\Omega^{rad}\right)}\right)^o\right) \bmod 360\\
\}$

**Tags:** the-sun, earth, azimuth

> **Comments:**
> **username_0**: Thanks for the suggestion @username_1. I have added the equations as you suggested.  
> **username_1**: Wow that's a lot of work, looks great!  
> **username_2**: If I understand your question correctly, you ask for the sunrise and sundown azimuth for the longest day of a given location on earth? Within a few degrees? So treating the earth as a perfect globe and ignoring any atmosphere effects would be OK?  
> **username_0**: Sounds reasonable to me that those assumptions would not cause more than a few degrees of error.  
> **username_0**: Actually @ralf-kleberhoff that points to the exact solution! Thank you! Just calculate the summer solstice date. Use that to find sunrise and sunset times. Use those to calculate the min and max.  
> **username_3**: [Sunrise equation](https://en.wikipedia.org/wiki/Sunrise_equation)?  

---

## 3 answers

### Answer by username_4 on 2018-01-22. Score: 2 | Accepted answer

The azimuth angle from due south to the point where an object rises or sets is a function of the latitude (lat) and declination (decl), as follows:
cos(angle) = -sin(decl)/cos(lat)

This ignores refraction and the radius of the object, so it will introduce some inaccuracy for the Sun. (The refraction and radius of the Sun amount to 50 arcminutes. The change in azimuth when the Sun rises 50 arcminutes is the error in using this formula. Unless you are at a latitude near a pole, the equation should be accurate to a fraction of a degree.)

(edit Jan 23). The maximum declination of the Sun to use in the my formula above is equal to either the mean obliquity of the ecliptic (ζ in your equations) or the corrected obliquity (ϵ) depending on the desired accuracy. The minimum declination of the Sun is equal to the negative value of the obliquity. Thus, you can calculate the maximum and minimum azimuth of the rising and setting sun without knowing the date or time.

The obliquity is approximately 23.5 degrees, and if you use a latitude of 40 for example, my formula indicates the cosine of the rise point is -sin(23.5)/cos(40) which yields a rise point of 121.4 degrees east of south, or an azimuth of 58.6 degrees (180-121.4=58.6). Sunset is 121.4 degrees west of south, or an azimuth of 301.4 (180+121.4=301.4).

> **Comments:**
> **username_0**: This doesn't answer my question. Solving the Azimuth formula I provided for sunrise and sunset does not remove the try lots of times problem I asked about.  
> **username_4**: Maybe I did not understand the question. I thought you wanted to know the azimuth of where an object (like the Sun) rises. If you know the declination (such as 23.5 on the June solstice) and latitude (40 for example), my formula indicates the rise point is -sin(23.5)/cos(40) which yields 121.4 degrees east of south, or an azimuth of 58.6. Sunset is 121.4 degrees west of south, or an azimuth of 301.4. If this is not what you want, can you clarify what other information you want?  
> **username_0**: Knowing declination requires knowing time. I need an answer that allows me to know the time, and then figure out the declination.  
> **username_0**: @barrycarter you are correct. The edit that occurred after my comment and answer explained that in a way that I could understand. I have marked username_4's answer as the solution since it is much simpler than my own. Thank You username_4.  

---

### Answer by username_0 on 2018-01-22. Score: 4

Thanks to [username_2](https://astronomy.stackexchange.com/users/21113/ralf-kleberhoff) for Pointing me in the right direction.

**Step 1: Find Summer Solstice Date**

For the accuracy needs of this question simply finding the hemisphere and picking the most common date will work. (June 21 in the Northern Hemisphere and December 22 for the Southern Hemisphere). If greater accuracy is required. [There](https://astronomy.stackexchange.com/questions/13008/are-there-accurate-equinox-and-solstice-predictions-for-the-distant-past) [are](https://stellafane.org/misc/equinox.html) [many](https://farside.ph.utexas.edu/Books/Syntaxis/Almagest/node36.html) [resources](https://en.wikipedia.org/wiki/Summer_solstice) [available](https://www.esrl.noaa.gov/gmd/grad/solcalc/).

**Step 2: Find Sunrise and Sunset Times on Solstice Date**

This is straightforward. However, for completeness. (Note: [90.833 is the solar elevation angle for sunrise and sunset.](https://en.wikipedia.org/wiki/Twilight). However, 90 is sufficient for this accuracy and simplifies the equations.)

$ha = \arccos\left(\frac{\cos(90^o)}{\cos(\Xi^{rad})\cos(\delta^{rad})} - \tan(\Xi^{rad})\tan(\delta^{rad})\right)^o = \arccos\left(-\tan(\Xi^{rad})\tan(\delta^{rad})\right)$

$solarnoon = \frac{720 - 4\Xi - \Gamma}{1440}$

$sunrisetime = solarnoon - \frac{4ha}{1440}$

$sunsettime = solarnoon + \frac{4ha}{1440}$

**Step 3: Solve Azimuth Equation for Sunrise and Sunset Times**

Simply plug the $sunrisetime$ and $sunsettime$ into the equations provided in the question.

> **Comments:**
> **username_1**: Very nice solution! It's also great to take the time to post your solution for the benefit of future readers.  

---

### Answer by username_5 on 2021-09-17. Score: -1

Take absolute of both latitude and sun declination, if latitude is less then declination, then by following formula you can find maximum azimuth angle that sun can go towards east or west with respect of true North or south, depending upon the latitude,
Let's say latitude = - 12, declination = 19,
Maximum azimuth = atan(1÷√(cos(-12)^2tan(19)^2-sin(-12)^2))
=75.159374710582
=75°09’33.75”
From true North

> **Comments:**
> **username_1**: Welcome to Astronomy SE! Right now it's hard to tell if the answer is right or wrong because it shows and equation but does not explain where the equation comes from or how it applies. Can you add a link or cite a source for this expression? Also, in Stack Exchange we use [MathJax](https://math.meta.stackexchange.com/q/5020/284619) to write equations. That way for example it would be easier to see how the square root extends. If you can add some more information, a screenshot and/or a link, I (or someone else) can help reformat your expression. *Thanks!*  

---

