The United Nations Sustainable Development Goal 7 (UNSDG 7) “Affordable and Clean Energy” strives to increase renewable energy share in energy consumption. Building-integrated photovoltaics generate renewable energy and offset fossil fuels carbon emissions. As roof space availability varies among different buildings, the potential to utilize rooftops as photovoltaic systems is uncertain. This study's aim is justified by the need to develop a systematic modeling framework to examine photovoltaic rooftops with varying roof availability and to propose peak shaving strategies for reducing peak load and carbon emissions. The framework incorporates computational simulations to model the building power demand and evaluate different peak shaving strategies. By identifying building peak loads, peak shaving offsets part of the loads with photovoltaic electricity. This framework can be applied globally given suitable data, and is demonstrated on a 10-story reference office building with photovoltaic installations occupying 10%, 30%, and 50% of the roof area. In this demonstration, 9 peak shaving strategy options are considered for covering a varying number of peaks that last for different durations on weekdays. Peak load reduction and carbon emission saving in each option are assessed, optimal peak shaving options are identified according to seasonal changes and available area for photovoltaics. For example, when 50% of the roof's area is available, a full-office-hour strategy is proposed in summer, saving approximately 595 kg CO2 per weekday. In winter, solar generation is reduced. A proposed strategy covering full-office-hour except lunch hours yielded an estimated 271 kg CO2 saving per weekday. Based on these findings, policies are recommended to encourage utilization of existing rooftops, construct photovoltaic-ready roofs on new buildings, and guide urban planning to avoid excessive shading.