The reaction Gibbs energy can always be written in the following way:

where ΔGrº is the standard reaction Gibbs energy, given by the difference between the Gibbs energies of the products and the reactants, all weighted by the appropriate stoichiometric coefficient:

The quantity Q is called the reaction quotient, and is given by the activities of the products divided by the activities of the reactants, the activity of each species being raised to the appropriate stoichiometric coefficient. Formally, Q is defined as follows:

The symbol Π indicates the product of the following series of terms, in the same way as the symbol Σ indicates the sum of the following series of terms. Thus the above equation tells us to take the activity of each species, raised to the appropriate stoichiometric number, and multiply all these values together to obtain the reaction quotient. (Remember that the stoichiometric number has the same value as the stoichiometric coefficient, but is, by convention, negative for reactants. This ensures that the activities of the reactants end up on the bottom of a  fraction in the above expression. For a gas, its activity is replaced by the fugacity in bars.)

It is intuitively reasonable that the reaction Gibbs energy is composed of two terms, one (the standard reaction Gibbs energy) characteristic of the reaction under consideration, and the other (involving the reaction quotient) being dependant upon the composition of the reaction mixture.

At equilibrium, the reaction Gibbs energy is zero. The activities of all the components have their equilibrium values, and the value of Q at equilibrium may thus be given the symbol K. If we consider K it may be seen that it is, by definition, the thermodynamic equilibrium constant for the reaction. Substituting Q = K and ΔGr = 0 in the first equation on this page, we obtain:

which is an exact thermodynamic relation between the standard reaction Gibbs energy and equilibrium constant of a given reaction.