Minas Gerais is the leading milk-producing state in Brazil, and many dairy activities are supplied with electricity by the cable aerial network of the electrical energy state company. Given that the Brazilian energy matrix relies primarily on hydroelectric power, studies on the potential of other renewable energy sources in the context of dairy farms are innovative. Additionally, frequent disturbances and interruptions have motivated the installation of solar energy systems on dairy farms. However, the scarcity of technical and scientific studies demonstrating the benefits of electricity generated from photovoltaic panels in Minas Gerais has caused dairy farmers to fear potential financial losses. In this study, grid-connected photovoltaic systems in dairy farms were evaluated, considering three fixed tilt angles for the panels (latitude - 10°, latitude, and latitude + 10°) and electrical energy demands of dairy activities associated with two herd sizes (100 and 150 cows). Meteorological databases and mathematical models were used to predict daily global radiation on tilted panels in dairy farms of two Brazilian municipalities of Minas Gerais State (Lavras and Paracatu). Energy consumption related to dairy activities was monitored for 12 months. For both municipalities, the best results were verified with the tilt angle of panels equal to the local latitude - 10°. The municipality with the lowest latitude (Paracatu) showed higher electricity generation potential. In all simulated scenarios, a greater energy surplus was found from late spring to early autumn (Southern Hemisphere), when the higher electricity generation by the photovoltaic panels met the elevated electrical energy demand of the dairy farms. A high energy surplus was also verified during midwinter, where lower energy consumption by the dairy farms compensated for the reduced availability of solar radiation. The proposed methodology can be adapted to other dairy farms, agricultural and urban buildings.