In this paper we develop a simple theoretical model to explain two of the most important observations about trace element partitioning. The first of these is the apparent dependence of crystal-melt partition coefficients on charge such that when a cation such as Ca2+ is replaced by ions of approximately the same radius but different charge, partitioning follows the approximate relationship: D2+ Ca > D1+ i ≈ D1+ j > D4+ k ≥ D0+ n where n refers to a noble gas atom. The second observation is the strong correlation between partition coefficients for highly charged ions and the bulk composition of the crystal, e.g. the correlation between DTh and A1 content of clinopyroxene. Starting from the substitution of an ion of charge Zc into a site which normally accommodates a major ion of different charge Zo, we find, using a simplified continuum model [Born, Z. Phys. 1 (1920) 45-48] that the electrostatic work of substitution should depend on (Ze-Zo)2. Observed partitioning between melt and the clinopyroxene M2 site for ions of similar radius to Ca2+ follows an approximately parabolic dependence on cation charge, implying that electrostatic work is a major influence on partitioning behaviour. From the form of the parabola we derive an electrostatic energy of substitution ΔGelec in clinopyroxene M2 of approximately 28 kJ mo1-1. One implication is that, if noble gases enter lattice sites in minerals, they should have broadly similar crystal-melt partition coefficients to U and Th. In any given natural pyroxene, with random mixing of major ions on each sublattice, the 'best-fit' charge at the M2 site depends on the composition of the local environment. From the bulk crystal composition we can compute the proportions of M2 sites which, for local electroneutrality, should contain 1+, 2+, 3+, 4+ or 0+ ions. By summing the proportions of the different configurations and weighting them according to their relative electrostatic energies, the effects of crystal composition on trace element partitioning can be predicted. The model predicts that the clinopyroxene-melt partition coefficients of rare earth elements (REE3+) should increase by a factor of 2.3 as the Al content of tetrahedral sites (Aliv) increases from 0.001 to 0.3. For more highly charged cations the effect is more dramatic, the partition coefficient for Th4+ being predicted to increase by a factor of 300 over the same composition range. In both cases the predictions agree well with experimental observations. When the effects of pressure are combined with those of composition we find that noble gas partition coefficients should increase with pressure relative to those of U and Th and plausibly become larger than the latter. We conclude that the electrostatic work of substitution exerts a large and predictable influence on the partitioning behaviour of trace cations. Together with lattice strain energy, it should be explicitly accounted for in the development of thermodynamic descriptions of partitioning behaviour.