Many scientific research areas rely on accurate electron density characterization of various materials. For instance in X-ray optics and radiation therapy, there is a need for a fast and reliable technique to quantitatively characterize samples for electron density. We present how a precise measurement of electron density can be performed using an X-ray phase-contrast grating interferometer in a radiographic mode of a homogenous sample in a controlled geometry. A batch of various plastic materials was characterized quantitatively and compared with calculated results. We found that the measured electron densities closely match theoretical values. The technique yields comparable results between a monochromatic and a polychromatic X-ray source. Measured electron densities can be further used to design dedicated X-ray phase contrast phantoms and the additional information on small angle scattering should be taken into account in order to exclude unsuitable materials.