Solar-energy technology continues to advance in ways that can greatly benefit homeowners. Panels sold today cost considerably less than those available just five or six years ago, yet produce more electricity. These efficiency gains mean most families can install fairly small projects to cover all their electricity costs.

But there’s growing uncertainty that the cost of panels and other equipment and installation will remain low. Prices are being pushed higher by pandemic supply-chain kinks, rising labor costs, proposed tariffs on panels from market-dominating Asia, and U.S. Customs blocking import shipments of some panels made in China reportedly using forced Uyghur labor. If the U.S. government adds to its already generous tax incentives for residential solar energy projects, rising demand might also propel prices higher.

Even if the cost of equipment and installation remains low, upfront project costs are still a big obstacle for most families: A typical-size system for the Washington area runs about $15,000. If you stay in your home for several years, a generous federal tax credit, various local government and utility incentives, and lower electricity bills will eventually add up to recoup those upfront costs.

Your payback period depends on where you live. In the District, which has strong incentive programs, most homeowners will break even within just three years—making solar in D.C. a no-brainer. In Maryland, it’ll take about eight years. But in Virginia, where local incentives are small, payback won’t happen for 12 years.

After that, as the system provides free electricity for years, you’ll realize big profits—over 20 years our example homeowners will come out ahead $10,000 to $46,000.

You can finance the high initial cost with a loan from an installer or a home equity line of credit. But that can add thousands of dollars in interest charges to your total cost.

Alternatively, if you live in D.C. or Maryland, you can sign on with a company that supplies equipment via a lease or similar arrangement in exchange for paying it a flat monthly fee—typically $40 to $100 per month—and letting it collect the tax credit. (Solar leasing isn’t yet available in Virginia.) In general, we don’t think these arrangements represent good deals for most homeowners.

Start by making sure your abode and its roof are good fits for solar. Homes with roofs that have unobstructed southern exposures are the best sites. Because solar panels last for 25 years or more, and because your shingles will need equal longevity, ask a good roofer if you should replace shingles where you plan to install panels.

Thoroughly vet solar contractors you consider. Skeptically review any marketing materials—our undercover shoppers found some companies promise overly optimistic scenarios. Carefully read the contract and ask the company to clarify anything you don’t understand.