A consistent thermodynamic equation of state is proposed for calculati
ng the pressure and internal energy of graphite and diamond from their
density and temperature. The equation of state closely agrees with th
e experimental data on shock compressibility, heat capacity, thermal e
xpansion, and phase equilibrium. It may be included in mathematical mo
dels and algorithms for calculating graphite-diamond phase transition
under dynamic load.