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 solar elevation, true-north azimuth and the angle between sunlight and a panel. It estimates clear-sky irradiance on horizontal and tilted surfaces for engineers, students and people comparing balcony, roof or off-grid PV arrangements. Optional tools under Details compare seasonal orientations, show object shadows, size spacing between level-ground rows and estimate simplified panel power.
Enter latitude and longitude in decimal degrees: north and east are positive. Set the local calendar date and its UTC offset, including daylight saving yourself. The calculator does not look up time zones. Enter time as decimal hours: 13.5 means 13:30. Press ▶ to follow the Sun while the selected-day curves stay fixed. Defaults describe a summer day in Munich.
Panel tilt rises from horizontal: 0° is flat and 90° is vertical. Facing azimuth follows a compass: north 0°, east 90°, south 180° and west 270°. Directions use true north; correct magnetic compass readings when necessary. Incidence is measured from the panel normal. Direct beam on the front becomes zero when the Sun moves behind it.
The sun path diagram places overhead at its centre and the horizon at its rim; the dotted rings show elevations of 30° and 60°. The gold curve is the selected day's path, the moving marker is the Sun and the blue arrow is panel facing. The adjacent incidence section is rotated for readability. Read GHI as global horizontal irradiance, DNI as direct normal irradiance and DHI as diffuse horizontal irradiance. Daily irradiation is incident energy per area, integrated over the local day.
The solar panel tilt angle calculator initially compares tilts in 5° steps for the selected date. Enable the seasonal comparison to add a second tilt and azimuth. The chart and table compare clear-sky daily kWh/m² on the 15th of each month, with percentage changes and the best sampled tilt at each azimuth. The twelve-day mean weights these days equally. Its best fixed tilt is a screening comparison, not expected monthly or yearly production. The same turbidity and albedo apply throughout; clouds and seasonal atmospheric changes can alter the ranking.
Enable shadows to enter a vertical object's height. The ground map shows the shadow tip's daily track, current length and compass direction; its radius controls clipping of long shadows. Row spacing uses the current panel tilt and facing, a separate panel length along the slope and a local unshaded time window. Pitch means corresponding low edge to low edge; the clear gap excludes the horizontal panel footprint. Choose a winter date and a realistic window for winter shading questions. Windows containing night have no spacing result.
Enable panel power to enter total array STC watts and an output factor: 0.85 retains 85% after constant losses. The existing irradiance curve becomes a simplified power curve and daily electrical energy. Temperature, inverter efficiency curves, clipping, weather, snow and shading losses are not modeled. Shadow and row-spacing diagrams do not reduce this power curve.
Linke turbidity 3 and albedo 0.2 are illustrative. Buildings, terrain, trees, roof slopes, unequal row heights, diffuse row shading, bifacial collection, mounting loads, batteries and installation design are outside scope. Sunrise and sunset assume a flat horizon and standard refraction; polar dates may 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.
Representative-day comparison. The same NOAA position, Ineichen–Perez clear sky and isotropic transposition are evaluated on the 15th of all twelve months in the selected year. Both tilt and azimuth are changed for the alternative. Each month also tests 0–90° tilts at 5° spacing independently at each facing azimuth. Changes are ; a zero baseline leaves the percentage unavailable. The best fixed tilt maximizes the unweighted mean of these twelve clear-sky daily energies, rather than a weather-based or calendar-weighted annual yield. Bars represent twelve discrete solved dates.
Shadows and rows. For a vertical object of height and apparent solar elevation , the shadow length is and its bearing is the solar azimuth plus 180°, modulo 360°. Night has no solar shadow. For identical parallel rows, let , and . Projecting the row's two ends along the solar rays onto the common low-edge plane gives an interval with signed extent . Adjacent intervals do not overlap when their pitch is at least ; their physical ground footprints also require pitch at least . Thus . The absolute value handles rear illumination without assuming the Sun stays in front. A dense window grid includes both endpoints; local extrema of elevation and required pitch are refined with a bounded minimizer. A window touching or crossing the apparent horizon is unavailable. This geometric derivation is checked against pvlib's independent fixed-row shaded-fraction example (source s9).
Simplified array power. , with the actual STC reference irradiance and user-supplied retained-output factor . Trapezoidal integration gives the selected day's clear-sky electrical energy. This uses the irradiance scaling in PVWatts V5 (source s8), with temperature effects omitted and no inverter model; it is not the full PVWatts simulation. Retained plus removed power is checked against power before the factor.
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 or obstruction; mutual shading is excluded from irradiance and power curves even when the separate row geometry is enabled.
- 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.
- In the sun-path diagram, the gold curve is the selected day's solar track and the blue compass arrow is panel facing. In the panel section, the gold ray points towards the panel and the dashed blue arrow is its normal. The section is rotated for readability; only its beam-to-normal angle is quantitative. Clock time, incidence, tilt and facing values are shown in the controls and results.
- All representative dates use the same entered turbidity, albedo, site elevation and UTC offset. No monthly climate averages, monthly day-count weights, energy prices or tilt-mount economics are supplied. Percentage gains alone do not establish financial payback.
- Rows are parallel, effectively infinite along their common axis, at the same low-edge height, with identical length and tilt on level ground. Object height belongs only to the separate pole-shadow calculation. Zero-thickness panel/ray geometry excludes the solar disc's angular diameter, diffuse-sky obstruction, frames, access paths, row ends and construction tolerances. The spacing is a geometric minimum, with no allowance added.
- Pole shadows use a point-like vertical object and the apparent solar-centre direction on horizontal ground. The map clips the trace at the chosen radius; results retain the actual length.
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. The optional electrical result is a constant-factor screening estimate, not a temperature-dependent PV or inverter simulation. No weather forecast, bankable annual yield, battery sizing or structural mounting design is provided. Installation work belongs to a qualified person.
The original default 10-minute selected-day integration is preserved; Numerical resolution allows refinement to 5 minutes or finer without changing the physical model. The 5° tilt search reports a sampled optimum, with ties choosing the lower tilt; no sub-grid optimum is claimed. Representative days are not monthly means and the twelve-day mean is not annual production. With no daylight, best monthly tilt and relative gain appear as unavailable.
Row searches default to 360 intervals over the entered window (one minute for six hours), with continuous refinement of bracketed local extrema. Select a wholly sunlit window; spacing grows without bound as the Sun approaches the horizon in an obstructing direction. Below 5° the point-Sun/refraction approximation is particularly uncertain. Sloping roofs, sloping terrain and unequal row elevations are outside this model. Choose the date/window to cover the intended design season and allow for physical clearances, the solar disc and construction tolerances. The drawings do not apply shading losses to irradiance or power.
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.
- pvlib PVWatts V5 DC irradiance scaling; temperature and inverter effects are omitted here: https://pvlib-python.readthedocs.io/en/stable/reference/generated/pvlib.pvsystem.pvwatts_dc.html ; Dobos (2014), DOI https://doi.org/10.2172/1158421
- pvlib shaded_fraction1d, fixed-tilt flat-terrain worked example and projection conventions: https://pvlib-python.readthedocs.io/en/stable/reference/generated/pvlib.shading.shaded_fraction1d.html ; Anderson & Jensen (2024), DOI https://doi.org/10.1063/5.0202220
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 | |
| Representative-day seasonal comparison | seasonal_enabled | false | |
| Alternative panel tilt | beta_alt | deg | 60 |
| Alternative facing azimuth True north 0°, east 90°, south 180°, west 270°. | az_alt | deg | 180 |
| Shadows and level-ground rows | shadows_enabled | false | |
| Vertical object's height | object_height | m | 1 |
| Shadow map radius Longer near-horizon shadows continue beyond the clipped map. | shadow_extent | m | 2 |
| Row panel length along its slope Uses the current panel tilt and azimuth; identical parallel rows on level ground. | panel_length | m | 2 |
| Unshaded window starts · local hour | window_start | h | 9 |
| Unshaded window ends · local hour Both endpoints must be in daylight on the selected date. | window_end | h | 15 |
| Simplified panel power | pv_enabled | false | |
| Array nameplate power at STC | P_stc | W | 800 |
| Output factor after losses 0.85 retains 85% of the irradiance-scaled nameplate power; temperature and clipping are not modeled. | f_output | 0.85 | |
| Intervals per 24-hour integration 144 gives the original 10-minute samples; double it to check daily and seasonal integration. | day_intervals | 144 | |
| Intervals across unshaded window 360 gives 1-minute spacing for a six-hour window; endpoints are included. | row_intervals | 360 |
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 |
| 12 clear-sky days · mean current | 0 kW·h/m² |
| 12 clear-sky days · mean alternative | 0 kW·h/m² |
| 12-day best sampled tilt · current azimuth | 0 deg |
| 12-day best sampled tilt · alternative azimuth | 0 deg |
| Object shadow length now | 0.46 m |
| Shadow bearing · true north | 351.5 deg |
| Minimum row pitch · low edge to low edge | 0 m |
| Clear horizontal gap between rows | 0 m |
| Row spacing governing local hour | 0 h |
| Simplified clear-sky array power | 694 W |
| Simplified clear-sky array energy today | 5.64 kW·h |
It also shows: Change in 12-day mean (%).
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 |
pvlib independent fixed-tilt row-shadow example
Source: pvlib shaded_fraction1d worked example: zenith 80°, azimuth 135°, south-facing 30° rows of length 2 m at pitch 3 m give shaded fraction 0.47755694708090535. With identical parallel rows on level ground, their projected intervals overlap by fraction f=1−pitch/D, so the independently implied zero-shade pitch is D=3/(1−f)=5.742252640240541 m. Equal row rotations make the example's common surface-to-axis offset cancel. https://pvlib-python.readthedocs.io/en/stable/reference/generated/pvlib.shading.shaded_fraction1d.html
Inputs: the default inputs above.
| Result | Source | This calc |
|---|---|---|
| Pitch inferred from pvlib's independently published shaded fraction | 5.742 m | 5.742 m |
Related Resources
Related articles
Related courses
IEC Electrical Schematics and Industrial Control Panels
Basic Electrical Controls & Diagram Reading

Responses