Since whatever you buy or lease will be up there for years, research the options. Here are the main points:

The energy-generating components of any solar system are solar cells. They consist of semiconductors, usually made of silicon, which absorb sunlight and, using a built-in circuit, create an electrical current (“photovoltaic effect”). That current is passed through an inverter to convert it from direct current (DC) to the alternating current (AC) your home uses. Solar cells still produce power when it’s cloudy, but less than on sunny days.

Solar cells aren’t very efficient. Even the most efficient cells available now convert just 18 to 20 percent of absorbed sunlight into electricity. Although manufacturers continue to invent more efficient solar cells, the pace of the improvements is slow compared to, say, the pace of computer chip development. As you’d expect, the most efficient panels cost more than less efficient ones; on the other hand, you’ll need fewer panels made with efficient cells to generate the same amount of electricity than from less efficient options.

Because each solar cell produces only a few watts of power, to generate meaningful amounts dozens of cells are combined into panels—sometimes called “modules”—that usually contain 60 cells per panel. Panels used in residential projects produce between 340 and 425 watts of power under ideal conditions (basically, lots of sun). Most residential installations use 10 to 20 panels grouped into what’s called an “array” to generate 100 percent of families’ annual electricity consumption. Some installations feature more than one array to make the best use of available rooftop space. The actual number of panels you’ll need will depend on how much electricity you use, your specific roof’s solar potential, and the panels’ efficiency and wattage.

Residential arrays are usually fixed in place, while large commercial arrays move to track the movement of the sun to capture more light. Tracking arrays gather and convert more sunlight to energy, but they cost more and have moving parts that require a lot more maintenance, both of which make them unattractive to homeowners who want economy and simplicity.

While the efficiency of a solar cell drops slightly over time, most panels sold today should efficiently produce power for at least 20 to 25 years—or longer.

Become a Smarter Consumer Get free, expert advice delivered to your inbox every Wednesday when you sign up for the Weekly Checklist newsletter.

An alternative to panels is to replace your entire roof with solar shingles or tiles, which work the same way panels do. Installing them gives you a new roof and a solar energy system at the same time.

Because many homeowners find solar panels ugly contraptions, solar roofs may boast more curb appeal. CertainTeed offers solar shingles and tiles that get installed right on top of sheathing, replacing some of the roof’s conventional shingles. While solar panels look a bit like the International Space Station crashed onto your roof, solar shingles are composed of thin low-profile units that get installed even with the plane of the roof. They will still have a glassy black surface that visually stands out from adjacent lighter-color asphalt shingles that cover the rest of your roof. In other words, they’re far less noticeable than conventional solar panels, but you’ll still notice that there’s a solar array up there.

Tesla and Luma Solar try to make solar power more attractive by covering the entire roof with a uniform-looking surface. These companies produce metal tiles equipped with photovoltaic generators that get installed on areas of a roof that get the most sun; the rest of the surface gets lookalike non-solar metal tiles. Still, metal tiles don’t look like conventional shingles. If you live in a contemporary-style home, these products might fit in—but they may stand out in a more traditional structure.

On the other hand, as more homeowners embrace solar roofs—or panels, for that matter—they will become more common and may not look odd.

Unfortunately, solar tiles remain pricier than conventional solar panels. Replacing your old roof with conventional shingles and then installing solar panels will still be cheaper than reroofing with solar shingles or tiles.

CertainTeed’s website states that its “solar shingles and solar tiles are considerably more expensive [than panels], costing more than $65,000 for the average install of a full roof system” (before factoring in available tax credits and rebates).

Our researchers collected price quotes from Tesla’s “certified” installers for a few sample homes and were quoted about $20 per square foot—or $40,000 for a 2,000-square-foot roof. Tesla also requires that all its new solar roof customers purchase its Powerwall battery system, which adds $10,000 to $18,000 to the tab. (Again, these costs don’t include the effects of tax credits and other local incentives.)

Panel systems are far less expensive: A typical-size solar energy system using panels runs about $10,000 to $18,000 depending on the angle of your roof, electricity consumption, and the company you hire.

Reasonably priced roofing companies charge about $4 to $5 per square foot to install new roofs using high-quality architectural shingles, meaning a typical new roof costs about $10,000 to $12,000.

So, the math: Even if we use a highly conservative estimate (and factor in the 30 percent tax credit), you’ll likely pay at least $35,000 to install a roof with solar shingles or tiles, compared to $10,000 for a conventional one plus costs for a solar panel setup.

Aside from lower costs, other reasons make panels a better buy. Although solar-roof manufacturers claim their products can convert the sun’s rays into electricity as efficiently as panels, they’re still usually less productive. That’s because you can’t reorient or reangle your roof into an optimal position to catch the most rays. Panels, on the other hand, are attached to racks and installed at ideal angles to maximize production.

Another drawback for solar roofs: If you want to add capacity later (say, to generate more juice to charge an EV or to power a new heat pump), it’s pretty easy to slap more solar panels onto your roof. But if you have a solar roof, you’re stuck with the capacity that’s up there.

If you live on a lot of acreage, another option is to install a ground-mounted system in an inconspicuous location.

Most solar energy systems need little maintenance, but string inverters, which cost about $1,100 for an 8kW system, generally last only about 10 to 15 years (many warranties run for at least 10 years). So when accounting for the cost of your system over the long haul, include the extra cost of the likely need to replace the inverter after 10 years or so.

You can avoid having to replace inverters by buying increasingly popular microinverters. They cost more upfront—about $2,300 for an 8kW system—but they have longer lifespans: Leading microinverter brands are warranted for 25 years, which means they usually last about as long as panels. Microinverters are mounted on each panel and convert the DC power to AC there, unlike a centralized inverter, which does the conversion for the entire system at one location. Microinverters also help better manage and protect panels from “hot spot” damage that can be caused over time when a panel or the array is partly shaded during the day.