Abstract The electric field gradient (EFG) at the chlorine site is calculated for cubic compounds of the K2PtCl6-type (space group Fm3m), M2IMIVCl6, where M1 is an alkali metal and MeIV a tetravalent element. In the calculations the total EFG is subdivided into the contribution of the complex [MIVCl6]2-, EFGcomplex, and the contribution of the ions outside the complex, EFGlattice. EFGcomplex is calculated by the local electron density formalism using the MS-Xα-method, and EFGlattice is determined by the point charge model.It is found that EFGcomplex is positive whereas EFGlattice is negative. Including antishielding effects, the magnitude of EFGlattice is about one fourth of EFGcomplex. The trends in the EFG for the various compounds found theoretically are the same as the trends in the experimental nuclear quadrupole coupling constants e2Q q/h. However, the absolute values of EFGtheo are smaller than the values EFGexp deduced from e2Q q/h.For a fixed central atom MIV the (positive) EFGexp is increasing with increasing radii of the cations (and increasing lattice constant). This increase can be understood by an increase of EFGlattice.On the other hand, for fixed cations and different tetravalent metal atoms, the EFG is increasing with increasing electronegativity of the central atom. This can be understood by an increase of EFGcomplex. For distorted octahedra it is found that the change in the EFG due to the distortion is also due to a change in EFGcomplex.