Add in the cost of mining & refining and recycling the materials too. Then you need to decide which type of solar you'll be using; active or passive. Passive solar is super easy and super cheap. In fact, just painting a slab of concrete floor or block wall in your home near a sunny window black or other dark color will help reduce heating costs in your home at no further cost. In the summer, just lower the window blind/curtain to stop its effects. A solar box cooker, made from reused/recycled materials is passive and very efficient. Or, you can build an active solar power plant like those in >>10147333
where it can eat up land, cost a shit load of money, have terrible power transmission problems, have heat loss problems during nighttime storage, and so on. I think the halfway points are passive solar water heating or photovoltaic cells. As with all things solar, people living nearer the equator can use cheaper systems that give them more energy while people living closer to the poles will have less energy that can be captured and need to use different systems.
With all that in mind, which of those or combination would you want to calculate losses and gains?