 There is a negative sign because a spontaneous reaction has a negative free energy and a positive potential .The Gibbs energy is related to the entropy by , where is the enthalpy and is the temperature of the system.Using these relations, we can now write the change in Gibbs energy,

and the cell potential,

This is the more general form of the Nernst equation.