Abstract. This work proposes a novel algorithm to compute atomic charges as defined by the theory of atoms in molecules (AIM). Using the divergence theorem it is possible to express the 3D volume integral over an atomic basin purely in terms of 2D surface integrals. Hence, it can be proven that an atomic charge is equal to the flux of the electric field of the whole molecule through the atoms complete boundary. This boundary consists of the interatomic surfaces and the so-called outeratomic surface, which is the open side of the atom. When fine-tuned the algorithm can generate atomic charges in the order of minutes without introducing any approximations. Moreover, the problem of the geometrical cusp occurring in atomic basins and that of multiple intersections is also eliminated. The computational overhead of computing the electric field (which is analytical) is compensated by the gain in computing time by eliminating one dimension of quadrature. The proposed algorithm opens an avenue to invalidate the oft-quoted drawback that AIM charges are computationally expensive. We explain the details of the implementation in MORPHY01 and illustrate the novel algorithm with a few examples.