Solar Panel Roof Fit & Layout Calculator

Enter the usable roof-plane dimensions and your module dimensions to compare panel orientations. The result also tests a target DC size and shows the shortest roof slope length that can hold it at the entered width.

Your numbers
Changing units should convert all existing dimensions rather than reinterpret them.
Measure the rectangular roof plane from side to side, not its horizontal map projection.
Measure along the roof surface from eave toward ridge.
Enter the planning margin to remove from both the left and right edges.
Enter the planning margin to remove at both ends of the roof slope.
Use the module’s outside frame length from its datasheet.
Use the module’s outside frame width from its datasheet.
Enter the intended clear frame-to-frame gap in both directions.
Use the rated maximum power printed on the module datasheet.
This optional target tests roof fit and estimates the depth needed for the target.

What this calculator leaves out

  • This is rectangular layout planning, not a structural, wind-load, snow-load, waterproofing, mounting, or code-compliance assessment.
  • Setbacks and access paths are user inputs; confirm locally required clearances with the authority having jurisdiction and a qualified installer.
  • The model assumes a flush-mounted clear roof plane and does not account for obstructions, clamp zones, rail spans, electrical design, shading, or annual energy production.

By using this calculator you agree to the Terms of Use. Results are estimates, not professional advice.

Recommended layoutMixed: 2 portrait rows and 1 landscape rows = 18 panels (7.20 kW DC)

Maximum panel count
18
Maximum DC array size (kW)
7.2
Portrait-only layout
Portrait: 7 columns × 2 rows = 14 panels (5.60 kW DC)
Landscape-only layout
Landscape: 4 columns × 4 rows = 16 panels (6.40 kW DC)
Mixed-layout breakdown
2 portrait rows × 7 panels, 1 landscape rows × 4 panels; 182.50 in occupied depth.
Usable roof coverage
82.41%
Panels needed for target
20
Target fit result
Does not fit; short by 2 panel positions.
Minimum roof slope length for target (in)
242

Uses full-width portrait and landscape bands within a clear rectangular roof area; the selected dimension unit is used consistently throughout.

Panel count is geometry only. Confirm setbacks, mounting clearances, roof loading, electrical design, and local code with qualified professionals.

How to use this calculator

  1. Measure one clear rectangular roof plane along the eave and up the slope, then choose inches or centimeters.
  2. Enter the edge setbacks that must remain clear at both sides, the ridge, and the eave.
  3. Copy the module’s outside length, width, nameplate watts, and the intended frame-to-frame gap from its documentation.
  4. Review the recommended arrangement alongside the portrait-only, landscape-only, and mixed-band results.
  5. Enter zero for the optional target size when you only need the maximum fit.

How many panels fit on a roof plane

This calculator treats one roof face as a clear rectangle measured on the roof surface, not as its horizontal map area. It first removes the entered side setbacks from the eave width and the ridge-and-eave setbacks from the slope length. Chimneys, vents, skylights, valleys, hips, and access paths should be removed before entering a clear rectangle.

For either direction, the number of full modules is calculated as floor((available length + gap) ÷ (module length + gap)). Adding one gap to the numerator is important: gaps belong only between neighboring panels, so no trailing gap is required after the last module.

  • In portrait, module width runs along the eave and module length runs up the slope.
  • In landscape, module length runs along the eave and module width runs up the slope.
  • For mixed layouts, the calculator tests full-width horizontal bands of portrait and landscape rows and keeps the arrangement with the most panels.

When layouts hold the same number of panels, the tool chooses the shallower occupied depth; if that also ties, it chooses a single orientation. DC array size is panel count × panel watts ÷ 1,000. Coverage is the total module face area divided by the usable rectangular roof area, so gaps are not counted as module coverage.

Checking a target system size

The target count is ceiling(target kW × 1,000 ÷ panel watts). The fit result compares that whole-panel requirement with the maximum layout. To reverse the question, the calculator evaluates row combinations that hold the required count and reports the smallest occupied depth, then adds the ridge and eave setbacks back. This is a planning dimension, not a racking drawing.

What changes the result most

Roof width can favor one orientation because it changes the number of panels in every row. Roof slope length, edge clearances, and the panel gap determine how many rows fit. A small dimensional change near a whole-module boundary can add or remove an entire row, which is why dimensions should come from the module datasheet and a roof measurement rather than an aerial estimate.

What this layout does not establish

Geometry does not determine whether a roof is suitable or permitted. Mounting systems specify clamp zones, rail spans, module gaps, wind and snow limits, and attachment details. Local authorities can require access and fire clearances, while an installer must also design strings, inverters, conductors, grounding, and protection. Shade and orientation affect annual energy, so the maximum panel count is not automatically the best energy design.

Worked example

A 12 m by 6 m roof plane with 0.4 m setbacks on every edge leaves 11.2 m by 5.2 m. With 2.278 m by 1.134 m modules, a 0.02 m gap, and 550 W modules, portrait fits floor((11.2 + 0.02) ÷ (1.134 + 0.02)) = 9 columns and floor((5.2 + 0.02) ÷ (2.278 + 0.02)) = 2 rows: 18 panels, or 9.9 kW DC.

Landscape fits four columns and four rows, or 16 panels. The mixed bands do not beat 18 panels here, so portrait is recommended. A 9.9 kW target needs 18 of the 550 W modules and fits with no spare positions.

Common questions

How many solar panels can fit on my roof?

It depends on the clear roof-plane width and slope length after setbacks, the exact outside module dimensions, and the required gap between modules. Enter each unobstructed roof rectangle separately when the roof has chimneys, skylights, valleys, or other interruptions.

Do more panels fit in portrait or landscape orientation?

Neither orientation always wins. Portrait uses the module width along the eave and its length up the slope; landscape reverses those dimensions. The better orientation is controlled by where the usable roof dimensions fall relative to full module and gap increments.

Can mixing portrait and landscape panels increase capacity?

It can when full-width rows of the two orientations use the available slope depth more efficiently than either orientation alone. This calculator limits mixed layouts to complete horizontal bands, so it does not attempt irregular mosaics around roof obstacles.

Should I measure the roof horizontally or along the slope?

Measure the eave dimension across the roof and the other dimension along the roof surface from eave toward ridge. The sloped surface length is longer than its horizontal projection, and it is the relevant length for flush-mounted module rows.

Does the maximum panel count predict solar production?

No. Panel count and nameplate watts give DC capacity, not annual energy. Roof direction, tilt, shade, temperature, inverter sizing, string design, and local weather all affect production.

Put this calculator on your site

Paste the snippet below where you want the calculator to appear. It stays up to date automatically and links back here.

<iframe src="https://countfolk.com/embed/solar-panel-roof-layout-calculator/" title="Solar Panel Roof Fit & Layout Calculator" width="100%" height="640" style="border:0;max-width:44rem" loading="lazy"></iframe>