Lifespan, planning & solar · Calculator

Solar Panel Roof Fit Calculator

Enter the roof face's width and height along the slope, the clear paths the fire code requires at the ridge and sides, the strip kept at the eave, the panel size, gap and power, and the calculator returns the panels that fit in portrait and in landscape, the better layout, the system size and how much of the face it covers.

It counts panels, not electricity: orientation, shading and local sun decide what they produce. What it does well is the geometry and the setbacks, which decide whether a face is worth an installer's visit.

Solar Panel Roof Fit Calculator

Units
ft
ft
in

Fire code: 18 in on each side of the ridge with some conditions, 36 in in others; check your jurisdiction

in

Commonly 36 in on at least one or two sides for firefighter access

in

Installers usually keep 6 to 12 in from the edge

in
in
in
W

Example result for the starting values. Enter your own and press Calculate.

Panels that fit

18

7.2 kW at 400 W each, landscape

System
7.2 kW
Layout
6 × 3
Covered
59%
How the panels fit
Roof face40 ft × 15 ft = 600 sq ft
Usable after setbacks444 in × 132 in
Portrait (long side up the slope)10 across × 1 up = 10
Landscape (long side along the eave)6 across × 3 up = 18
Best layoutlandscape, 18 panels
System size18 × 400 W = 7.2 kW
Share of the face covered59%
Show the arithmetic
  1. Usable = 480 − 2 × 18 by 180 − 36 − 12 in
  2. 10 across × 1 up = 10
  3. 6 across × 3 up = 18
  • This counts panels that fit, not the electricity they make: orientation, tilt, shading and local sun decide that, and an installer's design tool or NREL's PVWatts estimates it.
  • Setbacks come from the International Fire Code and IRC R324 as adopted locally, and vary: ridge paths of 18 or 36 in, side and eave paths for firefighters. Check with the building department or an installer.
  • If the shingles are more than about 10 years old, reroof before the panels go on: removing and reinstalling a solar array for a reroof costs thousands.

Understanding your result

The headline is the number of panels that fit, with the system size and orientation. The stats give the kilowatts, the layout and the coverage. The breakdown shows the usable area after setbacks and both layouts.

The face dimensions come from the roof area calculator and the pitch calculator (the height is along the slope). Before the panels go on, check the roof’s remaining life with the replacement planner; the added weight is small, but the roof weight calculator shows the base load it sits on.

How we calculate this

usable width = face width − 2 × side setback usable height = face height − ridge setback − eave strip across = floor((usable width + gap) ÷ (panel across + gap)) up = floor((usable height + gap) ÷ (panel up + gap)) panels = across × up (best of portrait and landscape) kW = panels × watts ÷ 1,000

The face height is measured along the slope from eave to ridge, not in plan; the pitch factor converts a plan run. The solar-ready roof guide covers orientation and shade.

The assumptions behind the numbers

Assumption Default Where it comes from
Ridge path 36 in International Fire Code and IRC R324 provisions (18 or 36 in depending on conditions)
Side paths 18 in each side A conservative middle; check the local code
Eave strip 12 in Installer practice
Panel 69 × 41 in, 400 W A common residential panel
Gap 1 in Racking clamp spacing

Assumptions last reviewed October 7, 2026.

The calculator does not model vents, chimneys or skylights in the array area, shading, orientation or production. This site links no solar company; NREL’s PVWatts is a free public tool for estimating output.

Two worked examples

A 40 by 15 foot south face

36 in ridge, 18 in sides, 12 in eave, 69 × 41 in 400 W panels.

  • Usable: 444 × 132 in
  • Portrait 10; landscape 18: 18 panels, 7.2 kW, 59% of the face

A taller 32 by 22 foot face with 36-inch side paths

18 in ridge, 430 W panels.

  • Usable: 312 × 234 in
  • Portrait 21; landscape 20: 21 panels, 9.03 kW

Where to find your inputs

Face width and height. From the plan or satellite view; the height along the slope.

Setbacks. From the local building department or an installer.

Panel. From the installer’s quote.

Common mistakes

  • Using the plan height. Measure along the slope.
  • Ignoring setbacks. They can take a third of a small face.
  • Panels over an old roof. Reroof first if it is near its end.
  • Vents in the array. They must be worked around.
  • Counting north faces. Orientation matters for output.
  • Assuming panels equal production. Use PVWatts or an installer.

Questions people ask

How many solar panels fit on my roof?
Subtract the setbacks from the roof face, then divide by the panel size in both orientations. A 40 by 15 foot face with a 36-inch ridge path, 18-inch side paths and a 12-inch eave strip holds 18 panels of 69 by 41 inches in landscape, 7.2 kW at 400 watts each.
What are solar fire setbacks?
Clear paths on the roof for firefighters to walk and vent the roof, required by the International Fire Code and IRC R324 as adopted locally: typically 18 or 36 inches at the ridge and 36-inch access paths from the eave to the ridge on one or more sides. The local building department sets the exact figures.
Portrait or landscape?
Whichever fits more panels on your face: short, wide faces often fit more in landscape, tall faces in portrait. The calculator tries both.
How big is a solar panel?
Residential panels are commonly about 65 to 75 inches by 39 to 45 inches, 18 to 22 square feet, and 350 to 450 watts. Use the data sheet of the panel you are quoted.
Should I replace my roof before installing solar?
If the roof has less than about 10 to 15 years left, yes: removing and reinstalling an array for a reroof costs thousands. The replacement planner estimates the remaining life.
Can my roof carry solar panels?
Panels and racking add about 2.5 to 4 pounds per square foot. Most roofs carry that; an installer checks the structure as part of the permit.
Embed this calculator on your site

Paste the code into any page. It is free to use; the only thing we ask is that the credit link under the calculator stays.

See all calculators: embed