A rule of thumb is that embodied energy in a finished manufactured product sells for about $1/kWh. By that rule of thumb, the embodied energy in a solar panel is about 0.5% of the energy it will produce over its lifetime.
> A "raw" solar panel in China costs about 25 cents / W, and each watt should produce about 45kWh over its lifetime (5W per day for 25 years).
I imagine that you're making assumptions on having sufficient luminosity all year round, right? So perhaps that depends on where on Earth you are.
According to Jancovici [1], in most of Europe, solar panels produce about 100 kWh/m²/year, assuming that they are oriented correctly (I don't know if e.g. the necessity of cleaning them up is factored in). From the same source, in terms of energy used to build the panel (is shipping included?), it takes 1 to 4 years to reimburse that energy but that's under the assumption that all the energy from the panel can be used. In practice, solar panel installations produce energy at a rhythm that depends on nature, which means that for many uses, the electricity needs to be stored somewhere if we want to actually use it at a different rhythm, e.g. when you're actually at home/in the office/etc.
Unfortunately, storing electricity at scale with current-tech is energy-expensive (both to build the batteries and because of energy loss during storage), e.g. storing it as hydrogen has a yield of ~30%, couldn't find the yield of other technologies of batteries including the energy cost of building/shipping/disposing of the battery. So, in the worst case, these 100 kWh/m2/year turn into ~30 kWh/m2/year, which means 3 to 12 years for recouping energy cost.
So, by this calculation, the worst hypothesis maps to the number I was quoting above and the best one is at least one order of magnitude better. My bad.
Now, there is the problem that current-tech battery often relies on metals (i.e. Lithium) that are only available in limited amounts.
[1] https://jancovici.com/transition-energetique/renouvelables/p...
You're also assuming that you have to store 100% of the energy to get to a green grid. But in a grid with a good mix of different renewable sources, grid ties large enough to cover areas with different weather, substantial amount of nuclear, hydro and a large number of EVs that can charge while energy is cheap means that very little energy needs to be stored. So you also have to multiply your storage numbers by about 5%.
If my memory of reading one of his books serves, fracking now costs 50% of the energy it produces (in addition to non-energy environmental impact, which is pretty large), up from ~10% for the easy oil we had ~50 years ago. Current-tech solar panels are in the same order of magnitude (again, not counting non-energy environmental impact). Nuclear energy has the highest yield. I seem to remember that coal is the worst, unless it's burnt at the point of extraction.