Basically, it's a standard way of calculating Gibbs Free Energy. The variation in free energy (ΔG) is the sum of the free energies with respect to the products (ΣGP) minus the the sum of the free energies with respect to the reactants (ΣGR).
That said, here's the simplest example I can think of:
H2 + 1/2O2 ⇔ H2O.
The change in free energy for this reaction would be:
ΔG = GH2O - (GH2 + 1/2 GO2)
Finding each of these terms is a different story... it involves internal energy (binding energy or formation energy depending on your system), zero point energies and entropy contributions.