The energy, exergy, and economic aspects are analyzed of a cycle consisting of a polymer fuel cell, a burner, a reformer, and a heat exchanger. Water is used for cooling the fuel cell, and the heated water is used for domestic consumption. The exergy and energy efficiencies of the cycle are calculated, and the effects of various cycle parameters on the exergy and energy efficiencies are investigated. To maximize the exergy efficiency while minimizing the cost of electricity generation by the fuel cell, the particle swarm optimization (PSO) algorithm is utilized. The results show that increasing the cooling water flow rate has the greatest effect on increasing the energy efficiency of the cycle, while increasing the burner temperature has the greatest effect on increasing the exergy efficiency of the cycle. Moreover, it is shown via multi-objective optimization of the proposed cycle that the exergy efficiency of the cycle increases by 31% and the cost of electricity generation decreases by 18% by applying optimized parameters.