Certainly isn’t today. In the U.K. solar panels have about a 14 month payback, no incentives other Thant hey are currently tax free (like food. Electric from the grid has a 5% tax)
On top of that there’s an inverter, and if you can’t use all the power immediately you’d need a battery too, which tends to increase the cost.
The biggest cost though is installation.