The Mahabharata is an epic narrative of theKurukshetra War and the fates of the Kauravaand the Pandava princes. It also containsphilosophical and devotional material, such as a discussion of the four "goals of life" orpurusharthas (12.161). Among the principal works and stories in the Mahabharata are theBhagavad Gita, the story of Damayanti, an abbreviated version of the Ramayana, and theRishyasringa, often considered as works in their own right.
Traditionally, the authorship of theMahabharata is attributed to Vyasa. There have been many attempts to unravel its historical growth and compositional layers. The oldest preserved parts of the text are thought to be not much older than around 400 BCE, though the origins of the epic probably fall between the 8th and 9th centuries BCE. The text probably reached its final form by the early Gupta period (c. 4th century CE). The title may be translated as "the great tale of the Bhārata dynasty". According to the Mahabharata itself, the tale is extended from a shorter version of 24,000 verses called simply Bhārata.
The Mahabharata is the longest known epic poem and has been described as "the longest poem ever written". Its longest version consists of over 100,000 shloka or over 200,000 individual verse lines (each shloka is a couplet), and long prose passages. About 1.8 million words in total, the Mahabharata is roughly ten times the length of the Iliad and the Odyssey combined, or about four times the length of the Ramayana. W. J. Johnson has compared the importance of theMahabharata in the context of world civilization to that of the Bible, the works ofShakespeare, the works of Homer, Greek drama, or the Qur'an.