The purpose of this study is the multiobjective optimization of the combination of photovoltaic (PV) panels, batteries (BAT), and a solid oxide fuel cell (SOFC) according to different fuels for solid oxide fuel cell. The most desirable hybrid system is the one that has the least cost, the least emission, and the most reliability. But, these objectives are in conflict with each other. In order to obtain the optimum solutions (solutions are different in the number of PV panels, the number of batteries, and the power of SOFC), a multiobjective optimization evolutionary algorithm [Pareto envelope-based selection algorithm (PESA)] is used. This work compares using different fuels as SOFC fuel in the hybrid system. Results have been compared to specify the more favorable fuels for SOFC economically and ecologically. Optimization is done for two categories of fuel price: international fuel prices and Iran fuel prices. Moreover, the sensitivity analysis of fuel price is considered. The effect of change in SOFC power is examined to determine enough auxiliary power for this hybrid system. If the angle of panel can change monthly, PV panel productivity increases and the required SOFC power decreases, therefore the annualized cost and emission are reduced. In the present work, the effect of the monthly change of the panel angle is considered. Results show that the most appropriate fuel for SOFC in the hybrid system is natural gas. It causes low annualized cost (ANC) and low CO2 emission. If the panel angle changes monthly, the solar energy utilization efficiency increases and panels produce more power and the hybrid system provides better economical and ecological conditions.