Abstract Helmholtz free energies of electrostatically-stabilized colloidal dispersions of monodispersed spherical particles have been obtained using computer experiments. Boltzmann sampling has been shown to be sufficient for determining free energy differences between two dispersions whose pair-potentials are close to each other. Non-Boltzmann sampling has been used when the pair-potentials differ substantially. These results have been compared with the results based on perturbation theory. The techniques used, thus, offer a direct method to test the latter.