Calculators and tools

How Many Solar Panels Fit on My Roof? Roof Layout Calculator

Count how many solar panels fit on one face of your roof after edge clearances and obstacles, in portrait and landscape layouts. Use it before you get quotes to see whether your roof can hold the system size you need.

How Many Solar Panels Fit on My Roof?

Measure one sunny roof face. Repeat for each face.

Measured along the slope, not the floor plan.

Fire codes often need 18–36 inches of clear path; this applies it on every side as a simple estimate.

Reduce for chimneys, vents, skylights and shade.

Most home panels sold in 2026 are about 400–450 W.

More optionsFewer options

About 5.6–5.9 ft for a 400–450 W panel.

About 3.4–3.75 ft.

Your result

Panels that fit 16 panels

System size on this face
6.4 kW
Portrait layout
18
Landscape layout
15

About 16 panels fit on this roof face (6.4 kW), using a portrait layout. A site survey with exact code setbacks will confirm.

Educational estimate only. Not financial, tax or legal advice.

Panels by layout
05101520PortraitPortraitLandscapeLandscapePortrait · Panels: 1818Landscape · Panels: 1515
  • Panels
View as table
LayoutPanels
Portrait18
Landscape15

Compare edge clearances

ResultA 1.5 ft clearanceB Your inputsC 4 ft clearanceDifference (B − A)
Panels that fit21169-5
System size8.4 kW6.4 kW3.6 kW-2 kW

Results update as you type. Without JavaScript you see the worked example below.

How to use it

  1. Measure one sunny roof face and enter its length along the eave and its depth from eave to ridge.
  2. Set the clear space at edges for fire-code pathways and setbacks.
  3. Lower the share free of vents and skylights if the face has chimneys, vents or shade.
  4. Enter the panel wattage, and under advanced the panel length and width from the spec sheet.
  5. Read the panels that fit and the system size, then repeat for each roof face.

How many solar panels fit on my roof? Subtract the required clearances from each roof face, see how many panel rows and columns fit in portrait and landscape, then remove space for vents and skylights. With the defaults, a 40 by 18 foot face with 3 feet of clearance holds 16 panels of 400 W, or 6.4 kW.

How to use the roof calculator

Measure one roof face at a time. A face is one flat plane of the roof, such as the south side of a gable roof.

  1. Roof face length (along the eave). The horizontal length of that face. Default 40 ft.
  2. Roof face depth (eave to ridge). Measured along the slope, not the floor plan. Default 18 ft.
  3. Clear space at edges. Applied to every side as a simple stand-in for fire-code pathways and setbacks. Default 3 ft.
  4. Share free of vents and skylights. Reduce it for chimneys, plumbing vents, skylights and shade. Default 90%.
  5. Panel wattage. From your quote. Default 400 W.
  6. Advanced: Panel length and Panel width. From the spec sheet. Defaults 5.75 ft by 3.6 ft.

The results show the panels that fit, the system size on this face and the counts for portrait and landscape layouts, with a bar chart comparing the two. A scenario table reruns your roof with 1.5 ft of clearance, your own clearance and 4 ft of clearance.

How the calculation works

The tool shrinks the roof face by the clearance on all four sides, packs panels in a simple grid with a 1-inch gap, tries both orientations and keeps the better one.

Usable length = roof length − 2 × clearance
Usable depth  = roof depth − 2 × clearance
Fit(a, b)     = floor((usable length + gap) ÷ (a + gap)) × floor((usable depth + gap) ÷ (b + gap))
Portrait      = Fit(panel width across, panel length up the slope)
Landscape     = Fit(panel length across, panel width up the slope)
Panels        = floor(max(portrait, landscape) × usable share)
System kW     = panels × panel watts ÷ 1,000

Assumptions: a rectangular face, a uniform clearance on every side, a 0.08 ft (about 1 inch) gap between panels, no mixed orientations, and obstacles handled as a percentage rather than placed on the roof.

Worked example

Default inputs: 40 ft by 18 ft face, 3 ft clearance, 90% usable, 5.75 by 3.6 ft panels, 400 W.

  • Usable area: 34 ft by 12 ft.
  • Portrait: 9 panels across × 2 rows = 18. Landscape: 5 across × 3 rows = 15.
  • Panels that fit: 18 × 90% = 16.2, rounded down to 16 panels, or 6.4 kW in portrait.

Second example, a smaller ranch roof: 34 ft by 16 ft, 1.5 ft clearance, 85% usable, 430 W panels of the default size.

  • Usable area: 31 ft by 13 ft. Portrait fits 16 and landscape 15.
  • Panels that fit: 16 × 85% = 13.6, rounded down to 13 panels, or 5.59 kW.
  • With 4 ft of clearance, the same face drops to 6 panels (2.58 kW).

How clearance changes the default roof

Edge clearancePanels that fitSystem size
1.5 ft218.4 kW
3 ft (default)166.4 kW
4 ft93.6 kW

Clearance has a big effect because it removes space from all four edges, and a lost row of panels is a lot of capacity.

What your result means

Compare the kW that fits with the size you need from how many solar panels do I need. If one face is not enough, add other faces that get good sun. The median US home system installed in 2025 was 7.7 kW (LBNL, 2026 (opens in a new tab)), so many homes use two faces.

If roof space is tight, higher-wattage panels raise kW per square foot. Our guide to how much solar panels cost explains how that affects price, and are solar panels worth it covers whether a smaller system still pays off.

Rules that change the answer

  • Fire-code access. Many counties adopt IRC R324.6: at least two 36-inch pathways from eave to ridge, and ridge setbacks of 18 inches when the array covers up to 33% of the roof or 36 inches above that, with more room allowed for sprinklered homes (Leon County (opens in a new tab); Spokane County (opens in a new tab)). Local amendments vary.
  • Orientation. DOE says south-facing roofs with a 15 to 40 degree slope generally perform best (DOE (opens in a new tab)). Check your pitch with the solar panel angle calculator.
  • Hot climates. In places like Phoenix, an east or west face can still produce well; see solar panels in Arizona.
  • HOA rules. Some states limit HOA restrictions on solar, but placement rules may still apply.

Common mistakes

  • Measuring depth from the floor plan instead of along the slope.
  • Counting a shaded face as usable.
  • Forgetting that pathways and ridge setbacks remove whole rows.
  • Assuming panels can run to the roof edge.
  • Using one roof face's result as the whole-house answer.

Limits of this calculator

This is an educational layout estimate, not a design or code review. It assumes a rectangular face and a uniform clearance, and it does not place obstacles, check structural capacity, wind and snow loads, or your local fire department's exact rules. An installer's site survey and the permit drawings decide the final count.

Frequently asked questions

How many solar panels fit on an average roof face?

With the defaults, a 40 by 18 foot roof face with 3 feet of clearance on every side and 90 percent usable area fits 16 panels of 400 W, or 6.4 kW. Most homes have more than one usable face, so add the faces that get good sun.

How much clearance do fire codes require?

It depends on your local code. Under the International Residential Code as adopted by many counties, roofs with arrays need access pathways at least 36 inches wide from eave to ridge, and ridge setbacks of 18 inches when panels cover up to 33 percent of the roof, or 36 inches above that. Sprinklered homes and local amendments can differ, so ask your building department.

Why does this tool apply the clearance on every side?

It is a simple, conservative estimate. Real layouts often place panels closer to some edges, such as the eave, and farther from others, such as the ridge or a pathway side. The scenario table shows the range from 1.5 feet to 4 feet so you can see how much clearance matters.

Is portrait or landscape better?

Whichever fits more panels on your roof. The tool tries both and uses the higher count. On the default roof, portrait fits 18 panels and landscape 15 before obstacles are removed. Installers sometimes mix orientations, which can add a panel or two.

How do I measure my roof without climbing on it?

Measure the eave length from the ground, then estimate the slope depth from the building's width and roof pitch, or use satellite imagery from a mapping service. Depth should be measured along the slope, not the floor plan. An installer's site survey will confirm.

What panel size should I use?

Use the length and width on the spec sheet of the panel in your quote. The defaults are 5.75 by 3.6 feet, typical for panels in the 400 to 450 W range. Larger panels fit fewer per row but may produce more per square foot.

Can a north-facing roof face hold useful panels?

It can hold them, but they produce less in the US. DOE says south-facing roofs with a 15 to 40 degree slope generally perform best. Count east and west faces too, then check expected output with PVWatts before paying for a north-facing array.

Sources

Checked against these sources. Dates show when each was last reviewed.

  1. Residential Roof Access Requirements (IRC R324.6 as adopted) (opens in a new tab), Leon County, Florida, Development Support and Environmental Management (as ofOctober 2026)
  2. BP-13 Solar Photovoltaic Systems (opens in a new tab), Spokane County Building and Planning (as ofOctober 2026)
  3. Homeowner's Guide to Going Solar (opens in a new tab), U.S. Department of Energy (as ofOctober 2026)
  4. PVWatts Calculator (opens in a new tab), National Laboratory of the Rockies (formerly NREL) (as ofOctober 2026)
  5. U.S. Distributed Solar and Storage: 2026 Data Update (opens in a new tab), Lawrence Berkeley National Laboratory (as ofOctober 2026)
Last updated: How we build our calculators

Related guides

Menu