We use techniques from nonparametric function estimation theory to extract the density profiles , and their derivatives , from a set of N -body dark matter halos . We consider halos generated from \Lambda CDM simulations of gravitational clustering , as well as isolated , spherical collapses . The logarithmic density slopes \gamma \equiv d \log \rho / d \log r of the \Lambda CDM halos are found to vary as power-laws in radius , reaching values of \gamma \approx - 1 at the innermost resolved radii , \sim 10 ^ { -2 } r _ { vir } . This behavior is significantly different from that of broken power-law models like the NFW profile , but similar to that of models like de Vaucouleurs ’ . Accordingly , we compare the N -body density profiles with various parametric models to find which provide the best fit . We consider an NFW-like model with arbitrary inner slope ; Dehnen & McLaughlin ’ s anisotropic model ; Einasto ’ s model ( identical in functional form to Sérsic ’ s model but fit to the space density ) ; and the density model of Prugniel & Simien that was designed to match the deprojected form of Sérsic ’ s R ^ { 1 / n } law . Overall , the best-fitting model to the \Lambda CDM halos is Einasto ’ s , although the Prugniel-Simien and Dehnen-McLaughlin models also perform well . With regard to the spherical collapse halos , both the Prugniel-Simien and Einasto models describe the density profiles well , with an rms scatter some four times smaller than that obtained with either the NFW-like model or the 3-parameter Dehnen-McLaughlin model . Finally , we confirm recent claims of a systematic variation in profile shape with halo mass .