You probably always include a storage system. That makes every installation unprofitable.
The calculation is quite simple: You look on a website (I’m not allowed to name it here, the mods are strict) to see how much yield you get per year at your location from your roof pitch + roof orientation. Calculated per kWp, that might be 1000 kWh/year. You multiply this by the expected feed-in tariff of maybe 7 cents, times 20 years. In the example case, that’s 1400,-€.
This is the price that a purchased and installed kWp without tax must not exceed. This ensures that the system pays for itself 100%.
Beyond that, you make an additional (currently) 20 cents profit per self-consumed kWh. Depending on electricity consumption, that’s a few hundred euros extra per year.
And after 20 years, the system still runs and reduces your electricity bill. By then probably with storage for a large part.
So currently, EVERY photovoltaic system is a profitable business if you leave out the storage and can build at least 8 kWp.
Important: the bigger, the cheaper the kWp becomes. And everything under 100 kWp is NOT too big.