Carbon is a plausible light element candidate in the Earth's core owing to its cosmic abundance and its chemical affinity for iron. Recent experimental studies on Fe-C phase relations at high pressures have demonstrated that Fe7C3 iron carbide is a likely candidate for the Earth's inner core. Using electronic structure calculations, we determine the equation of state, the full elastic constant tensor, and the sound wave velocities for Fe7C3, up to inner core pressures. We find that Fe7C3 is ferromagnetic (fm) at low pressure, and that its compression behavior is well represented by a third-order Birch Murnaghan finite strain expression with V-0(fm) = 9.1 angstrom(3)/atom, K-0(fm) = 231 GPa, and K'(fm)(0) = 4.4. Under compression the magnetic moments of the Fe atoms gradually decrease, and at similar to 67 GPa the magnetic moment is lost. The high-pressure nonmagnetic phase (nm) has distinct finite strain parameters with V-0(nm) = 8.8 angstrom(3)/atom, K-0(nm) = 291 GPa, and K'(nm)(0) = 4.5. Calculated elastic constants show softening associated with the loss of magnetization. In addition, we have conducted nuclear resonant inelastic X-ray scattering experiments on Fe-57 enriched Fe7C3 at 1 bar and 300 K. On the basis of our nuclear resonant inelastic X-ray scattering spectra we have derived a Debye sound velocity of 3.18 km/s. The experimentally determined value is in good agreement with the computational predictions, based on athermal single elastic constants. The static P wave velocity at inner core pressures agrees well with seismological constraints, whereas the S wave velocity is greater by 30%. On the basis of the density of Fe7C3 at inner core conditions, we predict that the maximum possible carbon content of the inner core is around 1.5 wt %.