  We calculate the long-wavelength static screening properties of both neutral
and doped graphene in the framework of density-functional theory. We use a
plane-wave approach with periodic images in the third dimension and truncate
the Coulomb interactions to eliminate spurious interlayer screening. We
carefully address the issue of extracting two dimensional dielectric properties
from simulated three-dimensional potentials. We compare this method with
analytical expressions derived for two dimensional massless Dirac fermions in
the random phase approximation. We evaluate the contributions of the deviation
from conical bands, exchange-correlation and local-fields. For momenta smaller
than twice the Fermi wavevector, the static screening of graphene within the
density-functional perturbative approach agrees with the results for conical
bands within random phase approximation and neglecting local fields. For larger
momenta, we find that the analytical model underestimates the static dielectric
function by $\approx 10%$, mainly due to the conical band approximation.
