Besides its epic narrative of the Kurukshetra War and the fates of the Kauravas and the Pandava princes, the Mahabharata contains much philosophical and devotional material, such as a discussion of the four "goals of life" or purusharthas (12.161). Among the principal works and stories that are a part of the Mahabharata are the Bhagavad Gita, the story of Damayanti, an abbreviated version of the Ramayana, and the Rishyasringa, often considered as works in their own right.
Traditionally, the authorship of the Mahabharata 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 not thought to be appreciably older than around 400 BCE, though the origins of the story probably fall between the 8th and 9th centuries BCE. The text probably reached its final form by the early Gupta period (c. 4th century). 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 Sanskrit epic. 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 Odyssey combined, or about four times the length of the Ramayana. W. J. Johnson has compared the importance of the Mahabharata to world civilization to that of the Bible, the works of Shakespeare, the works of Homer, Greek drama, or the Qur'an.