Solar Panels Depreciation

What is the depreciation life span for solar panels installed on the rooftop? Is it 7 years or 10 years?
If you’re asking this from a legal (tax) standpoint, better check with our accountant. I think each type of equipment has a standard depreciation schedule, and you can elect to go longer, but not shorter than that. Water heating panels are probably in the range you mention. I would guess that photovoltaic panels have a longer schedule, as they last longer.
Bonus Deprceiation for Companies installing solar panels