How this solar roof calculator works
You can’t cover the whole roof with panels. Edges and ridges need clearance for wind, fire access and installation, chimneys and skylights break up the grid, and modules only come in fixed sizes. On flat roofs the tilted rows also have to be spaced so they don’t shade each other. So instead of dividing square metres, this calculator lays out real modules.
Pitched roofs. If you measured the roof depth on a floor plan or from the ground, the calculator converts it to the true slope length (plan depth ÷ cos pitch; a 35° roof is 22% deeper along the slope than on plan). It subtracts the eave, ridge and side setbacks and packs modules plus clamp gaps three ways: all portrait, all landscape, and mixed rows, where portrait rows are followed by a landscape row in the leftover strip. The layout with the most modules wins. The gable option repeats the layout on the opposite face, with its own yield.
Flat roofs. Modules sit in tilted rows. Equator-facing rows are spaced so the row behind stays unshaded at solar noon on the shortest day of the year at your latitude. East–west layouts put the rows back-to-back in pairs, with a maintenance path between pairs. Portrait and landscape mounting are both tested and the denser one is kept.
Obstructions are subtracted at 1.5 times their area, because each one breaks rows and columns. The system size times your specific yield gives the annual energy, and the module and racking weight gives the added roof load.
The geometry
m is the module dimension running up the tilt, β the row tilt and α the noon sun elevation at the winter solstice.
Worked example: a 10 m × 5 m south roof at 35°
The default roof is 10 m long at the eaves and 5 m deep on plan, pitched at 35°. Along the slope it is 6.1 m deep, for a roof surface of 61 m². Take off 0.3 m at the eaves, 0.4 m at the ridge and 0.4 m at each gable end and a 9.2 × 5.4 m rectangle remains.
With 430 W modules of 1.722 × 1.134 m and 20 mm clamp gaps, portrait gives 3 rows of 7 = 21 modules and landscape 4 rows of 5 = 20. The mixed layout can’t squeeze in another row. The 1 m² chimney costs one module, which leaves 20 panels = 8.6 kWp. At 1,200 kWh/kWp that is about 10,300 kWh a year. The modules cover 64% of the roof surface and add about 14 kg/m².
The panel comparison holds a less obvious lesson. 450 W modules, in a slightly larger format, fill the same 20 positions for 9.0 kWp, while the big 550–700 W formats fit badly on this small roof and deliver less total power.
How to read the results
- Panels that fit and the layout (rows × columns, portrait or landscape) are what an installer would draw.
- Usable area after setbacks shows how much of the roof the rules take away, often 20–30% on small roofs.
- Power density (Wp per m² of roof) lets you compare roofs and layouts. Pitched roofs typically reach 120–160 Wp/m², south-facing flat-roof rows 80–110 Wp/m² and east–west flat-roof layouts 120–150 Wp/m².
- Added roof load is a first figure to take into the structural check.
Typical values
| Roof | Typical usable share | Modules (430 W) per 10 m² of roof | Wp per m² roof |
|---|---|---|---|
| Simple pitched roof, few obstacles | 70–85% | 3.5–4.5 | 140–180 |
| Pitched roof with dormers/skylights | 50–70% | 2.5–3.5 | 100–140 |
| Flat roof, south rows at 15° (45–50° lat.) | 40–50% module cover | 2–2.5 | 85–110 |
| Flat roof, east–west at 10° | 55–70% module cover | 3–3.5 | 120–150 |
Tips to fit more panels
- Try both orientations and mixed rows. An extra row of landscape modules in a leftover strip is common.
- Look at the module format, not just the wattage. On small or awkwardly shaped roofs, compact 108-cell modules often give more kWp than large 144-cell or 210 mm formats.
- Go east–west on flat roofs when area is the limit. South rows make more sense when yield per module matters more.
- Know your setback rules. Fire-access and wind-zone requirements vary widely, and in some US jurisdictions they take a third of a small roof.
- Then size the rest of the system. Check the panel count against demand with how many solar panels, simulate the yield with the solar panel calculator and design the strings with the string sizing calculator.
Limitations
Every roof is treated as a rectangle. Split hips, valleys, dormers and irregular shapes into rectangular sections and enter them one by one. Obstructions are handled statistically, not by position. The calculator doesn’t model shading from chimneys, trees or neighbouring buildings, or partial rows offset around obstacles. Flat-roof spacing uses a solar-noon rule, and designers at high latitudes often accept some winter shading to fit more modules. The roof load figures are indicative: have the structure assessed for snow and wind loads before installation.
Method & assumptions
Pitched roofs: slope depth = plan depth ÷ cos(pitch). The usable rectangle is length − 2 × side setback by slope depth − eave − ridge setbacks. Modules (plus clamp gaps) are packed in portrait rows, landscape rows, and mixed rows (portrait rows, then landscape rows in the leftover strip); the best count is used.
Flat roofs: equator-facing rows tilted β need a row pitch of d = m·cos β + m·sin β ÷ tan α, where m is the module dimension up the slope and α the noon sun elevation on the winter solstice (90° − latitude − 23.44°). East–west rows sit back-to-back in pairs separated by a maintenance path. Obstructions remove ⌈1.5 × area ÷ module area⌉ modules. kWh = kWp × specific yield.
Frequently asked questions
How many solar panels can fit on my roof?
How much roof space do I need for a 6 kW solar system?
Is portrait or landscape better for solar panels?
How far apart should rows of solar panels be on a flat roof?
Are east-west solar panels on a flat roof worth it?
Can my roof support solar panels?
Sources & references
- International Fire Code (IFC 2021) Section 1205 — Solar photovoltaic power systems (roof access and pathways)
- NREL — Rooftop Solar Photovoltaic Technical Potential in the United States (roof suitability and packing assumptions), NREL/TP-6A20-65298
- Eurocode 1 (EN 1991-1-3/-1-4) — snow and wind actions on roofs
- European Commission JRC — PVGIS (yield per kWp for any orientation)
Embed this calculator
Free for blogs, installers, schools and NGOs. Copy the code below; it updates itself automatically.