Worked example
Example: Delhi 28.6 N, 216 m, 21 June noon, Spencer declination. The inputs, in the units selected above:
| Input | Value |
|---|---|
| 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 formula | Spencer (1971), more precise |
Applying the formula below gives:
| Result | Value |
|---|---|
| Declination | 23.452 ° |
| Hour angle | 0 ° |
| Zenith angle | 5.1480 ° |
| Solar altitude angle | 84.852 ° |
| Solar azimuth (south 0, west positive) | 9.6215e-06 ° |
| Sunset hour angle | 103.68 ° |
| Day length | 13.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