Until now, photovoltaic modules in the building sector have been mounted on existing buildings in the form of on-roof installations or on open spaces. In the future, building-integrated photovoltaic (BIPV) modules will perform building functions, replace building materials and at the same time be architecturally appealing. Due to the electricity production of the BIPV, this is amortized over time in comparison to conventional building elements, such as a facade or a roof element. Through these positive substitution properties, great hopes are placed in the BIPV in the energy transition in general, and in particular with regard to achieving the European and national energy policy goals. The main task of the diploma thesis is to find out the optimal use of space and the economic efficiency of the investment and operation of a BIPV system. The thesis uses a linear optimization model with the software MATLAB in connection with the toolbox Yalmip and the solver Gurobi to solve the problem. On the basis of the calculation of solar radiation in Vienna, the yield generated can be calculated with an optimal use of space and a capital value maximization. For the different building types (single-family house, apartment building and office tower), selected parameters such as different load profiles/energy consumption, the use of a heat pump, changes in the main roof direction, shading and the two future scenarios of electricity price increases and module price reductions are compared. Some of these factors, such as the heat pump or the combined supply of a consumer located in the vicinity (e.g. hairdresser's shop) have had a positive influence on overall cost savings and the associated system expansion. In the urban area, where more and more high-rise buildings are being built, the largest part of the extension of the façade area with BIPV is taking place. The results of the diploma thesis have shown for the selected building types and scenarios that the economic efficiency of an investment in BIPV is ensured over a period of 25 years even without state subsidies. The only economically unviable exception is a single-family house without heat pump.