Why is water sometimes omitted from the equilibrium constant? To answer this equation, we begin by noting that the equilibrium constants
$$K_c=\frac{[C]^p[D]^q...}{[A]^m[B]^n...}\; \; and\; \; K_p=\frac{p_C^{\; \;\; p}p_D^{\; \; \; q}...}{p_A^{\; \;\; m}p_B^{\; \;\; n}...}\; \; \; \; \; \; \; \; 3$$
are approximations of the thermodynamic definition of the equilibrium constant, which is:
$$K=\frac{a_C^{\; \;\; p}a_D^{\; \; \; q}...}{a_A^{\; \;\; m}a_B^{\; \;\; n}...}\; \; \; \; \; \; \; \; 4$$
where ai is the activity of species i.
For a dilute solution,
$$a_i=\frac{[i]}{[i]^o}\; \; \; \; \; \; \; \; 5$$
where [i]o is the concentration of the pure species at standard conditions of 1 bar and 298.15K.
For an ideal gas,
$$a_i=\frac{p_i}{p_i^{\: o}}\; \; \; \; \; \; \; \; 6$$
where pio is the pressure of the pure species at standard conditions of 1 bar and 298.15K.
Combining eq3 through eq6,
$$K_c=\frac{ \left (\frac{[C]}{[C] ^o} \right )^p\left (\frac{[D]}{[D] ^o} \right )^q...}{\left ( \frac{[A]}{[A]^o} \right )^m\left ( \frac{[B]}{[B]^o} \right )^n...}\; \; and\; \; K_p=\frac{ \left (\frac{P_C}{P_C^{\: o}} \right )^p\left (\frac{P_D}{P_D^{\: o}} \right )^q...}{\left ( \frac{P_A}{P_A^{\: o} }\right )^m\left ( \frac{P_B}{P_B^{\: o}} \right )^n...}\; \; \; \; \; \; \; \; 7$$
Consider the following reversible reaction:
$$CH_3COOH(l)+H_2O(l)\rightleftharpoons CH_3COO^-(aq)+H_3O^+(aq)$$
with
$$K_c=\frac{ \left (\frac{[CH_3COO^-]}{[CH_3COO^-] ^o} \right )\left (\frac{[H_3O^+]}{[H_3O^+] ^o} \right )}{\left ( \frac{[CH_3COOH]}{[CH_3COOH]^o} \right )\left ( \frac{[H_2O]}{[H_2O]^o} \right )}\; \; \; \; \; \; \; \; 8$$
Water, being in excess, is assumed to have a constant concentration throughout the reaction, approximately equal to that of its pure state. Hence \(\frac{\left [ H_2O \right ]}{\left [ H_2O \right ]^o}\approx1\) and eq8 becomes
$$K_c=\frac{ \left (\frac{[CH_3COO^-]}{[CH_3COO^-] ^o} \right )\left (\frac{[H_3O^+]}{[H_3O^+] ^o} \right )}{\left ( \frac{[CH_3COOH]}{[CH_3COOH]^o} \right )}\; \; \; \; \; \; \; \; 9$$
Since the standard state of a solute is defined as 1 mol dm-3, eq9 approximates to
$$K_c=\frac{\left [ CH_3COO^- \right ]\left [ H_3O^+ \right ]}{\left [ CH_3COOH \right ]}\; \; \; \; \; \; \; \; 10$$
Therefore, water is excluded from the equilibrium constant if it acts as a solvent. However, for the reactions
$$CH_3COOH(l)+C_2H_5OH(l )\rightleftharpoons CH_3COOC_2H_5(l)+H_2O(l)$$
$$4HCl(g)+O_2(g)\rightleftharpoons 2H_2O(g)+2Cl_2(g)$$
water is not a solvent but a reactant, and the respective equilibrium constants are
$$K_c=\frac{\left [ CH_3COOC_2H_5 \right ]\left [ H_2O \right ]}{\left [ CH_3COOH \right ]\left [ C_2H_5OH \right ]}$$
$$K_c=\frac{\left [ H_2O \right ]^2\left [Cl_2 \right ]^2}{\left [ HCl \right ]^4\left [O_2 \right ]}$$
In the case of a reversible reaction containing one or more solid species, e.g.,
$$HCl(g)+LiH(s)\rightleftharpoons LICl(s)+H_2(g)$$
the concentrations of the solid compounds are assumed to be the same as that of their respective pure states. Hence,
$$K_c=\frac{\left [ H_2 \right ]}{\left [HCl\right ]}\; \; or\; \; K_p=\frac{p_{H_2}}{p_{HCl}}$$

Question
Write the equilibrium constants for the following reactions:
a) \(CaCO_3(s)\rightleftharpoons CaO(s)+CO_2(g)\)
b) \(CH_3COOC_2H_5(l)+H_2O(l)\rightleftharpoons CH_3COOH(l)+C_2H_5OH(l)\)
c) \(Co(H_2O)_6^{\; 2+}(aq)+4Cl^-(aq)\rightleftharpoons CoCl_4^{\; 2-}(aq)+6H_2O(l)\)
Answer
a) \(K_p=p_{CO_2}\)
b) \(K_c=\frac{\left [ CH_3COOH \right ]\left [ C_2H_5OH \right ]}{\left [ CH_3COOC_2H_5 \right ]\left [ H_2O \right ]}\)
H2O is not a solvent in the hydrolysis reaction but a reactant. A typical ester hydrolysis reaction involves adding, for example, 0.10 M of CH3COOC2H5, 0.10 M of H2O and a catalyst in an inert organic solvent.
c) \(K_c=\frac{\left [ CoCl_4^{\; \; 2-} \right ]}{\left [ Co(H_2O)_6^{\; \; 2+} \right ]\left [ Cl^- \right ]^4}\)
The reaction occurs in an aqueous solution, i.e., the solvent is water.