Solar Panel Row Spacing: How to Plan Your Layout
The short answer is this: leave enough gap between rows of solar panels that the front row’s shadow never reaches the row behind it — not even at midday on the shortest day of the year. This solar panel row spacing guide shows you how to plan that gap: it depends on your panels’ height above the roof, their tilt angle, and your city’s latitude, and a simple winter-sun rule turns those three inputs into a spacing distance you can measure on the rooftop with a tape measure.
If you are laying out a system on a flat rooftop in Pakistan — where most home arrays are mounted on tilted frames — getting the inter-row spacing right is one of the cheapest ways to protect your system’s output. Rows that shade each other in winter lose production for months, and the fix is just a gap planned before the structures are installed.
Why Row Spacing Matters: The Self-Shading Problem
On a flat roof, panels are mounted on tilted solar mounting structures so they face the sun at a productive angle. That tilt lifts the top edge of each panel well above the roof surface — and whatever is lifted casts a shadow. When one row of tilted panels sits behind another, the front row’s shadow falls exactly where the row behind it stands.
Self-shading is costly because of how panels are wired. Panels in a row are connected in series strings, and in a series string the current is limited by the weakest link: shade on even part of one panel drags down the output of the whole string. A shadow that only touches the bottom row of cells on a few panels in the back row can therefore cut the output of that entire row noticeably.
Winter is when this problem is worst. In December and January the sun sits low in the sky in Pakistan — especially in the north — so shadows are at their longest. A layout that looks comfortably spaced in July can be shaded row-to-row by mid-morning in December. That is why professional layouts are planned against the low winter sun, not the high summer sun: if the rows clear each other on the shortest day of the year, they clear each other every other day too.
The Three Inputs That Set Your Spacing
There is no single correct spacing number for every roof, because the right gap depends on three things. Once you know them, the formula in the next section gives you the answer.
1. Panel Height Above the Roof
The shadow a row casts comes from its top edge — the highest point of the tilted panel. That height equals the panel’s length along the tilt multiplied by the sine of the tilt angle. A panel mounted in portrait (tall side up the slope) stands much taller than the same panel mounted in landscape, which is why orientation matters so much for spacing — more on that below.
For a typical modern panel around 2.3 metres long tilted at roughly 30 degrees, the top edge sits about 1.1 to 1.2 metres above the roof. If your installer uses adjustable structures, the height changes with the tilt setting — so spacing must be planned for the tilt you will actually use, not the structure’s flattest setting.
2. Your Latitude: How High the Winter Sun Climbs
The sun’s height at solar noon on the winter solstice (around 21 December) is what sets the longest midday shadow of the year. It follows a simple rule: 90° minus your latitude, minus another 23.4° for the Earth’s winter tilt. In practice:
- Karachi (~25°N): the midday winter sun climbs to about 42° above the horizon.
- Lahore (~31.5°N): the midday winter sun reaches only about 35° above the horizon.
- Cities further north get a still lower winter sun and therefore need wider spacing.
This is the main reason a layout copied from a Karachi installation cannot simply be reused in Peshawar — the same panel height casts a longer shadow where the winter sun sits lower.
3. Row Orientation
In Pakistan, panel rows face south — the direction that captures the most sun in the northern hemisphere, as EnergySage’s guide on the best angle and direction for solar panels explains. Rows therefore run east–west, and each row shades the row directly behind it (to its north). The spacing you calculate is the north–south distance between rows. If your rows must run in another direction for any reason, the shadow geometry changes and the layout needs professional shading analysis rather than this simple rule.
The Winter-Sun Rule: A Simple Spacing Formula

Here is the geometry behind the rule: the front row’s shadow length at winter noon equals the panel height divided by the tangent of the sun’s elevation angle. In plain steps:
- Find the panel height (H) — panel length along the tilt × sin(tilt angle). For a 2.3 m panel tilted at 30°: 2.3 × 0.5 ≈ 1.15 m.
- Find the winter noon sun elevation — 90° − your latitude − 23.4°. For Lahore: 90 − 31.5 − 23.4 ≈ 35°.
- Divide height by tan(sun elevation) — tan(35°) ≈ 0.70, so 1.15 ÷ 0.70 ≈ 1.6 to 1.7 metres of row spacing.
So in Lahore, a typical tilted row needs roughly 1.6–1.7 metres of clear north–south gap before the next row begins. In Karachi, where the winter sun is higher (about 42°, tan ≈ 0.90), the same rows need roughly 1.3 metres. Always measure the gap from the top edge of the front row to the front edge of the row behind, horizontally — that is the distance the shadow actually has to cross.
Add a small safety margin to the calculated number — a few extra centimetres cost you almost nothing in roof space and protect you if the structure ends up tilted slightly steeper than planned, or if the panel model used is a few centimetres longer. Rounding the Lahore example up to about 1.75–1.8 m is sensible practice.
Portrait vs Landscape: Orientation Changes the Math
The same panel can be mounted in portrait (long side running up the slope) or landscape (long side running along the row). Because spacing depends on how tall the panel stands, this choice changes everything:
- Landscape mounting gives a lower top edge (panel width, not length, runs up the slope) — so rows can sit closer together. On a small flat roof, landscape rows often fit one extra row where portrait rows would not.
- Portrait mounting stands taller and needs wider gaps — but it fits more panels along a narrow roof width, because each panel takes less horizontal room.
- Whichever you choose, re-run the spacing formula with the actual mounted height. Never apply a portrait-layout spacing to landscape rows, or vice versa.
Most residential installers in Pakistan use landscape mounting on flat rooftops precisely because the tighter spacing fits more panels on a limited roof. Discuss the trade-off with your installer before the structures are fixed — changing orientation after installation means re-drilling and re-sealing.
Flat Roofs vs Sloped Roofs and Ground Mounts
The winter-sun formula applies whenever one row of tilted panels stands behind another — which means it matters for:
- Flat rooftops with tilted frames — the most common residential case in Pakistan. Full spacing calculation applies.
- Ground-mounted arrays — identical geometry to flat rooftops. Calculate spacing the same way, and also leave access lanes for cleaning and inspection.
- Sloped roofs where panels follow the roof pitch — here the panels are not raised on tilt frames, so there is no tall front row casting long shadows onto a row behind. Small gaps (a few centimetres to a hand’s width) for panel expansion, airflow, and maintenance are enough. No winter-sun calculation needed.
Hybrid roofs — for example, a flat roof section plus a sloped section — should be treated as two separate layouts, each planned with its own rules.
Walkways and Maintenance Access

Row spacing is about shadows, but your layout also needs walking space. Panels must be cleaned (especially before and during the winter fog season), connections need inspection, and inverters’ DC strings need access. Plan for:
- A service lane every one or two rows — wide enough to walk and carry a water bucket or cleaning brush comfortably, without stepping on the panels themselves. Panels are not designed to be walked on; cracked cells from foot traffic are a real and expensive failure.
- Access around the array edges — do not run the last row hard against a parapet wall, where it becomes unreachable and where the wall’s own shadow may fall.
- Airflow — generous spacing also lets air circulate under the panels, and airflow plus a planned layout makes working out how many solar panels you need on a given roof much more realistic than cramming in the theoretical maximum.
Common Row Spacing Mistakes to Avoid
- Cramming rows to fit “one more” — the most expensive mistake in layout planning. The extra row’s winter production is partly lost to shading, and it shades the rows behind it too. Fewer well-spaced rows consistently out-produce more crowded ones.
- Copying a spacing number from another city — as shown above, Karachi spacing does not protect a Lahore or Peshawar array. Always calculate with your own latitude.
- Forgetting parapets, water tanks, and stair bulkheads — rooftop structures cast long shadows in winter too. Map every obstruction’s winter shadow, not just the panel rows’.
- Measuring from the wrong points — the gap that matters is horizontal distance from the front row’s top edge to the back row’s front edge, not from post to post or frame to frame.
- Ignoring morning and afternoon sun — the winter-sun rule guarantees noon clearance, but shadows also swing sideways in the morning and evening. Keep a small margin and avoid placing rows where a side obstruction (like a neighbouring building) blocks the low morning sun.
- Mixing structure heights — if one row ends up tilted steeper than another (common with adjustable structures), its taller profile needs more spacing. Set every structure to its final tilt before finalising the layout.
Frequently Asked Questions (FAQs)
How much space should I leave between rows of solar panels?
Enough that the front row’s shadow never touches the row behind it at midday on the winter solstice. The exact gap depends on your panel height, tilt angle, and latitude — for typical tilted rows in Lahore it works out to roughly 1.6–1.8 metres, and in Karachi about 1.3 metres. Use the winter-sun rule in this guide to calculate your own number.
Why is the winter sun used to set row spacing?
Because the winter sun sits lowest in the sky, it casts the longest shadows of the year. A layout that clears the front row’s shadow on the shortest day of the year is automatically clear on every other day.
Does panel tilt angle change the spacing I need?
Yes. A steeper tilt raises the panel’s top edge higher above the roof, which casts a longer shadow and needs wider row spacing. Plan spacing for the tilt angle you will actually use, not the structure’s flattest setting.
Should I mount panels in portrait or landscape to save roof space?
Landscape mounting gives a lower profile, so rows can sit closer together — often fitting an extra row on a small flat roof. Portrait mounting stands taller and needs wider gaps but fits more panels across a narrow roof. Re-run the spacing formula with the actual mounted height either way.
Can I place panel rows closer together if my roof is small?
Squeezing rows together usually backfires: winter shadows from the front row cut the output of the rows behind it, and shaded rows drag down their whole string. Fewer well-spaced rows consistently out-produce more crowded ones.
Does a sloped roof need the same row spacing as a flat roof?
No. On a sloped roof where panels follow the roof pitch, no row stands taller than the one behind it, so only small gaps for expansion, airflow, and maintenance are needed. The winter-sun calculation applies to tilted frames on flat roofs and ground mounts.
How do walkways fit into a row spacing plan?
Add a service lane every one or two rows — wide enough to walk and carry cleaning tools without stepping on the panels — plus access around the array edges. Never place the last row hard against a parapet wall, where it becomes unreachable.

