The second law asks you to track both the system and the surroundings. Gibbs free energy packs both into one quantity that belongs to the system alone, so you can decide from $\Delta H$, $\Delta S$ and $T$ directly.
🔑 Key idea
$\Delta G = \Delta H - T\Delta S$ (at constant temperature and pressure). $\Delta G < 0$: thermodynamically favored. $\Delta G > 0$: not favored (the reverse is). $\Delta G = 0$: at equilibrium. Standard values add like enthalpies: $$\Delta G^\circ = \sum n\Delta G^\circ_f(\text{products}) - \sum n\Delta G^\circ_f(\text{reactants})$$
💡 Why it works
Start from $\Delta S_\text{univ} = \Delta S - \dfrac{\Delta H}{T}$. Multiply by $-T$: $-T\Delta S_\text{univ} = \Delta H - T\Delta S$. Call this $\Delta G$. Since $T$ is positive, $\Delta S_\text{univ} > 0$ exactly when $\Delta G < 0$. $\Delta G$ also means something physical: it is the most useful (non-expansion) work the process can deliver, as electrical work in a battery or chemical work in a cell.
$\Delta G^\circ$ for making ammonia against temperature (treating $\Delta H^\circ$ and $\Delta S^\circ$ as constant). It is negative at room temperature and crosses zero near 463 K.
Worked examples
✏️ Worked example: From ΔH and ΔS
For $\mathrm{N_2 + 3H_2 \to 2NH_3}$, $\Delta H^\circ = -91.8\ \text{kJ}$ and $\Delta S^\circ = -198.1\ \text{J/K}$. Find $\Delta G^\circ$ at $298\ \text{K}$.
Change $\Delta S^\circ$ to kJ/K: $-0.1981\ \text{kJ/K}$.
Positive: at 1000 K the entropy term wins and ammonia tends to decompose. (This assumes $\Delta H^\circ$ and $\Delta S^\circ$ stay about the same when heated, which is a fair first estimate.)
Combining $\Delta H$ in kJ with $\Delta S$ in J/K without converting. $\Delta S$ values are about a thousand times smaller in kJ, so skipping the conversion makes $T\Delta S$ a thousand times too large. Check: write the units on every term; $T\Delta S$ must come out in kJ.
The superscript ° means standard conditions: 1 bar for gases and 1 M for solutes. In a real mixture the free energy change is $\Delta G$, which can differ from $\Delta G^\circ$; the lesson on free energy and equilibrium shows how.
Unlike $S^\circ$, $\Delta G^\circ_f$ of an element in its standard state is zero, just as for $\Delta H^\circ_f$.
Practice
Pass with 3 right answers, the last 2 in a row. Each right answer earns 2 XP.