Solar Panel Roof Layout Calculator

Enter your roof dimensions, fire code setbacks, and obstructions — get exact panel count, rows × columns arrangement, and estimated annual production.

ft
ft
ft
ft
ft
in
in
count
Roof layout result
29 panels fit (3 rows × 10 cols)
Usable roof area777 sq ft
Panel arrangement3 rows × 10 columns
System size11.60 kW
Est. annual production18,630 kWh/yr
Wasted usable area26.7%
Landscape alternative35 panels ▲ better
Fire code note3 ft ridge + 18 in side setbacks required in most US jurisdictions (IFC 605.11)
Link copied to clipboard

How to Use This Calculator

Enter your roof face dimensions

Measure the roof face where you plan to install panels — length (horizontal) and width (ridge to eave). If you have a multi-face roof, run the calculator for each face separately and add the totals. The calculator automatically deducts required setbacks from each edge before fitting panels.

Set setbacks per your local fire code

Most US jurisdictions follow IFC Section 605.11: 3 ft from the ridge, 18 inches from side edges, and 1 ft from the eave. These create emergency responder pathways. Some municipalities require 3 ft on all edges — check with your AHJ (Authority Having Jurisdiction). Flat commercial roofs often use different setback rules.

Choose orientation and add obstructions

Portrait orientation (panel taller than wide) typically fits more rows on a standard residential roof. Landscape can be better on shallow roofs with limited eave-to-ridge distance. The calculator shows how many panels the alternate orientation would fit — pick the higher count. For obstructions, select the type and enter how many are on that roof face.

Read the results

You'll see total panels that fit (rows × columns), system kW, estimated annual kWh at your location, and wasted area percentage. The portrait vs. landscape comparison instantly shows which orientation maximizes your roof.

The Formula

Usable Length = Roof Length − (2 × Side Setback) Usable Width = Roof Width − Ridge Setback − Eave Setback Portrait: Cols = ⌊ Usable Length ÷ Panel Short Edge ⌋ Rows = ⌊ Usable Width ÷ Panel Long Edge ⌋ Landscape: Cols = ⌊ Usable Length ÷ Panel Long Edge ⌋ Rows = ⌊ Usable Width ÷ Panel Short Edge ⌋ Panels Lost = ⌈ Obstruction Area ÷ Panel Area ⌉ × Obstruction Count Total Panels = (Cols × Rows) − Panels Lost System kW = Total Panels × 400W ÷ 1000 Annual kWh = System kW × PSH × 365 × 0.80

The obstruction deduction is conservative — in practice a good installer may route around obstructions more efficiently. The 0.80 system efficiency factor accounts for real-world losses: temperature derating, soiling, wiring losses, and inverter efficiency. A premium microinverter or optimizer system may reach 0.83-0.85.

Example

Maria — Medium colonial in Denver

Maria has a south-facing roof face measuring 40 ft long × 25 ft wide (ridge to eave). She has one skylight and wants to know if portrait or landscape fits more 400W panels.

Roof face40 ft × 25 ft
Setbacks3 ft ridge, 1 ft eave, 1.5 ft sides
Obstruction1 skylight (2×4 ft)
Panel400W, 69"×41" (portrait)
LocationDenver, CO (5.5 PSH)

Result

Usable area37 ft × 21 ft = 777 sq ft
Portrait layout10 cols × 3 rows = 30 panels
Panels lost to skylight1 panel
Total panels29 × 400W = 11.6 kW
Annual production~18,600 kWh/yr

At Denver's 5.5 peak sun hours, Maria's 11.6 kW system produces roughly 18,600 kWh per year — more than enough for the average Colorado home (9,300 kWh/yr). The landscape alternative fits only 28 panels, so portrait is the right choice here.

FAQ

The International Fire Code (IFC) Section 605.11 requires: 3 ft from the ridge, 18 inches from each side edge, and varies at the eave. These clearances create pathways for firefighters to access the roof during emergencies. Some jurisdictions adopt stricter rules — Los Angeles requires 3 ft on all sides. Always confirm with your local AHJ (Authority Having Jurisdiction) or permit office before finalizing layout. Flat commercial roofs often have different requirements.
It depends on your roof geometry. Portrait (panel taller than wide) usually fits more panels on roofs with adequate eave-to-ridge distance (18+ ft usable). Landscape is better on shallow roofs where ridge-to-eave distance is limited but the horizontal run is long. Use the calculator to compare both — the result shows the alternative count instantly. For string inverters, a uniform orientation also keeps strings cleaner for maximum output.
Run the calculator separately for each viable roof face (south-facing faces are most productive in the northern hemisphere; east/west faces produce 70-85% as much). Add the panel counts together for a total system size. Note that east and west faces should be on separate string inverters or use microinverters/optimizers to prevent the better-producing face from being dragged down by the other. A solar installer will provide an exact shade and layout analysis using specialized software (Aurora, PVSyst, or Helioscope).
The calculator takes a conservative approach — it removes one panel for each panel-sized area an obstruction occupies. In practice, a skilled installer using microinverters or DC optimizers can route more creatively around obstructions, sometimes losing fewer panels. The calculator's result is a reliable lower-bound estimate. For an exact count on a complex roof, request a 3D layout from your installer using tools like Aurora or Helioscope that model your actual roof geometry.
Wasted area is the percentage of your usable roof area (after setbacks) that panels do not cover — due to partial row/column gaps at the edges and obstructions. A typical residential layout wastes 10-25% of usable area. Switching to a different panel size or orientation can reduce waste. For commercial projects where every square foot counts, installers use software to optimize panel size selection and mixed-orientation layouts to minimize this percentage.

Related Calculators

Embed This Calculator

Free to embed on your website. Just copy this code:

<iframe src="https://solarsizecalculator.com/solar-panel-layout-calculator"
  width="100%" height="620" frameborder="0"
  title="Solar Panel Roof Layout Calculator"></iframe>