This research work presents shading of building in hot and dry climate areas using rooftop photovoltaic arrays. Electrical power generation using photovoltaic arrays helps in reducing dependency on the utility grid. Areas with high intensities of solar radiation for a longer duration of time create high daily temperature. The Kingdom of Saudi Arabia (KSA) falls in high temperature and very low humidity climate zone. KSA has increased electricity tariff rates by 260% since 1 January 2018, has planned goals of generation of 9.5 gigawatts of renewable energy by 2030, and has ideas of constructing a self-sustainable city by the Red Sea. Energy analysis performed in this research is to calculate benefits of placing photovoltaic arrays on a rooftop of Buildings. These benefits include the electrical energy production and reduction of building cooling load by shading effect on a rooftop. By placing photovoltaic arrays on rooftop, up to 23% energy saving of cooling load can be achieved. The net annual output of photovoltaic generation per panel is discussed by adding energy generation and saving in cooling load of the building. The distance between the photovoltaic arrays is optimized for maximum benefits of electrical energy and saving in cooling loads. Practical application: Photovoltaic arrays on rooftops for shading effect have practical benefits of energy savings in hot environment areas where high solar irradiance heat up the buildings. Photovoltaic arrays provide shading and energy generations which is a step towards zero energy buildings. © The Chartered Institution of Building Services Engineers 2018.