A chemical reaction is in equilibrium when the rate of forward reaction equals the rate of backward reaction.
i.e. ΔG = 0
ΔA + bB ⇌ cC + dD
According to the law of mass action
R1 = K1 [A]a [B]b
R2 = K2 [C]c [D]d
At equilibrium, R1 = R2
K1 [A]a [B]b = K2 [C]c [D]d
K1 = [C]c [D]d
— ———-
K2 = [A]a [B]b = Kc
[C]c [D]d
∴ Kc = ———
[A]a [B]b
Where Kc = equilibrium constant.