All physical and chemical systems in the universe follow the second law of thermodynamics and proceed in a downhill, i.e., exergonic, direction.  Thus, left to itself, any physical or chemical system will proceed, according to the second law of thermodynamics, in a direction that tends to lower the free energy of the system, and thus to expend energy in the form of work. These reactions occur spontaneously.
A chemical reaction is endergonic when non spontaneous. Thus in this type of reaction the Gibbs free energy increases. The entropy is included in any change of the Gibbs free energy. This differs from an endothermic reaction where the entropy is not included. The Gibbs free energy is calculated with the Gibbs–Helmholtz equation:
where:
:  = temperature in kelvins (K)
:  = change in the Gibbs free energy
:  = change in entropy (at 298 K) as 
:  = change in enthalpy (at 298 K) as 
A chemical reaction progresses non spontaneously when the Gibbs free energy increases, in that case the  is positive. In exergonic reactions the  is negative and in endergonic reactions the  is positive:
: exergonic
: endergonic
where  equals the change in the Gibbs free energy after completion of a chemical reaction.