A first-principles plane wave method with the relativistic analytic pseudopotential of Hartwigsen, Goedecker and Hutter (HGH) scheme in the frame of local density approximation is performed to calculate the lattice parameters and the equation of states (EOS) of superconducting MgB 2 . Our calculations show that the ratio c/a of about 1.134 is the most stable structure for MgB 2 , as is consistent with experiment and other theoretical results. Also, the isothermal and isobaric properties are discussed from energy–volume curves using a quasi-harmonic Debey model.