Solar Panel Roof Area Calculator

See how many solar panels fit on a roof face after fire setbacks and edge clearances, with system kW and usable area.

Horizontal length of the roof face you want to cover.
Measure along the slope, not the floor plan. Plan depth ÷ cos(pitch) gives the slope length.
Ridge setback (IRC R324.6.2)
36 in pathway on this face (IRC R324.6.1)
Racking or wind-zone margin kept clear on the other three edges. 12 in is a common default; your racking manual or AHJ may differ.
in
mm ÷ 25.4 = inches.
in
W
Panel orientation

Formula used

Formula and method below. Last checked by the SolarCalcLab Editorial Team.

Quick answer

To find how many solar panels fit on your roof, subtract the fire setbacks and edge clearances from each roof face, then divide the usable width and depth by the panel size. A 40 × 16 ft roof face with a 36 in ridge setback and 12 in edges fits 20 panels of 430 W in portrait, which is 8.6 kW. Most US homes fit 15 to 30 panels per suitable roof face.

SolarCalcLab Solar Panel Roof Area calculator showing 20 panels for the default example
The Solar Panel Roof Area calculator with a worked example. Change any input and the result updates instantly.

How to use the solar panel roof area calculator

  1. Enter the roof face size. Give the width along the eave and the depth from eave to ridge, measured along the slope. Use feet or meters.
    Step 1: enter the roof face size in the Solar Panel Roof Area calculator
  2. Set the fire setbacks. Choose the ridge setback (18 in or 36 in) and whether this face carries a 36 in pathway from eave to ridge. Your local fire code decides which apply.
    Step 2: set the fire setbacks in the Solar Panel Roof Area calculator
  3. Enter the edge clearance. This is the strip kept clear along the eave and both rake edges for racking and wind zones. 12 in is a common starting point.
    Step 3: enter the edge clearance in the Solar Panel Roof Area calculator
  4. Choose the panel and orientation. Pick a common panel size or enter a custom one. Best fit tries portrait and landscape and keeps the layout with more panels.
    Step 4: choose the panel and orientation in the Solar Panel Roof Area calculator
  5. Read the panel count. The big number is how many panels fit. The cards show the system size in kW, the usable area after setbacks and the share of the roof the panels cover.
    Step 5: read the panel count in the Solar Panel Roof Area calculator

Roof area formula

The calculator fits a simple grid of panels into the usable rectangle left after setbacks.

Usable width = W − 2 × edge − pathway
Usable depth = D − edge − ridge setback
Columns = floor((usable width + g) ÷ (panel width + g))
Rows = floor((usable depth + g) ÷ (panel height + g))
Panels = columns × rows; kW = panels × W panel ÷ 1,000

Where:

Roof setbacks and fire pathways (IRC R324.6)

The International Residential Code requires clear space on roofs with solar so firefighters can walk and ventilate. The section is R324.6 in the IRC editions most states use, though some local adoptions renumber it (Larimer County, Colorado, lists it as R329.6), and your state or city may amend it.

Pathways are counted per house, not per face, so a face often carries no pathway when another plane provides it. Spokane County’s solar permit guide is a clear example of how building departments apply these sections.

Worked examples

Example 1: 40 × 16 ft face, 36 in ridge setback

With 430 W panels (67.8 × 44.6 in) and 12 in edges:

Usable width = 480 − 24 − 0 = 456 in; usable depth = 192 − 12 − 36 = 144 in
Portrait: floor(456.8 ÷ 45.4) = 10 across, floor(144.8 ÷ 68.6) = 2 up

That gives 10 × 2 = 20 panels, or 8.6 kW. Landscape fits only 6 × 3 = 18.

Example 2: same roof with a pathway and an 18 in ridge setback

Usable width = 480 − 24 − 36 = 420 in; usable depth = 192 − 12 − 18 = 162 in

Portrait gives 9 × 2 = 18 panels, and landscape also gives 6 × 3 = 18, so 7.74 kW. The pathway costs one column even though the ridge setback is smaller.

Example 3: a metric roof, 12 × 5 m

With a 30 cm edge clearance and a 36 in (0.91 m) ridge setback:

Usable width = 12 − 0.6 = 11.4 m; usable depth = 5 − 0.3 − 0.91 = 3.79 m

Portrait fits 9 across and 2 up, so 18 panels or 7.74 kW. Landscape fits 6 × 3, also 18.

How many solar panels fit on a roof face

Computed with 430 W panels (1,722 × 1,134 mm), 12 in edges, no pathway on the face, best orientation.

Roof face (ft) Face area 36 in ridge setback 18 in ridge setback
20 × 12 240 ft² 6 panels, 2.58 kW 6 panels, 2.58 kW
25 × 14 350 ft² 8 panels, 3.44 kW 12 panels, 5.16 kW
30 × 15 450 ft² 8 panels, 3.44 kW 14 panels, 6.02 kW
35 × 16 560 ft² 16 panels, 6.88 kW 16 panels, 6.88 kW
40 × 16 640 ft² 20 panels, 8.6 kW 20 panels, 8.6 kW
40 × 20 800 ft² 24 panels, 10.32 kW 30 panels, 12.9 kW
50 × 18 900 ft² 24 panels, 10.32 kW 32 panels, 13.76 kW
60 × 20 1,200 ft² 40 panels, 17.2 kW 45 panels, 19.35 kW

Panels fit in whole rows, so a few inches of roof depth can add or lose an entire row.

What affects how many panels fit

Roof depth versus panel length

Rows are the big lever. A face 144 in deep fits two portrait rows of 67.8 in panels, while 150 in still fits only two. Try both orientations: landscape often wins on shallow faces and wide, short roofs.

Obstructions and shade

Vents, chimneys, skylights and satellite dishes each need their own clearance, and the calculator assumes a clear rectangle. Shaded corners produce little power, so leave them empty. The solar panel output calculator estimates what the array will produce.

Panel size

Smaller frames waste less space at the edges. A 74 × 41 in panel and a 67.8 × 44.6 in panel give different counts on the same roof. Check frame sizes with the solar panel size calculator.

Racking and wind zones

Some racking systems and engineering letters require larger clearances near roof edges and corners, where wind uplift is highest. In high-wind areas, 18 to 36 in edge zones are common.

Local code amendments

Many states, cities and fire districts change these setbacks. Check with your authority having jurisdiction before you buy panels.

Frequently asked questions

How many solar panels can fit on my roof?

Measure each usable roof face, subtract the fire setbacks and edge clearances, and divide by the panel size in both directions. A typical 40 × 16 ft face fits about 20 panels of 430 W. Count only faces that get good sun, usually south, east and west in the US.

What is the 36 inch rule for solar panels?

Under IRC R324.6, roofs need 36 in wide pathways from eave to ridge, and arrays covering more than 33% of the plan-view roof area need a 36 in clear setback on both sides of the ridge. Smaller arrays can use 18 in. These spaces let firefighters walk and cut ventilation openings.

How much roof space does a 6 kW system need?

A 6 kW system is 14 panels of 430 W, about 294 ft² of panel area. After ridge setbacks and edge clearances you typically need a roof face of 450 ft² or more. Using an 18 in ridge setback where allowed can fit it on a 30 × 15 ft face.

Should solar panels be portrait or landscape?

Portrait is most common on pitched roofs because rails run across the rafters and rows fit eave to ridge. Landscape can fit more panels on shallow or very wide faces. Let the calculator compare both, then confirm the racking manufacturer supports the orientation you choose.

Do I measure roof depth along the slope?

Yes. Panels lie on the roof surface, so use the slope length from eave to ridge. If you only know the plan depth, divide it by the cosine of the pitch angle. A 6/12 pitch is 26.6°, so 14 ft of plan depth is about 15.7 ft along the slope.

Related calculators