A unique definition of atomic charges in molecules is presented based on a variational principle involving the electrostatic potential energy. The method requires only the electron density as input, and does not rely on an arbitrary set of fitting points as do conventional electrostatic potential fitting procedures. The dipole moments and electrostatic potentials calculated from atomic charges obtained from this method agree well with those from self-consistent-field calculations. The new method also provides a spherical-atom potential model that may be useful in future generation molecular simulation force fields.