Equilibrium calculations in complex chemical systems involving solids require thermodynamic models for solid solutions. This article presents a formalism for solid solutions that assigns an energy contribution for a configuration consisting of a central atom and its neighbors, multiplying it with its probability based on site occupancies and sums the products up to give the total energy of the solid solution. The formulation is a closed-form expression allowing differentiation with respect to composition and hence the direct calculation of the chemical potentials. The formalism is applicable to multicomponent systems as well as to trace elements, handles long- and short-range order and can be applied to coupled substitutions. The necessary parameters can be obtained from force-field, DFT or other calculation methods capable of determining 0 K excess enthalpies and volumes of solid solutions. Because the excess enthalpies are also a function of temperature, methods to calculate excess heat capacities as a function of temperature might be necessary (e.g. approximation by phonon density of states). For interactions with one neighbor the presented formalism reduces to the regular solution and for two neighbors to the Margules-equation. For a two-site solid solution with interaction to only the neighboring site and the possibility of interchanging atoms between the sites, this formalism reduces to the Bragg-Williams model. As an example, the formalism is applied to the system calcite–dolomite–magnesite and the necessary parameters are derived by computations using force-field methods. Due to the pure computational approach and the limitations of the force-field methods, the phase diagram and the state of order for the respective phases are only reproduced qualitatively.