Your first equation is correct. You may refer to the following relevant sources to the LCOE calculations, and its estimation for wind, and solar-PV energy sources. Good luck
Deleted research itemThe research item mentioned here has been deleted
Conference Paper Analysis of Levelized Cost of Energy (LCOE) and grid parity ...
Article Improved framework for techno-economical optimization of win...
Article Photovoltaics energy: Improved modeling and analysis of the ...