Energy

Solar panel tilt and orientation calculator

Find the best fixed tilt for your latitude, the two-position seasonal tilts, and how much yield an array at your actual roof tilt and compass direction gives up against the optimum, from a clear-sky model integrated over the year.

Site and array
Positive north, negative south. Lahore 31.55, Karachi 24.86, Islamabad 33.69, Peshawar 34.01, Quetta 30.18, Multan 30.20, Faisalabad 31.42.
Angle from horizontal: 0° is flat, 90° is vertical. A typical pitched roof in Pakistan is 15–25°; a flat roof takes whatever the frame gives.
Compass bearing of the direction the panels face: 180 = due south, 90 = east, 270 = west, 225 = south-west. Read it from a phone compass standing with your back to the panels.
The share of sunlight that arrives scattered rather than straight from the sun. More diffuse light favours a flatter tilt.

Tilt and orientation

Enter your values and press Calculate.

What the calculator does

It works out where the sun is every half hour of every third day of the year for your latitude, estimates the clear-sky sunlight arriving from the sun's direction and from the sky, and adds up how much of it a panel at each tilt would collect. The tilt that collects the most over the year is the optimum fixed tilt; the same search over October to March and April to September gives the two seasonal tilts. It then evaluates your actual tilt and compass direction against that optimum and separates the loss due to tilt from the loss due to direction, so you know which one (if either) is worth fixing.

Only ratios are reported. The model is a clear-sky one, so its absolute kilowatt-hours would be too high for a real year with cloud and dust; the ratios between orientations are what it is good at. For the array size itself, use the solar system sizing calculator.

Formula

Declination δ = 23.45° × sin(360° × (284 + n) ÷ 365)
Sun elevation: sin α = sin φ sin δ + cos φ cos δ cos ω (ω = 15° × (t − 12))
Sun azimuth: cos A = (sin δ − sin α sin φ) ÷ (cos α cos φ), west of north after noon

Beam irradiance (clear sky): Ib = 1353 × 0.7(AM0.678) W/m², AM from Kasten–Young
Diffuse on the horizontal: Id = Ib sin α × f ÷ (1 − f)

Incidence on the panel: cos θ = sin α cos β + cos α sin β cos(A − γ)
On the tilted plane: It = Ib cos θ + Id (1 + cos β) ÷ 2 + ρ Ig (1 − cos β) ÷ 2

Yield(β, γ) = Σ It × Δt over the year; optimum β = argmax; your ratio = Yield(βyours, γyours) ÷ Yield(βopt, γequator)

where φ is latitude, n the day of the year, t solar time, β the panel tilt, γ the panel's compass azimuth, f the diffuse fraction chosen above, ρ = 0.2 the ground reflectance and Ig the global horizontal irradiance. The sky is treated as isotropic (equally bright everywhere), which slightly under-rewards steep tilts under real skies where the region around the sun is brighter.

Worked example

A house in Lahore (31.55° N) with a 20° pitched roof facing south-west (225°), mixed sky. A single moment shows the geometry the model integrates:

  1. Winter solstice, 21 December (n = 355): δ = −23.45°. At solar noon the sun's elevation is 90° − 31.55° − 23.45° = 35.0°. A south-facing panel at 20° meets that sun at an incidence angle of 90° − 35.0° − 20° = 35.0°, so it collects cos 35.0° = 0.82 of the beam; a flat panel collects cos 55.0° = 0.57; a panel at 46° collects cos 9° = 0.99.
  2. Summer solstice, 21 June (n = 172): δ = +23.45°, noon elevation 81.9°. The 20° panel is at 11.9° incidence (0.98); the flat panel at 8.1° (0.99); the 46° panel at 37.9° (0.79). Summer days are longer and the air mass smaller, so summer carries more of the year's energy, which is why the annual optimum sits below the latitude.
  3. Integrated over the year at the equator-facing azimuth, the tilt that collects most is 26°. Your 20° tilt on its own would give up only 0.3 %.
  4. Facing south-west instead of south costs 3.1 % on its own, and the best tilt for a south-west face is a little flatter, 20°.
  5. Together: your array collects 96.9 % of the optimum, and 4.1 % more than a flat panel would. Adjusting the tilt twice a year, to 46° for October–March and 9° for April–September, would add 4.1 % over the fixed optimum. Your array's yield falls 38 % in October–March and 62 % in April–September.

The verdict is that the roof is fine as it is: within 5 % of the optimum, not worth a tilted frame.

Optimum fixed tilt by city (model, mixed sky, facing south)

CityLatitudeOptimum fixed tiltOct–MarApr–SepGain over flat
Karachi24.86° N20°40°4.5 %
Quetta30.18° N24°45°6.8 %
Lahore31.55° N26°46°7.5 %
Islamabad33.69° N27°48°11°8.6 %

From this calculator with the mixed-sky setting; the dry setting raises each tilt by a degree or two and the gain over flat by about a point, the humid setting lowers them. Real-world data sets (PVGIS, NASA POWER) put the optima within a few degrees of these.

Assumptions and limitations

  • Clear-sky model. Cloud, dust, haze and smog are represented only by the diffuse fraction you choose. Monsoon months on the coast and winter smog in Punjab reduce the beam component far more than the model does, which favours flatter tilts slightly; the ratios remain a good guide, the absolute yield is not reported for that reason.
  • Isotropic sky and 0.2 ground reflectance. Anisotropic models (Perez, Hay–Davies) give steeper optima by a degree or two. Snow or white roofs raise the reflectance and reward steeper tilts.
  • No shading, no soiling, no temperature. A flatter panel collects more dust and sheds less rain; below about 10° soiling losses grow and self-cleaning stops, which is one reason installers avoid very flat mounting even where the model would allow it. Steeper panels run cooler in the wind.
  • Yield, not value. If your tariff or your load favours a season (an evening peak, winter load-shedding), a west-facing or steeper array may earn more than the yield-optimal one. The seasonal shares are shown so you can judge that.
  • Fixed tilt only. Trackers and east–west "butterfly" layouts are outside the model; the latter trades 10–15 % of per-panel yield for more panels per square metre of flat roof.
  • Latitudes beyond 66° are refused: the model assumes the sun rises every day.

Frequently asked questions

Why is the optimum tilt less than the latitude?

The old rule "tilt = latitude" is for beam sunlight averaged over the year. Summer days are longer, the sun is higher and the air is thinner at noon, so summer contributes more energy than winter, and the best fixed tilt leans toward the summer sun. Diffuse light, which is best collected by a flatter panel, pushes the same way. Both effects give an optimum a few degrees below the latitude.

Is it worth adjusting the tilt twice a year?

The model says about 4 % for Pakistani latitudes. On a small rooftop system with a bolted frame that is rarely worth the labour and the risk to the panels and the roof; on a ground-mounted array with a designed-for-it frame it can be. A fixed tilt at the annual optimum captures 96 % of what the two-position schedule does.

My roof faces east and west. Which side?

Run the tool for each face; at 20° tilt in Lahore either face gives around 88–90 % of the optimum. Splitting the array across both flattens the daily curve, which suits a house that uses power all day and a net-metering tariff that does not pay much for a midday peak. West-facing carries more of the afternoon load.

Does the direction matter more or less than the tilt?

At the tilts roofs actually have, direction usually matters more. Going from 15° to 25° tilt facing south changes the yield by about 1 %; going from south to west at 20° costs about 10 %. The tool separates the two losses so you can see which applies to you.

Where do I get my latitude and azimuth?

Latitude from any maps application (long-press on your roof). Azimuth from a phone compass held level while you face the way the panels face, or by measuring the angle of the roof edge on the satellite map against north. Five degrees of error in azimuth changes the answer by well under 1 %.

References

  • Duffie, J. A. and Beckman, W. A., Solar Engineering of Thermal Processes, 4th ed., Wiley, 2013 — declination, sun position, incidence angle and the isotropic tilted-surface model (chapters 1 and 2)
  • Meinel, A. B. and Meinel, M. P., Applied Solar Energy: An Introduction, Addison-Wesley, 1976 — the clear-sky beam irradiance fit I = 1353 × 0.7^(AM^0.678)
  • Kasten, F. and Young, A. T., "Revised optical air mass tables and approximation formula", Applied Optics 28(22), 1989 — air mass as a function of solar elevation
  • Cooper, P. I., "The absorption of radiation in solar stills", Solar Energy 12(3), 1969 — the declination approximation
  • European Commission Joint Research Centre, PVGIS (Photovoltaic Geographical Information System) — measured-data optimisation of tilt and azimuth for any site, to compare against

Last reviewed 2026-09-20.