Optimization of the system configuration of a photovoltaic system in combination with a Lithium-Ion-battery was investigated in dairying on a dairy farm in the Pitztal in Tyrol/Austria. The investigation focused on profitability on the basis of the cost advantages of self-generated power consumption compared to the cost of power consumption from the national grid. On the one hand, the database was formed from the solar yield estimate and on the other hand, from the company-specific current load profile. The basis for the estimation of the solar yield was the test reference years (TRY) of the German weather service. The current load profile in this particular case study is based on consumption measurements. On the basis of this established data of the yield estimate and the current load profile, a time series of over 365 days in 5-mintue dispersals was drawn up. Based on this time series, the optimization calculation for short-, medium- and long-term scenarios took place in Microsoft Excel. A comparison of the established yield of a photovoltaic system based on the TRY-data with the comparative figures shows that a light underestimation in the yield of 3-5% occurs. Within the current load profile, the influence of dairying gets apparent on the consumption volume on the one hand and on the time of consumption on the other hand. Therefore, based on the results, the photovoltaic self-generation within dairying is to be assessed positively. In the short-term, the optimal system configuration remains at a size of the photovoltaic system of 12 kWp with no storage. In the medium-term the system composition changes on a limited scale, in the means of a rise in the size to 16 kWp. An estimated rise of the price on the national grid and a lowering of the investment costs, especially for the storage, leads to an optimal photovoltaic output of 39 kWp and a storage capacity of 49 kWh in the long-term.