We introduce the continuous fast multipole method (CFMM), a generalization of the fast multipole method for calculating Coulomb interaction of point charges. The CFMM calculates Coulomb interactions between charge distributions, represented by continuous functions, in work scaling linearly with their number for constant density systems. Model calculations suggest that for errors in the potential of 10(-10), the CFMM becomes faster than direct evaluation for less than 10000 Gaussian charge distributions. Using the CFMM to form the J matrix in ab initio density functional and Hartree-Fock calculations shows that a two-three times speedup is attainable for the linear alkanes C10H22-C20H42.