The earliest major civilization of the Indian subcontinent was the Indus Valley Civilization, which flourished from about 3300 to 1300 BCE across present-day Pakistan and northwest India. Its two greatest cities, Mohenjo-daro and Harappa, displayed remarkable urban planning, including grid street layouts, multi-story buildings, sophisticated drainage systems, standardized weights and measures, and granaries. Mohenjo-daro also featured a Great Bath, possibly used for ritual purposes. The civilization's writing system, found on seals and pottery, remains undeciphered despite numerous scholarly attempts, making the Indus Valley one of the least understood major ancient cultures. Its decline around 1900–1300 BCE was likely caused by environmental factors, including climate change, the drying up of the Sarasvati River, and tectonic disruption of water systems, rather than by invasion.
Many centuries later, the Maurya Empire became the first to unify most of the Indian subcontinent, ruling from 322 to 185 BCE after Chandragupta Maurya overthrew the previous dynasty. The empire reached its peak and moral transformation under Emperor Ashoka (r. 268–232 BCE), who after the bloody conquest of Kalinga converted to Buddhism and devoted his reign to promoting nonviolence, religious tolerance, and public welfare. His famous rock and pillar edicts, inscribed throughout India, declared principles of just governance and remain among the most important historical documents of ancient Asia.
Following the Mauryan collapse, the Gupta Empire rose from 320 to 550 CE and is often called the "Golden Age of India." This period saw extraordinary advances in mathematics, including the development of zero as a numerical concept and the decimal system, as well as progress in astronomy, literature, and art. Scholars such as the mathematician Aryabhata and the poet Kalidasa flourished under Gupta patronage. The Indian concept of zero, formalized around the fifth century CE, was a revolutionary mathematical idea that ultimately enabled modern computation and was transmitted through trade and scholarship to the Islamic world and later to Europe.