We have performed a detailed linear-muffin-tin-orbitals calculation of the electronic structure of Fe3C (cementite). The orthorhombic unit cell contains 16 atoms, with 4 Fe atoms taking type-1 positions which are not equivalent to the type-2 positions of the other 8 Fe atoms. The calculated moments in the ferromagnetic state are mu = 1.98-mu-B on the Fe(1) sites, mu = 1.74-mu-B on the Fe(2) sites, and mu = -0.06-mu-B on the carbon sites, in excellent agreement with experiment. The hyperfine fields in Fe3C have been calculated from the spin densities at the center of each atom. We obtain B = 26.9 T on the Fe(1) sites, B = 25.7 T on the Fe(2) sites, and B = 0.23 T on the carbon sites. The calculated electron states are in qualitative agreement with x-ray photoemission spectroscopic data. The electron-phonon coupling parameter estimated from our calculations is lambda = 0.77. This gives an electronic heat capacity dose to the experimental one. Experimental data on the electrical resistivity are uncertain and larger than our estimated value-rho = 47-mu-OMEGA-cm at 300 K. The calculated cohesive energy per atom E(coh) = 615 mRy is to be compared with the estimate E(coh) = 370 mRy based on experimental information.