https://magnifina.com/articles/rooftop-solar-yield/ explains it better than me attempting to write a wall of text.