The increasing pace of installations in solar photovoltaic (PV) systems is getting more and more a challenge for the distribution system operator (DSO). At the same time, an increasing share of renewables is desired in politics and society. PV systems are getting cheaper, therefore the installation of a PV system is getting economic feasible in more and more business cases. In Austria, the last change in the law for the electric system and the organization of the electric system (Elektrizitätswirtschaftsund -organisationgesetz) made it possible to share the power output of a solar system amongst local users in a multi-party building. This law is expected to increase the share of local use of solar PV significantly and brings clean energy to more people in Austria. On the other hand, the DSO makes most of its revenue from electricity consumption on an energy basis. The local use of solar energy reduces the annual consumption from the grid and therefore reduces the revenue of the DSO while the costs are basically the same. A model was designed in this master thesis to observe the economic situation of the DSO and the solar power user simultaneously. The costs of the PV system were annualized the benefits from it where modelled from the reduction of grid electricity and the feed-in of excess power. In a first step, the optimal nominal power of the PV system is calculated given the annual energy consumption. In a second step, the revenue loss for the DSO is calculated. The DSO has a natural monopoly, therefore his actions are under strict regulations. If the revenue is not sufficient to handle all costs to serve the wanted grid stability, the grid fees will be increased. The increased grid fees have an influence on the profitability of the PV owner and therefore a potential PV owner will have a different optimal PV nominal power output. As the PV owner has no influence about the grid fees, the model contains a Stackelberg optimization with the DSO as Stackelberg leader and the PV owner as Stackelberg follower. If the grid fees would consist out of 100 % power costs, meaning that there are now savings of the grid fees during the consumption of PV power, there would be no profitability for the PV owner. The biggest impact for profitability are in the size of the PV system, the costs of electricity, the costs for the PV system, the annual and hourly energy consumption, subsidies and the desired interest rate of the investor. Changes in the grid fees should not only consider the situation of the PV owner but should also consider social and energy efficiency aspects as well as the topology of the DSO.