Small-angle X-ray scattering (SAXS) methods are extensively used for characterizing macromolecular structure and dynamics in solution. The computation of theoretical scattering profiles from three-dimensional models is crucial in order to test structural hypotheses. Here, a new approach is presented to efficiently compute SAXS profiles that are based on three-dimensional Zernike polynomial expansions. Comparison with existing methods and experimental data shows that the Zernike method can be used to effectively validate three-dimensional models against experimental data. For molecules with large cavities or complicated surfaces, the Zernike method more accurately accounts for the solvent contributions. The program is available as open-source software at http://sastbx.als.lbl.gov.