Sensitivity analysis and design optimization of solid oxide fuel cells are presented. Multispecies diffusion, low speed convection, and chemical kinetics are included in a two-dimensional numerical model, and sensitivity derivatives are computed using both discrete adjoint method and direct differentiation. The implementation of the discrete adjoint method is validated by comparing sensitivity derivatives obtained using the adjoint with results obtained using direct differentiation and finite-difference methods. For optimization, cost functions describing hydrogen concentration along the anode-electrolyte interface, hydrogen concentration at the channel outlet, and standard deviation of temperature inside the anode are considered. Material properties of the anode, operating conditions, and a shape parameter are selected as design variables. The development of an initial design environment to automate the flowfield solution, sensitivity computation, optimization, and mesh movement is also described. Finally, an adjoint-based error correction method is implemented and demonstrated to provide accurate estimations for a desired objective function on a fine mesh by combining information obtained from analysis and adjoint solutions on a coarser one.