The Parisi formula for the free energy in the Sherrington.Kirkpatrick and mixed p-spin models for even p.2 was proved in the seminal work of Michel Talagrand [Ann. of Math. (2) 163 (2006) 221.263]. In this paper we prove the Parisi formula for general mixed p-spin models which also include p-spin interactions for odd p. Most of the ideas used in the paper are well known and can now be combined following a recent proof of the Parisi ultrametricity conjecture in [Ann. of Math. (2) 177 (2013) 383.393].