- A new numerical integration procedure for exchange-correlation energies and potentials is proposed and "proof of principle" results are presented. The numerical integration grids are built from sparse-tensor product grids (constructed according to Smolyak's prescription [Dokl. Akad. Nauk. 4, 240 (1963)] ) on the unit cube. The grid on the unit cube is then transformed to a grid over real space with respect to a weight function, which we choose to be the promolecular density. This produces a "whole molecule" grid, in contrast to conventional integration methods in density-functional theory, which use atom-in-molecule grids. The integration scheme was implemented in a modified version of the DEMON2K density-functional theory program, where it is used to evaluate integrals of the exchange-correlation energy density and the exchange-correlation potential. Ground-state energies and molecular geometries are accurately computed. The biggest advantages of the grid are its flexibility (it is easy to change the number and distribution of grid points) and its whole molecule nature. The latter feature is potentially helpful for basis-set-free computational algorithms.