As a rule of thumb, if your roof is more than 10 years old, consider fixing it before going solar. Installing solar panels on an old roof might mean you have to remove the panels, replace your roof and then reinstall the panels. This will cost around $5,000 for a 19-panel setup.