Using static electronic structure calculations, we determine the equation of state, the full elastic constant tensor and the sound wave velocities of cementite (Fe3C) at pressures up to 410 GPa. Fe3C is ferromagnetic (fm) at ambient pressures. Upon compression, the magnetic moment of the Fe atoms are gradually lost and, at around ~62 GPa, Fe3C becomes non-magnetic (nm). We find that the pressure-volume results for the Fe3C (fm) phase are well represented by a Vinet equation of state with K0fm = 183 GPa, K0 = 5.9, and V0fm = 151.6 Å3 and that of the Fe3C (nm) phase are well represented by a Vinet equation of state with K0nm = 297 GPa, K0′ = 4.9, and V0nm = 143.2 Å3. A third-order Birch-Murnaghan equation of state formulation for the Fe3C (nm) phase yields similar parameters with K0nm = 304 GPa, K0 = 4.5, and V0nm = 143.3 Å3. At pressures relevant to the Earth’s inner core, the full elastic constant tensor of Fe3C (nm) reveals significant P-wave anisotropy (~10%). A crystal preferred orientation with the  directions of Fe3C aligned along the pole axis would be required to explain the inner core anisotropy. Comparing, pure hcp Fe and iron carbides with varying stoichiometry, we find that the shear wave velocity decreases linearly with the increasing C content.