A theoretical model has been developed which relates physically accessible parameters to the formation of a membrane potential. The description is an extension of a theoretical description presented previously by our group, now including divalent cations and ion-pair association. Simulations of the overall membrane potential reveal several factors that may lead to non-Nernstian response curves. For monovalent and divalent cations a reduction in the slope of the response curve (sub-Nernstian response) should virtually always be expected when ion-pair association takes place in the membrane. Ion-pair association of divalent cations and sample anions can lead to a super-Nernstian response. A diffusion potential generally reduces the Nernstian slope of the response curve. In addition, several experimental results are described which illustrate and confirm our theoretical model.