Pressure dependency in Haber Bosch ammonia synthesis Haber-Bosch ammonia synthesis reaction:
 $$\ce{3H2 +N2 -&gt; 2NH3}$$

According to the ideal gas law: $pV=nRT$ where constant volume implies $\displaystyle \frac nV=\frac p{RT}$

Then $\displaystyle K_\mathrm c=\frac{[\ce{NH3}]^{2}}{[\ce{H2}]^3\cdot [\ce{N2}]}$

When I substitute $\displaystyle \frac nV=c=\frac {p_{\text{gas}}}{RT}$ I get:

$$ K_\mathrm c=\frac{\left(\frac{p(NH_3)}{RT}\right)^2}{\left(\frac{p(H_2)}{RT}\right)^3\left(\frac{p(N_2)}{RT}\right)}=\frac{R^2T^2}{p^2}$$

But according to Le Chatelier's principle, increased pressure should result in an increased $K_\mathrm c$, but my $\displaystyle K_\mathrm c\approx \frac 1{p^2}$.

Where is the error? Is is impossible to combine the partial pressures like that because they scale differently with total pressure? Can one derive from the gas law the pressure dependency of this reaction?



Edit after solved:

First mistake was that the formula had $K_c$ (constant) instead of Q,
$$ Q=\frac{\left(\frac{p(NH_3)}{RT}\right)^2}{\left(\frac{p(H_2)}{RT}\right)^3\left(\frac{p(N_2)}{RT}\right)}=\frac{R^2T^2}{p^2}$$
where Q is the current value/ratio of concentrations, so the reaction tries to get Q back to $K_c$ so for greater pressure p, Q is smaller so the reaction goes in the direction of NH3...
According to Le Chatelier's principle, a pressure increase should result in the equilibrium shifting to the right, but it should not - at least to first approximation - affect the equilibrium constant.

$$K = \frac{\ce{[NH3]}^2}{\ce{[H2]}^3 \ce{[N2]}}$$

Using partial pressures, this can be rewritten as

$$K = \left(\frac{RT}{P}\right)^2 \frac{y_{\ce{NH3}}^2}{y_{\ce{H2}}^3 y_{\ce{N2}}}$$

Then for $K$ to be constant, an increase in the denominator, given by the pressure for example, has to be followed by an increase in the numerator, which means the reaction working in the direction of formation of ammonia.