This study aims to investigate the potential of rooftop solar photovoltaic systems for commercial buildings. Helio-Scope software is utilized to perform simulations to determine the ideal rooftop area for photovoltaic panels. The efficiency of photovoltaic systems is impacted by the shading effects of photovoltaic modules installed in parallel rows. To enhance energy output, the optimal distance between rows is determined, and it is found that 5-feet inter-row spacing provides the best results. The simulation results indicate that with 5-feet inter-row spacing, photovoltaic system has an energy generation of 371.6 MWh, specific yield of 1508.0 kWh/kWp, performance ratio of 82.1%, solar access rate of 98.9%, total solar resource fraction of 96.3% and a total irradiance of 1655.9 kWh/m2. The annual nameplate energy is 425.1 MWh, output energy at irradiance levels is 423.1 MWh, optimal DC output is 378.5 MWh, inverter output is 373.5 MWh, and total energy delivered to the national power grid is 371.6 MWh. The average daily DC inverter input power is 158881.5110 W and the average daily AC inverter output power is 152231.6311 W, showing an inverter efficiency of approximately 95.93%. Moreover, detailed testing of the installed PV system is performed on-site to make sure that equipment’s performance guarantees are achieved, the system is properly installed and its configuration is suitable for commercial operations. The maximum daily output energy generation of an installed photovoltaic (PV) system is 1.33 MWh, and its average energy generation is 1.09 MWh. The voltage of all strings is within the rated range of the inverter, with a maximum voltage of 835 V and a minimum of 698 V, as tested by PV string open-circuit voltage. The inverter efficiency test is also performed, with a maximum efficiency of 98.83% and fill factors ranging from 81.37% to 82.34%. The payback period of a photovoltaic system is 4.22 years and LCOE is 0.0229$/kWh. PV system saved 215569.818 metric tons of CO2 in the first year and a total of approximately 5068976.99 metric tons in 25 years.