Gibbs free energy
It is a thermodynamic potential that can be used to calculate the maximum or reversible work that may be performed by a thermodynamic system at a constant temperature and pressure (isothermal, isobaric).
This maximum can be attained only in a completely reversible process.
According to the second law of thermodynamics, for systems reacting at STP (or any other fixed temperature and pressure), there is a general natural tendency to achieve a minimum of the Gibbs free energy.
$\Delta G \lt 0$: favoured reaction (Spontaneous).
The Gibbs free energy is defined as: $$ G(p,T)=U+pV-TS $$ which is the same as: $$ G(p,T)=H-TS $$ where:
U is the internal energy (SI unit: joule) p is pressure (SI unit: pascal) V is volume (SI unit: m3) T is the temperature (SI unit: kelvin) S is the entropy (SI unit: joule per kelvin) H is the enthalpy (SI unit: joule)
Second law of thermodynamics
Wikipedia. The second law of thermodynamics states that the total entropy of an isolated system always increases over time, or remains constant in ideal cases where the system is in a steady state or undergoing a reversible process. The increase in entropy accounts for the irreversibility of natural processes, and the asymmetry between future and past.
Historically, the second law was an empirical finding that was accepted as an axiom of thermodynamic theory. Statistical thermodynamics, classical or quantum, explains the microscopic origin of the law.
The second law has been expressed in many ways. Its first formulation is credited to the French scientist Sadi Carnot in 1824, who showed that there is an upper limit to the efficiency of conversion of heat to work in a heat engine.