FireCADCalc

Sun Position: Declination, Zenith, Altitude, Azimuth and Day Length

Solar declination, hour angle, zenith and altitude angles, solar azimuth, sunrise and sunset times, day length and air mass for any latitude, day and time.

Process steam and utilitiesFood, dairy and textile

Inputs

Examples: Delhi 28.6 N, 216 m, 21 June noon, Spencer declinationMelbourne 37.8 S, 17 January, 10:00

Accepted: -89 to 89 °
Accepted: 1 to 365
Accepted: 0 to 24 h
Accepted: 0 to 6,000 m

Results

Times are solar time; use the solar time calculator to convert to clock time.

Declination-20.917°
Hour angle-30.000°
Zenith angle30.906°
Solar altitude angle59.094°
Solar azimuth (south 0, west positive)-114.59°
Sunset hour angle107.25°
Day length14.299h
Sunrise (solar time)4.8503h
Sunset (solar time)19.150h
Air mass (Kasten and Young)1.1606

Download PDF CSV Link to this result Compare another case

Log in to save calculations to your dashboard.

Worked example

Example: Delhi 28.6 N, 216 m, 21 June noon, Spencer declination. The inputs, in the units selected above:

InputValue
Latitude (north positive, south negative)28.600 °
Day of the year (1 = 1 January, 365 = 31 December)172.00 -
Solar time (24-hour clock)12.000 h
Site altitude above sea level (for air mass)216.00 m
Declination formulaSpencer (1971), more precise

Applying the formula below gives:

ResultValue
Declination23.452 °
Hour angle0 °
Zenith angle5.1480 °
Solar altitude angle84.852 °
Solar azimuth (south 0, west positive)9.6215e-06 °
Sunset hour angle103.68 °
Day length13.824 h
Sunrise (solar time)5.0879 h
Sunset (solar time)18.912 h
Air mass (Kasten and Young)0.97838

Open this example in the calculator and change any input.

Formula

\(\delta = 23.45^\circ\sin\left(360\frac{284 + n}{365}\right)\)

\(\cos\theta_z = \cos\phi\cos\delta\cos\omega + \sin\phi\sin\delta\)

\(\gamma_s = \operatorname{sign}(\omega)\left|\cos^{-1}\frac{\cos\theta_z\sin\phi - \sin\delta}{\sin\theta_z\cos\phi}\right|\)

\(\cos\omega_s = -\tan\phi\tan\delta, \quad N = \frac{2}{15}\omega_s\)

Variables

Symbol Meaning SI unit
\(\phi\) Latitude (north positive, south negative) rad
\(n\) Day of the year (1 = 1 January, 365 = 31 December) -
\(t_s\) Solar time (24-hour clock) s
\(h\) Site altitude above sea level (for air mass) m
\(\delta\text{ formula}\) Declination formula -
\(\delta\) Declination rad
\(\omega\) Hour angle rad
\(\theta_z\) Zenith angle rad
\(\alpha_s\) Solar altitude angle rad
\(\gamma_s\) Solar azimuth (south 0, west positive) rad
\(\omega_s\) Sunset hour angle rad
\(N\) Day length s
\(t_{rise}\) Sunrise (solar time) s
\(t_{set}\) Sunset (solar time) s
\(m\) Air mass (Kasten and Young) -

Method and standards

Spherical trigonometry of the sun's apparent motion.

Where it is used

  • Shading surveys and sun-path checks for collector and PV sites.
  • Daylight hours and sun angles for building and greenhouse design.

Common mistakes

  • Using clock time instead of solar time.
  • Mixing the north-zero azimuth of navigation with the south-zero convention.

Assumptions and limits

  • Geometric sun position without refraction; the declination formulas are good to about 0.5° (Cooper) and 0.05° (Spencer).

Questions and answers

Why can the azimuth exceed 90°?

On long summer days the sun rises and sets north of the east–west line, so early and late its azimuth is beyond ±90°.

What do the defaults represent?

An illustrative case: Delhi 28.6 N, 216 m, 21 June noon, Spencer declination. Replace the inputs with your own data.

Method and article reviewed by FireCAD engineering on 17 November 2026. Every result is checked against an independent calculation on each release: how we verify our calculators.

Sources

Duffie and Beckman, Solar Engineering of Thermal Processes, 4th ed. (Wiley, 2013), sec. 1.6, eqs. 1.6.1, 1.6.5, 1.6.6, 1.6.10, 1.6.11 and Examples 1.6.2 and 1.6.3; air mass from Kasten and Young (1989) as given in sec. 1.5

Related calculators

Free engineering calculators: every page computes in SI and converts to your units. Results are for engineering estimation; verify critical designs against the referenced standards.

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.