At equilibrium, the sum of the chemical potentials of the reactants is equal to the sum of the chemical potentials of the products. The Gibbs free energy change for the reactions, ΔG, is equal to the difference between these sums and therefore, at equilibrium, is equal to zero. Thus, for an equilibrium such as
Substitute in the expressions for the chemical potential of each reactant:
Upon rearrangement this expression becomes
The sum 
 is the standard free energy change for the reaction, . 
Therefore,
where  is the equilibrium constant. Note that activities and equilibrium constants are dimensionless numbers.
This derivation serves two purposes. It shows the relationship between standard free energy change and equilibrium constant. It also shows that an equilibrium constant is defined as a quotient of activities. In practical terms this is inconvenient. When each activity is replaced by the product of a concentration and an activity coefficient, the equilibrium constant is defined as
where [S] denotes the concentration of S, etc. In practice equilibrium constants are determined in a medium such that the quotient of activity coefficient is constant and can be ignored, leading to the usual expression
which applies under the conditions that the activity quotient has a particular (constant) value.