Answer
Check the roof dimensions. Mark the fire-access pathways and setbacks that apply at the address. Compare portrait and landscape on each roof plane. Model shading, then match modules to strings. The 2021 International Residential Code (IRC) and International Fire Code (IFC) start from 36-inch pathways and 18-inch ridge setbacks (array up to 33% of roof area).
Last updated: November 2026. SurgePV publishes this post and sells solar design software.
A rectangle that fits on a picture is only a first placement. Installers also need to know if it can be mounted, wired, reached, and maintained as drawn. This guide keeps the original eight-step workflow. It adds an acceptance check at each stage. For an overview of placement ideas, see the panel layout resource hub. For the wider design process, read how to design a solar system.
Laying out a roof today?
Place modules, check shade and match strings in one workflow. A guided SurgePV demo shows gable, hip and flat roofs on your own project.
Book a DemoChecking cost first? See the SurgePV pricing page
Step 1: Establish the site geometry and its confidence
Record each roof plane’s size, pitch, and azimuth. A roof plane is one flat face of the roof. Pitch is its slope. Azimuth is the compass direction it faces. Also record parapets (low walls at the roof edge), ridges, valleys, and changes in level. Locate skylights, vents, chimneys, HVAC equipment, drainage routes, and existing electrical equipment. The height of an obstruction matters to the shade model, not just its footprint.
Use imagery, survey data, and site observations together. Record the date, scale, and method of each measurement. An image can help you prepare a draft. But objects hidden by trees, or a recent roof change, need a second source to confirm them. Ask where any stated accuracy comes from and how it was checked.
Create a short uncertainty list. An unmeasured parapet, a hidden roof edge, or an unknown obstruction height should stay visible to the next reviewer. Confirm the sizes that decide whether a row fits before you order equipment. Arrange site measurements through a safe-access procedure.
The site record should also name the roof material, its condition, and the planned attachment method. Send structural questions and attachment design to the responsible qualified reviewer. Do not assume a standard roof load allowance.
Acceptance check: the layout points to a dated site plan. Uncertain sizes are marked, not quietly treated as exact.
Step 2: Draw project-specific exclusion and access zones
Find the usable space before you add modules. Check fire access and roof-edge and ridge rules. Check equipment service clearances, drainage, attachment limits, and any structural exclusion zones. These limits can come from different documents. Do not collapse them into one generic setback.
If your project uses International Codes, find the adopted edition and local changes. The International Code Council’s adoption guidance explains that jurisdictions adopt chosen codes through law and may amend them. A jurisdiction is the local area whose rules apply. The rule that applies is the one your jurisdiction adopted, with its changes. Other countries have their own rules and approval process.
Example: model-code requirements for one- and two-family dwellings. The table below summarizes 2021 IRC R324.6 and 2021 IFC 1205.2. They are printed in the MyBuildingPermit.com Construction Tip Sheet 24 (14 April 2025, which includes Washington State amendments). IRC is the International Residential Code. IFC is the International Fire Code. A typical setback is 18 inches (457 mm) at a horizontal ridge. That holds when the array covers up to 33% of the plan-view (seen from above) roof area (2021 IFC 1205.2.1.2). Confirm the adopted edition with your authority.
| Item | 2021 IRC and IFC requirement |
|---|---|
| Pathways | At least two pathways on separate roof planes. Each is at least 36 inches (914 mm) wide and runs from the lowest roof edge to the ridge. At least one is on the street or driveway side. Each roof plane with an array needs a 36-inch pathway on that plane, an adjacent plane, or straddling both. |
| Ridge setback, array up to 33% of plan-view roof area | 18 inches clear on both sides of a horizontal ridge |
| Ridge setback, array over 33% | 36 inches clear on both sides of a horizontal ridge |
| Ridge setback with an NFPA 13D or IRC P2904 sprinkler system | 18 inches up to 66% of plan-view roof area, 36 inches above 66% |
| Below an emergency escape and rescue opening | No panels, and a 36-inch pathway to the opening |
| Roofs at 2:12 slope (17 percent) or less | Roof access, pathways and setbacks are not required |
| Where the code official finds rooftop operations will not be used | Not required |
These values are from 2021 IRC R324.6 and 2021 IFC 1205.2 as printed in MyBuildingPermit.com Construction Tip Sheet 24 (14 April 2025). Your jurisdiction may amend them.
Key Takeaway
The model code starts from 36-inch pathways and an 18-inch ridge setback that grows to 36 inches once the array passes 33% of the plan-view roof area. Confirm the adopted edition for the address before you draw a single module.
Keep a requirements register. List the issuing authority and the document edition. Add the relevant provision and the reviewer. If an access condition is unclear, ask the authority having jurisdiction (the office or official that enforces the code and approves the work) to settle it. Do this before you release the design. Check each project against the current local rules. Do not rely on a software template or a nearby project.
Mounting rules also need an exact equipment reference. For example, Canadian Solar’s installation manual, revision 3.1 gives mounting setups and load conditions for named module families. Use the instructions for your module model and mounting system. Do not use a clamp position borrowed from another module.
Acceptance check: every exclusion zone has a named basis, and the planned attachment setup has a review owner.
Step 3: Compare portrait, landscape and roof-plane orientations
Portrait and landscape describe how the module’s long and short edges lie in the array. Azimuth and tilt describe the plane that faces the sun. Turning a module within the same plane does not turn a south-facing roof into an east-facing array.
Compare both layouts against the real roof shape and the mounting instructions:
| Question | What to compare |
|---|---|
| Does the arrangement fit? | Whole-module footprints, gaps between modules, clamps, and exclusion zones |
| Can it be mounted? | Approved rail direction, support locations, and loading conditions |
| How does it experience shade? | Obstruction shadows, cell layout, and electrical setup |
| Can it be serviced? | Access, cable management, and how to replace equipment |
| Does it change the wiring? | String routing, connectors, and assignment to inverter inputs |
Neither layout always gives better snow shedding, lower wind load, or cheaper racking. Those results depend on the equipment and the project design.
Portrait vs landscape: a worked comparison
Take a hypothetical 1,134 by 1,722 mm module with 20 mm gaps in both directions. The number of modules along a length L is the whole number below (L + 20) ÷ (module dimension + 20). The table fits modules into two usable rectangles, after setbacks. It ignores rails, hardware, and string limits.
| Usable area (along the eave by up the slope) | Portrait (1,134 mm along the row) | Landscape (1,722 mm along the row) |
|---|---|---|
| 9,000 × 3,000 mm | 7 columns × 1 row = 7 modules | 5 columns × 2 rows = 10 modules |
| 6,000 × 3,500 mm | 5 columns × 2 rows = 10 modules | 3 columns × 3 rows = 9 modules |
Check, first row, landscape: 5 × 1,722 + 4 × 20 = 8,690 mm fits in 9,000 mm, and 6 columns would need 10,432 mm. Check, second row, portrait: 2 rows × 1,722 + 20 = 3,464 mm fits in 3,500 mm. Landscape fits more on the first roof area, and portrait fits more on the second. So the answer changes with the roof. Count both on every plane. For hip-roof shapes, see solar panel layout on a hip roof.
Keep different roof planes easy to tell apart in the model and string schedule. PVsyst 8’s orientation documentation links electrical subarrays with their associated 3D tables. That link is a good review rule. The plane drawn in the scene must match the plane in the energy and electrical model.
Pro Tip
Count both orientations on every roof plane before you pick one for the whole house. In the worked example above, landscape wins on one rectangle and portrait on the other.
Acceptance check: the chosen layout has a written reason. Roof-plane orientation is not mixed up with module rotation.
Step 4: Place modules using complete dimensions
Work with the exact module size and mounting allowances. Check the full row footprint, including the stated gaps and end hardware, against the usable space. Roof area divided by module area is a rough capacity estimate. It does not prove the layout fits. For a quick first-pass count, use SurgePV’s free solar panel layout estimator. Then replace its assumptions with your project’s rules.
Take a hypothetical straight row of 20 modules, each 1,134 mm wide, with 19 gaps of 20 mm between modules:
Row width = 20 × 1,134 + 19 × 20 = 23,060 mm.
Ignoring the gaps understates this footprint by 380 mm. This teaching example does not give an approved module gap. Use the real manufacturer and mounting requirements, and add any extra end allowances.
On a flat roof or a ground-mounted array, tell the clear gap between rows apart from row pitch. Row pitch is measured between matching points on each row. Tilt, row size, terrain, and sun position affect self-shading. Spacing depends on the site, so model it.
Compare candidate pitches with a suitable model. Write down how that model defines ground coverage ratio (the share of ground the panels cover). The SAM shading and layout documentation describes row-to-row shading and the array sizes its model uses. SAM is a solar modeling program. Check that the model fits the real shape. Do not assume an irregular roof acts like ideal repeated rectangular rows.
Acceptance check: the drawing shows dimensioned array boundaries, and no module or hardware allowance crosses an exclusion zone.
Check a layout on your own roof types
SurgePV supports roof modeling, solar array layout and shading analysis in one workflow. See how it handles your next project.
See It on Your ProjectChecking cost first? See the SurgePV pricing page
Step 5: Evaluate shade and the value of each layout
Include nearby buildings, trees, roof equipment, and nearby rows where they matter. Match the shade scene to the site record. A detailed simulation of an incomplete scene can still give a misleading result.
Keep shaded irradiance (sunlight that reaches the panel) apart from the electrical loss that follows. SAM’s documentation treats three things apart. They are external shade inputs, partial shading, and self-shading assumptions. The electrical response depends on the model and the module setup. Shaded area is not automatically the same percentage as lost yearly energy.
Compare candidate layouts using the same weather, equipment, and loss assumptions. Record total annual AC energy and the roof planes affected. Record the change caused by adding or removing a module group. A lower specific yield (energy per kW installed) can come with higher total production. So do not review either number alone. Judge whether the extra production is useful for the customer’s load and export arrangement.
Module-level electronics do not restore sunlight that an obstruction blocks. If you consider them, evaluate the exact equipment setup and its modeled effect. Do not assign a universal recovery percentage.
Acceptance check: shade inputs, model limits, and the reason for keeping a shaded module group are recorded. For reporting terms, use the solar shading analysis guide.
Step 6: Reconcile the physical layout with string and inverter design
Number the modules or groups so the drawing can be matched to a string schedule. Identify the module model, the modules in series, and the parallel strings. Identify the inverter input and MPPT assignment. MPPT (maximum power point tracking) is how an inverter finds the best working point for the modules. A connector input is not the same as an independent tracker. Their limits may differ.
A string is a group of modules wired one after another (in series). Series module count affects string voltage. Parallel strings increase current. The SAM system-design documentation shows these links and subarray assignment. Take the limits from the equipment instructions, and have the electrical design approved.
The electrical reviewer should check at least:
- The string’s open-circuit voltage in cold conditions, against the absolute DC voltage limits that apply.
- Operating string voltage across the expected cell-temperature range. Compare it with the relevant MPPT window and the startup needs.
- Operating and short-circuit current limits at the input and tracker boundaries that apply, including parallel strings.
- Connector, cable, protection, and routing requirements for the chosen equipment and area.
- Any maker limits on mixed roof orientations or module-level devices.
Use the right temperature coefficients and design conditions. Cell temperature and air temperature are different inputs. If a check shows a warning, do not fix it by adding or removing a module on reflex. Revise the setup and repeat the affected checks.
Acceptance check: every drawn module has an electrical place. Unresolved equipment or design checks are listed in plain view.
Step 7: Separate capacity, energy and customer value
Nameplate capacity is not annual production. Capacity is power, in kilowatts (kW). Energy is in kilowatt-hours (kWh). Take a hypothetical layout with 21 modules rated at 420 W:
DC nameplate capacity = 21 × 420 ÷ 1,000 = 8.82 kW DC.
If the hypothetical inverter’s rated AC output is 7.6 kW, the DC-to-AC nameplate ratio is 8.82 ÷ 7.6 ≈ 1.16. This arithmetic does not show that the equipment pair is allowed or ideal. Review voltage, current, maker limits, and the energy effects one at a time.
Use an energy model to estimate production with the chosen weather and loss assumptions. Report the output boundary and period. Keep the model version and inputs. Do not turn the capacity calculation into an invented annual kWh figure.
Customer value needs another layer. This covers when the customer uses power and the export conditions. It also covers the tariffs that apply and the project costs. Annual production divided by annual use does not show how much solar energy is used on site. Keep those assumptions apart from the layout decision.
Acceptance check: the proposal keeps kW capacity, kWh energy, and money assumptions apart. It makes no unsupported performance guarantee.
Step 8: Issue a coordinated handoff package
Use one controlled design revision across the roof plan and string schedule. Use the same one for the equipment list, energy report, and customer proposal. A change in module count should trigger a review of the documents it affects.
| Handoff item | Review question |
|---|---|
| Dimensioned roof plan | Does it match the verified site geometry and access requirements? |
| Mounting information | Are the module, support arrangement and attachment design consistent? |
| Electrical schedule | Do module counts, input assignments and routing match the drawing? |
| Energy report | Does the model represent the released layout and equipment? |
| Equipment list | Are quantities and exact model identifiers consistent? |
| Approval record | Which checks are complete, conditional or awaiting sign-off? |
Keep a sales draft apart from a design approved for installation. Label conditional assumptions so installers do not mistake an open design for a released plan. Changes found on site need a documented review path. This matters most where they affect access, attachments, or electrical setup.
When you evaluate solar design software, test this handoff on a real project. Compare its drawing, string schedule, equipment list, and report. Then test how a revision flows through them. Ask which outputs need an outside engineering or permit review. To test it on a real roof, book a SurgePV demo.
Frequently Asked Questions
How do you design a solar panel layout?
Check the site geometry. Set project-specific exclusion zones. Compare layout options. Model shading. Match strings to inverter inputs. Then issue coordinated documents. Each stage needs an acceptance check and an owner for open design requirements.
What is the best orientation for solar panels?
Compare roof-plane azimuth and tilt separately from portrait or landscape placement. The best layout depends on geometry, shade, approved mounting, electrical setup, and the customer’s energy use. There is no universal portrait-versus-landscape winner.
How far should solar panels be from the roof edge?
Use the rules for the project address, the adopted code edition, and local changes. Also respect structural and mounting limits. For one- and two-family dwellings, the 2021 IRC and IFC set a rule for arrays up to 33% of the plan-view roof area. They call for an 18-inch clear setback on both sides of a horizontal ridge. Above that, they call for 36 inches. Your jurisdiction may amend these numbers, so check the adopted edition with the local authority.
What software do solar installers use for layout design?
Installers evaluate design tools for site modelling and module placement. They also look at shading, electrical setup, and document handoff. Check the exact product workflow on a real project and check its outputs. You still check the site and get engineering and permit approval.
How many solar panels can fit on my roof?
Start from the usable space left after access and exclusion zones. Then place whole modules using the chosen sizes, gaps, and hardware allowances. Area divided by module area is a rough estimate only. Electrical and mounting limits can change the count. SurgePV’s free layout estimator gives a first-pass count.
Is portrait or landscape better for solar panels?
Neither wins every time. Take a worked example with a 1,134 by 1,722 mm module and 20 mm gaps. A 9,000 by 3,000 mm roof area fits 10 modules in landscape and 7 in portrait. A 6,000 by 3,500 mm area fits 10 in portrait and 9 in landscape. Count both on each roof plane.
Sources
Primary research and reference material used for this desk-research article.
Where this fits
This article is part of SurgePV's Solar Design hub, which works through the topic from first principles to the decisions a project team actually has to make.


