# Why are Kc and Kp interchangeable in the free energy-equilibrium equation? [duplicate]

In this equation that relates Standard free energy and the equilibrium constant:

$\Delta Gº=-RT \ln K_{eq}$

My textbook (and my teacher) say both $K_p$ (constant related to pressure) and $K_c$ (constant related to concentration) can be used in the place of $K_{eq}$.

When using the equation that relates $K_p$ with $K_c$

$K_p=K_c(RT)^{\Delta n}$

We would get two different $\Delta Gº$ values, which shouldn't be possible.

My question is, why can we use both constants if their values are different?

The activity of a species in a liquid solution can be approximated to: $$a=c/c^0$$ where c is the concentration of the species and $$c^o$$ is the standard concentration ($$1M$$). This approximation leads to $$K_{eq}=K_c$$. The activity of gasses is called fugacity and it can be approximated to: $$f=p/p^0$$ where p is the pressure of the gas and $$p^0$$ is the standard pressure ($$1$$ $$bar$$). This leads to $$K_{eq}=K_p$$. Therefore, if a reaction takes place in e.g. water, one should use $$K_c$$, but if the reaction takes place in the gaseous state, $$K_p$$ should be used when calculating $$dG$$.