FixHomeCost

Free tool · Panels that fit, output, cost & roof check

Solar Roof Calculator

This solar roof calculator shows how many solar panels fit on your roof, face by face, after fire-code setbacks. It estimates what each face will produce in your state, how much of your electric use that covers, what the system costs, how solar shingles compare, and whether your roof should be replaced before the panels go on.

By Chowdhury, FixHomeCost editor · Last reviewed October 2026

1. Your location and panels

2. Your roof faces

Enter each roof plane that could hold panels. Measure along the roof surface, or take the size from a satellite roof report. A plan view needs the pitch multiplier first.

3. Your use, cost and roof

Advanced options panel size, setbacks, inverter, rebates

Leave a box empty to use the built-in value. Defaults match a typical 430 W panel and a string inverter.

Solar panels on your roof
–
Yearly production
–
Share of your use
–
Estimated cost
–
First-year bill savings
–
Panel area
–
25-year production
–
Dark blue: panels. Dashed: space that fits more panels. Orange: fire-code ridge setback and access path. Ridge is the thick top line.
Panels and production by roof face
FaceDirection, pitchPanelsSun vs idealkWh/panelkWh/yr
Show the full calculation step by step with your numbers

    Assumes full net metering at today's rate, a 0.90 inverter and temperature factor, and simplified setbacks. Permits, roof work and electrical panel upgrades are not included.

    Planning estimate only. Setbacks are simplified, and your fire marshal or building department has the final say. Savings assume full net metering at today's rate. For payback, loans and 25-year savings, use the solar energy calculator. Nothing you enter is sent to us.

    How many solar panels can fit on my roof?

    Fewer than most people guess. A roof face is never fully usable. Fire codes keep a strip clear below the ridge and an access path up the roof. Installers keep panels back from the edges, where wind loads are highest. Then the panels must fit as whole rectangles, so leftover strips go to waste.

    This solar panel roof calculator handles each roof face separately:

    1. It takes the clear setback zones off the face (ridge, access path, eave and rake edges).
    2. It tries the panels in portrait and in landscape and keeps whichever fits more, with a 1-inch gap between modules.
    3. It scores each face for the direction it faces, its tilt and its shade, then estimates yearly output.

    A typical 2026 residential panel is rated 400 to 440 watts and measures about 67.8 × 44.6 inches (1,722 × 1,134 mm), or about 21 sq ft. As a rule of thumb, a clean, unshaded south face 40 feet wide and 16 feet from eave to ridge holds about 18 of them. That's 7.7 kW.

    How to measure your roof faces

    Skip faces that are cut up by dormers, skylights, vents or chimneys unless you measure the clear rectangles around them.

    Fire-code setbacks for rooftop solar (approximate)

    Most US jurisdictions use section R324.6 of the International Residential Code, or a local version of it, for roof access around solar arrays. The 2018 and later editions call for:

    The calculator keeps this simple. It holds back one 36-inch path along one side of every face you use, plus 18 inches below the ridge. If panels would cover more than a third of the roof you entered, it switches to 36 inches. It does not model the 18-inch clearance on each side of hips and valleys. Many states and cities change these rules. Ask your installer what your fire marshal enforces.

    Formulas and a worked example

    Usable width = face width − edge clearance − 3 ft path
    Usable depth = slope length − ridge setback − edge clearance
    Panels = max(portrait fit, landscape fit)
    kWh per panel per year = watts ÷ 1,000 × sun hours × 365 × direction factor × shade factor × (1 − losses) × 0.90
    System cost = kW × 1,000 × cost per watt − local incentives

    The 0.90 covers inverter efficiency (PVWatts uses 96%) and the output panels lose when they run hot.

    Worked example (the default inputs): a south face 40 ft wide and 16 ft from eave to ridge at 6/12, US average sun of 4.98 hours, 430 W panels, 14% losses, 12-inch edges, IRC setbacks.

    1. Usable area: 40 − 1 − 3 = 36 ft wide and 16 − 1.5 − 1 = 13.5 ft deep.
    2. Portrait: 9 panels across (3.80 ft each with the gap) × 2 rows (5.73 ft each) = 18. Landscape: 6 × 3 = 18. So 18 panels, 7.74 kW.
    3. 6/12 is a 26.6° tilt. Facing south, that scores 1.007 against the reference 20° south roof.
    4. Per panel: 0.43 × 4.98 × 365 × 1.007 × 1 × 0.86 × 0.90 = 609 kWh a year. Times 18 = 10,961 kWh.
    5. At 900 kWh a month (10,800 a year), that covers 101% of the home's use.
    6. Cost: 7,740 W × $2.60 = $20,124. Savings at 18.5¢ are about $2,000 a year, a simple payback of about 10 years.

    The north face of the same roof fits 18 panels too, but at 6/12 it would make only about 65% as much, so it is skipped by default.

    How roof direction and pitch change output

    The sun-hour figures in the calculator are for a south-facing roof tilted about 20°. Each face is scored against that. These factors are approximate, based on typical PVWatts results for the middle of the US. Southern states favor flatter tilts and northern states favor steeper ones.

    Output by direction and roof pitch versus a 20 degree south roof
    FacesFlat2/12 (10°)4/12 (18°)6/12 (27°)9/12 (37°)12/12 (45°)
    South89%96%99%101%100%97%
    SE or SW89%94%96%96%94%91%
    East or West89%88%86%84%80%77%
    NE or NW89%83%77%71%64%57%
    North89%81%73%65%55%47%

    East and west faces are often worth using. They lose only 14% to 20% and spread production across the morning and evening. That helps if your utility uses time-of-use rates. Shade costs are set at 5% for light shade, 15% for moderate and 30% for heavy.

    Solar roof cost: panels vs solar shingles

    Rooftop panels averaged about $2.60 per watt installed in mid-2026, or roughly $31,000 for a 12 kW system, according to EnergySage's marketplace data. State averages run from a little over $2.10 to about $3.80 per watt. The calculator shows a range from 15% below to 20% above the cost per watt you enter, because roof type, panel brand and the installer's backlog all move the price.

    Solar shingles cost far more per watt, about $3.50 to $8 installed. They're roofing and solar in one, so the fair comparison is solar shingles versus panels plus the new roof you would need anyway. Shingle systems also make less power per square foot than panels, and fewer installers service them. They make the most sense when you are replacing the roof anyway and care a lot about the look.

    The federal tax credit ended in 2025

    The 30% federal Residential Clean Energy Credit (Section 25D) is gone for systems you own. Under the July 2025 tax law (Public Law 119-21), it does not apply to expenditures made after December 31, 2025, and the IRS treats the expenditure as made when installation is complete. Leases and power purchase agreements are different. The solar company owns that system and may claim a separate business credit under its own deadlines. Ask how that is reflected in your monthly price. Enter any state, city or utility rebates in the incentives box. The DSIRE database lists them by state.

    Should you replace your roof before installing solar?

    Panels last 25 to 30 years. If your roof will not, you will pay to take the panels off and put them back when you reroof. That typically runs $200 to $300 per panel, or $3,600 to $5,400 for 18 panels, before the new roof itself.

    The calculator flags the roof when the middle of its typical life leaves fewer than 10 years (replace first) or fewer than 20 years (inspect first). Price a new roof with the roof replacement cost estimator. Large systems may also need a bigger service panel. See electrical panel upgrade cost.

    Frequently asked questions

    How many solar panels can fit on my roof?

    Divide each roof face's usable area by about 21 sq ft per panel, after taking off an 18- to 36-inch strip below the ridge, a 36-inch access path and about 12 inches at the edges. For example, an unshaded south face 40 ft wide and 16 ft from eave to ridge holds about 18 panels of 430 W. Enter your faces above for a panel-by-panel count.

    How much does a solar roof cost in 2026?

    Rooftop panels average about $2.60 per watt installed, so a 7.7 kW system runs about $20,000 and a 12 kW system about $31,000 before local incentives. Solar shingles cost about $3.50 to $8 per watt. The 30% federal credit for homeowner-owned systems ended for installations completed after 2025.

    How much do solar shingles cost compared with panels?

    Roughly 1.5 to 3 times as much per watt. A 7.7 kW solar shingle roof runs about $27,000 to $62,000, versus about $20,000 for panels. Shingles also replace the roofing they cover, which narrows the gap if you need a new roof anyway.

    Can I put solar panels on a north-facing roof?

    You can, but output drops fast with pitch. A north face at 6/12 makes about 65% of what a south face would, and at 12/12 less than half. On a low slope of 2/12 or less it can still be worth it, especially where electricity is expensive.

    Do I need to replace my roof before getting solar?

    If the roof has fewer than about 10 years left, yes. Removing and reinstalling panels later costs about $200 to $300 per panel, plus the new roof. Many installers will not mount panels on a worn roof at all.

    What are fire setbacks for solar panels?

    Clear zones the fire department needs to walk and ventilate the roof. Under IRC R324.6 that means 36-inch access pathways from eave to ridge and an 18- or 36-inch strip below the ridge, depending on how much of the roof the panels cover and whether the house has sprinklers. Local rules vary.

    Is there still a federal tax credit for solar panels?

    Not for systems you buy. The Residential Clean Energy Credit ended for expenditures made after December 31, 2025, and an expenditure counts as made when installation is complete. Leased systems and PPAs are owned by the solar company, which may still use a separate business credit. Check state and utility programs.

    Sources

    Peak sun hours: state averages from NREL PVWatts (National Solar Radiation Database), 20° south-facing roof, as compiled by TheGreenWatt. Electricity rates: average of March and June 2026 residential prices from EIA Electric Power Monthly, Table 5.6.A. Average home use: EIA (10,791 kWh in 2022). Federal credit: IRS, Residential Clean Energy Credit. Solar cost per watt: EnergySage (June 2026). Solar shingles and panel removal costs: Fixr solar shingles and Fixr panel removal. Panel size: Qcells Q.TRON BLK M-G2+ 430 W datasheet dimensions. Setbacks: IRC R324.6 as adopted by local jurisdictions.

    This is general information, not a professional inspection. See how we research costs.