In the pages on enthalpy and entropy, we saw that whether a chemical process is endothermic or exothermic, or leads to a local* increase or decrease in entropy, does not determine whether that process is spontaneous. That is, whether the process will occur all on its own (except perhaps for a little "push" at the beginning, such as igniting a combustion reaction.
It's not that enthalpy and entropy are of no value in predicting spontaneity; they are necessary.
*
But what we have to do is come up with another state function that combines the two in order to predict whether a process is spontaneous.
There are several such functions, each serving a role in a particular set of conditions (pressure, temperature, &c.). The most useful of these is the Gibbs energy, or the "Gibbs free energy," or sometimes just the "free energy."
Mr. Gibbs is Josiah Willard Gibbs, and American scientist who made numerous important contributions to chemistry and physics, particularly in thermodynamics.
The Gibbs energy (G) is defined like this:
$$G = H  TS$$
where H is the enthalpy, T is the temperature in Kelvins (K), and S is the entropy. We're almost always more interested in the change in Gibbs energy, ΔG,
ΔG is defined under two very specific conditions.
I'll cut to the chase here and explain more later: When ΔG < 0 for a process, that process is spontaneous. When ΔG > 0 it's not.
Now we can define some conditions for spontaneity using the Gibbs energy. Recall that when ΔH < 0, the reaction is exothermic and when ΔH > 0 the reaction is endothermic. Those were agreedupon a long time ago, so we have to use them.
When ΔS > 0, the entropy of the system increases and when ΔS < 0, the entropy decreases. If we apply those conditions to the Gibbs energy we get four possibilities:
When this is true, the sign of ΔG can't be determined because the size of the product entropy change and temperature could swamp the negative enthalpy. In this case we just need to know ΔH and T·ΔS in order to determine spontaneity.
In this case, ΔG is always negative, and the process is spontaneous at any temperature.
In this case, ΔG is always positive, and the process won't be spontaneous at any temperature. These are reactions that just won't go.
This is like case 1. The size of ΔS and the temperature will determine whether the process is spontaneous.
That's a lot of information to absorb. Let's summarize it.
The Gibbs energy or Gibbs free energy (G) is a state function that depends on the state functions enthalpy (H) and entropy.
The change in Gibbs energy is
The Gibbs energy is defined for processes that occur at constant pressure and constant temperature.
ΔH  ΔS  ΔG  Spontaneity 

?  Depends on the T and relative sizes of ΔH, ΔS  
positive  < 0  Spontaneous at any temperature  
positive  > 0  Not spontaneous at any temperature  
positive  positive  ?  Depends on the T and relative sizes of ΔH, ΔS 
Here is one more visual way to decide spontaneity, if it can be done quickly. There is some wiggle room for deciding in the indeterminate cases.
For example, when ΔH < 0 and ΔS < 0, there is a good chance that the free energy change will be negative at low temperatures, where the ΔS term in the Gibbs energy doesn't mean as much.
Likewise, when ΔH > 0 and ΔS > 0 (lower right square), there is some chance that the Gibbs energy change will be negative at high temperature, where a negative TΔS term could swamp a smaller ΔH term.
In the sections on enthalpy and entropy, we've already learned how to apply the techniques of thermochemistry to chemical reactions. Recall that the enthalpy of a reaction is
$$\Delta H = \sum H_{f \; products}^o  \sum H_{f \; reactants}^o$$
where H_{f}^{o} is the standard enthalpy of formation, and long lists of those have been measured, refined and tabulated. Wikipedia is a great place to look them up. The Greek letter (capital) sigma, Σ, means sum.
Likewise, the overall entropy change of a process can be calculated using tabulated standard entropies.
$$\Delta S = \sum S_{f \; products}^o  \sum S_{f \; reactants}^o$$
Remember that the unit of enthalpy is the Joule per mole (J·mol^{1}) and the unit of entropy is J·mol^{1}·K^{1}.
The thermochemistry of the Gibbs energy is very similar. Standard Gibbs energies of compounds have been measured, refined and tabulated, and you can look them up and use them to determine the spontaneity and other properties of chemical reactions and processes.
$$\Delta G = \sum G_{f \; products}^o  \sum G_{f \; reactants}^o$$
Calculate the Gibbs energy change for the reaction $4 \, KClO_{3 \, (s)} \; \longrightarrow \; 3 \, KClO_{3 \, (s)} + KCl_{(s)} \; \text{ at T = 298 K}$.
First the ΔH:
The sum of the enthalpies (don't forget to multiply by the number of moles) of the products minus the the enthalpy of our single reactant is
$$ \begin{align} \Delta H &= [3(433)  437]  [4(398)] \\ &= 144 \; KJ \end{align}$$
Now the ΔS:
The entropy change is
$$ \begin{align} \Delta S &= [3(151) + 82.6]  4(143) \\ &= 36 \; J/K \end{align}$$
Now ΔG = ΔH  TΔS, and our temperature is 298K, which gives this free energy change:
$$ \begin{align} \Delta G &= \Delta H  T \Delta S \\ &= 144 \; KJ  298 \, K \left( \frac{0.036 \, KJ}{K} \right) \\ &= 133 \; KJ \end{align}$$
Notice that between the last two steps we realized that 36 J = 0.036 KJ.
The ΔG is negative, so this is a spontaneous reaction at 298K. Notice that at some higher temperatures this reaction is not spontaneous. The point at which ΔG = 0 is
$$ \begin{align} 0 &= 144  0.036 T \\ T &= 4000 \; K \end{align}$$
So above T = 4000K, the reaction is not spontaneous, and in fact, the reverse reaction is spontaneous.
It's not necessary to use enthalpies and entropies to calculate ΔG like this because standard Gibbs energies of formation have been measured, refined and tabulated, so ΔG can be calculated directly, as the next examples will show.
Calculate the Gibbs energy change for the combustion of octane, $C_8H_{18 \, (g)} + 25 \, O_{2 \, (g)} \, \longrightarrow \, 16 \, CO_{2 \, (g)} + 18 \, H_2O_{(g)}$.
Don't forget to multiply these molar values by the number of moles in the balanced equation. The resulting ΔG is
$$ \begin{align} \Delta G &= 18(229) + 16(394)  2(16.4) \\ &= 10,459 \; KJ \\ &= 10.5 \; MJ \end{align}$$
This is quite a large ΔG. We'll learn later that ΔG is related to the equilibrium constant. Such a large negative ΔG means that the equation as written is not only spontaneous, but that the equilibrium lies largely to the right, as we'd expect for a combustion reaction.
Calculate the temperature at which the reaction $Cu_2O_{\,(s)} + C_{\,(s)} \, \longrightarrow \, 2 \, Cu_{\,(s)} + CO_{\, (g)}$ becomes spontaneous.
$$\Delta G = 58  0.165 \, T$$
This is a linear equation that's easy to solve. We want to find out where ΔG is negative, so we'll set ΔG equal to zero and solve for the temperature at the transition from positive to negative:
$$ \begin{align} 0 &= 58  0.165 \, T \\ T &= 352 \, K \\ &= 78.3˚C \end{align}$$
To get a feel for what's going on here, we can plot the linear equation highlighted in green:
Notice that the slope of the graph is just ΔS. It's easy to see that for temperatures above 352K, ΔG is negative and the reaction will occur spontaneously.
1. 
Calculate the ΔH, ΔS, and ΔG of the reaction N_{2} + O_{2} → 2 NO when (a) T = 25˚C (b) T = 1000˚C (c) T = 3000˚C 

2. 
Consider the reaction 2 SO_{2 (g)} + O_{2 (g)} → 2 SO_{3 (g)}. At 298K, ΔG^{o} = 141.6 KJ, ΔH^{o} = 198 KJ and ΔS^{o} = 188 J/K. (a) Is the reaction spontaneous at 25˚C. (b) Use the data to predict how ΔG^{o} will change with increasing T, and (c) Calculate the temperature at which the reaction changes from nonspontaneous to spontaneous. 

3. 
The synthesis of chloroform from methane and chlorine gas goes according to the equation CH_{4 (g)} + 3Cl_{2 (g)} → CHCl_{3 (l)} + 3HCl _{(g)}. (a) Calculate the Gibbs energy, ΔG^{o}_{rxn} of the reaction. (b) Assuming that ΔH^{o} and ΔS^{o} remain constant, will the reaction be spontaneous at 500K? 
A state function is one that depends only on the initial and final conditions of the system, and not at all on how it got from one condition to the other.
Examples of state functions in thermodynamics are enthalpy, entropy, and the Gibbs energy.
xaktly.com by Dr. Jeff Cruzan is licensed under a Creative Commons AttributionNonCommercialShareAlike 3.0 Unported License. © 20122019, Jeff Cruzan. All text and images on this website not specifically attributed to another source were created by me and I reserve all rights as to their use. Any opinions expressed on this website are entirely mine, and do not necessarily reflect the views of any of my employers. Please feel free to send any questions or comments to jeff.cruzan@verizon.net.