Sun Position and Solar Irradiance Calculator
Find solar elevation, azimuth and clear-sky irradiance on a tilted panel. Animate the sun path, compare panel tilts and estimate daily incident solar energy.
Use this sun position calculator to find the Sun’s elevation, compass azimuth and angle to a solar panel at a chosen place and time. It also estimates clear-sky irradiance on horizontal and tilted surfaces. Engineers, students and people comparing balcony PV arrangements can use it to understand orientation before moving on to a PV, battery or off-grid energy calculation.
Enter latitude and longitude in decimal degrees. North and east are positive; south and west are negative. Set the local calendar date and the UTC offset that applies on that date, including daylight saving. The calculator does not look up time zones. Time is entered as a decimal hour: 13.5 is 13:30. The ▶ control advances the clock while the daily curves stay on the selected date. Defaults describe a summer day in Munich.
Panel tilt is measured up from horizontal. A tilt of 0° is flat and 90° represents a vertical balcony panel. Facing azimuth follows a compass: north is 0°, east 90°, south 180° and west 270°. Both the Sun and the panel use true north, so correct a magnetic compass reading for local magnetic declination when needed. Incidence is measured from the panel normal; a larger angle reduces direct beam collection, and the front surface receives no direct beam when the Sun is behind it.
The sun path diagram is a compass view of the sky. Its centre is overhead and its rim is the horizon; the dotted rings represent elevations of 30° and 60°. The gold path follows the selected day, the moving dot marks the current Sun, and the blue arrow shows the panel’s facing direction. The adjacent section explains the beam’s angle to the panel normal; its orientation on the page is schematic.
Read GHI as global horizontal irradiance, DNI as direct normal irradiance and DHI as diffuse horizontal irradiance. Panel-plane irradiance adds direct beam, diffuse sky and ground reflection. Irradiance is instantaneous power per area. Daily irradiation is incident energy per area, integrated over the local day; it is not electrical energy from a PV module.
Use the solar panel tilt angle calculator chart to compare tilts from 0° to 90° in 5° steps while holding the facing azimuth fixed. The reported best sampled tilt maximizes clear-sky incident energy for this date. It is not an annual optimum or a recommendation for roof mounting.
Linke turbidity describes atmospheric attenuation; the default is illustrative. Supply local monthly turbidity and realistic ground reflectance for a better estimate. Clouds, buildings, balcony overhangs, terrain, nearby trees, snow cover, module temperature, inverter losses and batteries are excluded. Sunrise and sunset assume a flat horizon and a standard upper-limb correction. Polar days or nights can have no crossing. Installation work, mounting and electrical connections belong to a qualified person.
How it is calculated
NOAA / Meeus solar geometry follows NOAA’s published solar-calculator equations and source: Gregorian date → Julian day → Julian centuries → solar longitude, anomaly, eccentricity and obliquity → declination and equation of time. Local clock time, east-positive longitude and the entered UTC offset give the hour angle. The north/east/up solar vector yields elevation and compass azimuth using atan2. Standard NOAA refraction is added to geometric elevation; no claim of NREL SPA precision is made.
Clear-sky GHI and DNI use the Ineichen–Perez model without the optional Perez enhancement, as documented in pvlib’s open implementation. Kasten–Young (1989) relative optical air mass is corrected for standard-atmosphere site pressure. Extraterrestrial DNI uses 1366.1 W/m² at 1 AU and the NOAA Earth–Sun distance. DHI closes the horizontal energy balance: .
For panel tilt , facing azimuth , solar azimuth and apparent zenith , . Front-side beam is . Isotropic sky diffuse is and ground diffuse is .
A 10-minute grid covers 00:00–24:00 of the local date; trapezoidal integration gives daily incident energy. The same cached sky samples are reused for the 5° tilt sweep, so animation changes only the instantaneous calculation and scene. Sunrise and sunset are roots of geometric centre elevation = −0.833° within the selected local day.
Reference cases compare NOAA geometry against independent NREL SPA values published in pvlib, and the clear-sky function against pvlib’s published scalar regression vector. Sources s2 and s3, attached page 1, contain the quoted expected values.
Assumptions
- Clear sky, a constant user-supplied Linke turbidity throughout the day, and an unobstructed flat horizon. Turbidity 3 and albedo 0.2 are illustrative assumptions, not a weather observation or an automatic local lookup.
- One fixed front-facing panel; isotropic diffuse sky and uniformly reflecting ground with full sky/ground view factors. No circumsolar enhancement, horizon brightening, bifacial collection, obstruction or mutual shading.
- Standard-atmosphere pressure from site elevation; NOAA’s standard refraction is used without a local temperature/pressure adjustment. Solar-centre geometry neglects topocentric parallax.
- True-north bearings; east-positive longitude; the supplied UTC offset remains fixed for the local day. 24:00 is the following midnight.
- The best sampled tilt refers only to this day and this facing direction. If there is no modeled daylight it is reported as unavailable. A missing sunrise or sunset is a valid polar or local-day outcome, not an error.
- The incidence section is rotated for readability; only its beam-to-normal angle is quantitative.
Where it applies
Gregorian dates 1900–2100; latitude −89.9° to +89.9°; elevation −400 to 5000 m; panel tilt 0–90°; Linke turbidity 1–10 and albedo 0–1. These are screening limits, not a universal empirical accuracy guarantee. Below 5° solar elevation, refraction, horizon geometry and attenuation dominate the uncertainty. At exact zenith or nadir azimuth has no physical meaning; an input condition flags this.
NOAA’s method is checked here within 0.03° against the cited SPA position examples, not to SPA’s ±0.0003° precision. Sunrise/sunset use a conventional −0.833° centre elevation, omit observer-height horizon dip and terrain, and are increasingly uncertain at high latitudes. Integration and tilt optimization use finite sampling; narrow grazing daylight intervals may be missed near the polar boundary. No weather forecast, bankable annual yield, PV electrical production, battery sizing or structural mounting design is provided. Installation work belongs to a qualified person.
References
- NOAA Global Monitoring Laboratory, Solar Calculation Details and NOAA/Meeus equations: https://gml.noaa.gov/grad/solcalc/calcdetails.html ; implementation: https://gml.noaa.gov/grad/solcalc/main.js
- Reda, I.; Andreas, A. (2004). Solar position algorithm for solar radiation applications. Solar Energy 76, 577–589. https://doi.org/10.1016/j.solener.2003.12.003 ; open report: https://www.osti.gov/servlets/purl/15003974
- Ineichen, P.; Perez, R. (2002). A new airmass independent formulation for the Linke turbidity coefficient. Solar Energy 73, 151–157. https://doi.org/10.1016/S0038-092X(02)00045-2 ; open implementation: https://pvlib-python.readthedocs.io/en/stable/_modules/pvlib/clearsky.html
- pvlib atmospheric pressure and Kasten–Young (1989) air mass: https://pvlib-python.readthedocs.io/en/stable/_modules/pvlib/atmosphere.html
- pvlib angle of incidence, isotropic sky and ground diffuse transposition: https://pvlib-python.readthedocs.io/en/stable/_modules/pvlib/irradiance.html
- Independent published reference vectors: https://raw.githubusercontent.com/pvlib/pvlib-python/main/tests/test_solarposition.py and https://raw.githubusercontent.com/pvlib/pvlib-python/main/tests/test_clearsky.py ; retrieved 25 October 2026; attached as s3 and s2.
Inputs
| Input | Symbol | Unit | Default |
|---|---|---|---|
| Latitude (+ north) Use decimal degrees. Southern latitudes are negative. | lat | deg | 48.13715 |
| Longitude (+ east) West of Greenwich is negative; do not use the old NOAA west-positive convention. | lon | deg | 11.576124 |
| Site elevation above sea level Used for clear-sky attenuation and the standard-atmosphere pressure estimate. | z_site | m | 520 |
| Year | yr | 2026 | |
| Month (1–12) | mo | 6 | |
| Day of month | dy | 21 | |
| UTC offset on this date Local time minus UTC; include daylight saving yourself. Munich summer: +2; US Mountain standard: −7. | utc_offset | h | 2 |
| Local clock hour · ▶ sun motion Decimal hours: 13.5 means 13:30. 24 means midnight at the end of this date. Press ▶ to follow the Sun. | clock_h | h | 13 |
| Panel tilt from horizontal 0° is horizontal, 90° is a vertical balcony panel. | beta_panel | deg | 30 |
| Panel facing azimuth Compass bearing of the panel normal: north 0°, east 90°, south 180°, west 270°. | az_panel | deg | 180 |
| Linke turbidity Dimensionless atmospheric clarity parameter. 3 is an illustrative clear-sky value, not a location-specific lookup. Use monthly local data when available. | T_L | 3 | |
| Ground reflectance (albedo) Fraction reflected by an unobstructed, uniform ground plane. 0.2 is an illustrative ordinary-ground assumption. | rho_ground | 0.2 |
Results
With the default inputs above, the calc gives:
| Result | Value |
|---|---|
| Solar elevation | 65.12 deg |
| Solar azimuth · true north | 171.52 deg |
| Incidence from panel normal | 6.43 deg |
| Clear-sky panel irradiance | 1,020.4 W/m² |
| GHI · horizontal global | 935 W/m² |
| DNI · direct normal | 919.9 W/m² |
| DHI · horizontal diffuse | 100.4 W/m² |
| Daily clear-sky panel energy / area | 8.3 kW·h/m² |
| Daily clear-sky horizontal energy / area | 8.48 kW·h/m² |
| Best sampled tilt today · 5° grid | 10° |
| Sunrise · local clock | 05:13 |
| Sunset · local clock | 21:18 |
Checked against sources
Each case below was calculated by this calc and agrees with the value from its source (within the tolerance where one is shown).
NREL SPA: Golden, 17 October 2003
Source: Reda & Andreas (2004), DOI 10.1016/j.solener.2003.12.003, NREL example, 2003-10-17 12:30:30 MST, lat 39.742476°, lon −105.1786°. Independent SPA values also published in pvlib tests. NOAA geometric elevation/azimuth: 0.03° tolerance; AOI: 0.04° allows NOAA standard refraction versus SPA 820 mbar/11°C. SPA surface rotation −10° from south means compass azimuth 170°.
Inputs: Year = 2,003; Month (1–12) = 10; Day of month = 17; Local clock hour · ▶ sun motion = 12.508 h; Latitude (+ north) = 39.742 deg; Longitude (+ east) = -105.2 deg; UTC offset on this date = -7 h; Panel facing azimuth = 170 deg; the others as above.
| Result | Source | This calc |
|---|---|---|
| Geometric solar elevation | 39.872 deg | 39.872 deg |
| Solar azimuth · true north | 194.3 deg | 194.3 deg |
| Incidence from panel normal | 25.187 ± 0.04 deg | 25.185 deg |
Independent SPA: Golden, 18 October 2003
Source: pvlib test_solarposition.py expected_solpos_multi, independent NREL SPA solver at Golden, Colorado; same location and MST clock as 17 October example, next day. The fixture's index ends in Z but the test uses these as local-clock labels; do not interpret 12:30:30 as UTC. https://raw.githubusercontent.com/pvlib/pvlib-python/main/tests/test_solarposition.py
Inputs: Year = 2,003; Month (1–12) = 10; Day of month = 18; Local clock hour · ▶ sun motion = 12.508 h; Latitude (+ north) = 39.742 deg; Longitude (+ east) = -105.2 deg; UTC offset on this date = -7 h; the others as above.
| Result | Source | This calc |
|---|---|---|
| Geometric solar elevation | 39.505 deg | 39.505 deg |
| Solar azimuth · true north | 194.3 deg | 194.3 deg |
pvlib Ineichen scalar benchmark
Source: Independent pvlib test_ineichen_scalar_input: apparent zenith 10°, absolute air mass 1, Linke turbidity 3, altitude 0 m, extraterrestrial DNI 1364 W/m². Tests the same clear-sky function used by the live and daily calculations, independently of the location/air-mass front end. https://raw.githubusercontent.com/pvlib/pvlib-python/main/tests/test_clearsky.py
Inputs: the default inputs above.
| Result | Source | This calc |
|---|---|---|
| Fixed independent clear-sky regression vector [1] | 1,038 | 1,038 |
| Fixed independent clear-sky regression vector [2] | 942.2 | 942.2 |
| Fixed independent clear-sky regression vector [3] | 110.3 | 110.3 |
pvlib clear sky near the horizon
Source: pvlib test_ineichen_series, first daylight row: apparent zenith 82.85457044°, absolute air mass 6.97935524, TL=3, default altitude 0 m and extraterrestrial DNI 1364 W/m². Component-level verification of the same production clear-sky function, including large air mass. https://raw.githubusercontent.com/pvlib/pvlib-python/main/tests/test_clearsky.py
Inputs: the default inputs above.
| Result | Source | This calc |
|---|---|---|
| Fixed low-elevation clear-sky regression vector [1] | 65.494 | 65.494 |
| Fixed low-elevation clear-sky regression vector [2] | 321.2 | 321.2 |
| Fixed low-elevation clear-sky regression vector [3] | 25.546 | 25.546 |
NREL SPA winter sunrise and sunset, Golden
Source: NREL SPA website values preserved in pvlib expected_rise_set_spa: Golden, Colorado, 2015-01-02, sunrise 07:21:55 and sunset 16:47:43 MST. One-minute tolerance permits NOAA/Meeus versus SPA and standard refraction differences; no terrain or horizon dip. https://raw.githubusercontent.com/pvlib/pvlib-python/main/tests/test_solarposition.py
Inputs: Year = 2,015; Month (1–12) = 1; Day of month = 2; Latitude (+ north) = 39.742 deg; Longitude (+ east) = -105.2 deg; UTC offset on this date = -7 h; the others as above.
| Result | Source | This calc |
|---|---|---|
| Local sunrise hour; −1 means none today | 7.365 ± 0.01667 h | 7.366 h |
| Local sunset hour; −1 means none today | 16.795 h | 16.795 h |
Related Resources
Related articles
Related courses
IEC Electrical Schematics and Industrial Control Panels
5
Original price was: 42 €.21 €Current price is: 21 €.
Basic Electrical Controls & Diagram Reading
7
Original price was: 32 €.18 €Current price is: 18 €.
Modeling Electrical Motor Faults with FEM Simulation using ANSYS MAXWELL
3
Original price was: 50 €.15 €Current price is: 15 €.







Responses