The location of Janapadas and Mahajanapadas was Indian sub-continent.
There were 16 mahajanpadas during 600 BC to 300 B.C.
As per the Vedic texts Aryan tribes were known as the Janas, which were the largest social units. The term janapada composed of janas means “people” or “subject” and pada “foot”. Janapada's were the earliest gathering places of men, merchants, artisans and craftsmen akin to marketplace or town surrounded by hamlets and villages. Later, Janapadas became the major realms republics or kingdoms of Vedic India. A janapadin was the ruler of a janapada. Ancient Sanskrit texts like Ashtadhyayi, Ramayana, Mahabharata, and numerous Puranas refer to many Janapadas of ancient times. The Indian subcontinent was divided into the Janapadas with clear demarcated boundaries. The vedic literature describes the nine janapadas besides such people as the Andhras, Pulindas, Sabaras and Pundaras. However, by the time of sixth century B.C. Panini mentions as many as 22 different janapadas out of which Magadha, Avanti, Kosala and Vatsa were considered very important.
The Sixth century BC onwards, the widespread use of iron in eastern UP and western Bihar created conditions for formation of large territorial states. With these developments janpadas became more powerful and turned into mahajanpadas. There were 16 mahajanpadas during 600 BC to 300 B.C. which are mentioned in early Buddhist and Jain literature, those were as follows-
Anga: Anga was one of the earliest of all Mahajanpadas. This was around the Gangetic plains. This state was known by various names in the Atharva Veda. The Anga included the modern districts of Monghyr and Bhagalpur in Bihar with its capital at Champa.
Magadha: Magadha was a powerful kingdom and was run by Bimbisara and Ajatshatru. It covered the modern districts of Patna, Gaya, and parts of Shahabad with its earlier capital at Rajgriha and later at Patliputra. As per the Vedas Magadha was the 'semi Brahman' state.
Vajji: The Vajjians or Virijis included eight confederated clans of whom the Vajjis were most important. Vajji was also very important in Buddha period, for famous dancer Amrapali. It was situated north of the river Ganga in Bihar with capital at Vaishali.
Malla: Malla has been mentioned in the Buddhist and the Jain texts. It existed in a republic of nine territories covering the modern districts of Deoria, Basti, Gorakhpur and Siddarthnagar in eastern UP with its two capitals at Kusinara and Pawa.
Kasi: The Kasi was located in the region around Varanasi (modern Banaras) which was bounded by the rivers Varuna and Asi in the north and south with its capital at Varanasi. Before Buddha, Kasi was the most powerful of the sixteen Mahajanapadas. Matsya Purana and Alberuni talk immensely about Kasi.
Kosala: Kosala was located to the north-west of Magadha with its capital at Sravasti, covering modern day districts of Faziabad, Gonda, Bahraich of eastern Uttar Pradesh.
Chedi: The capital of Chedis was Shuktimati, covering present day Bundelkhand region. Chedi was ruled by Sisupala.
Vatsa: It was a hub of all the economical activities, business and trade covering modern districts Allahabad, Mirzapur with its capital at Kaushambi.
Kuru: Kuru belonged to the Puru-Bharata family. These were the people who originated from Kurukshetra (modern Haryana and Delhi) and their capital was at Indraprastha (modern Delhi). It is believed that they have shifted to the republic form of government in sixth century BC.
Panchala: Panchala covered the area of present western UP up to the east of river Yamuna up to Kosala janapada. It was divided into two parts: Uttara Panchala and Dakhsina Panchala with its capital at Ahichhatra and Kampilya (present Rohilkhand).
Sursena: It witnessed great metamorphism in religion. The capital of Sursena was Mathura (covering the area of Brijmandal). Earlier Lord Krishna was worshipped here later the disciples of Buddha took over.
Matsya: It was located to the south of Kuru and west to the river of Yamuna covering the areas of Alwar, Bhartpur and Jaipur in Rajasthan. As per the Pali literature the Matsya’s are generally linked with the Surasena. Its capital was Viratanagara, presently Jaipur.
Avanti: It covered the western India (modern Malawa) with its capital at Ujjaini and Mahishmati. This kingdom nurtured Buddhism immensely.
Ashmaka: It was situated in the southern part of the India between the rivers Narmada and Godavari with its capital at Potana.Gandhara: Gandhara’s were mentioned in the Atharva Veda who were trained in the art of war. It covered the western part of Pakistan and eastern Afghanistan with its capital at Taxila modern day Rawalpindi.
Kamboja: Kamboja was around the area of Hindukush (modern Hazara districts of Pakistan) which is mentioned in the great epic Mahabharata.
The Magadha became powerful kingdom with the annexation of Anga by Bimbisara who was the founder of Haryanka Dynasty in Magadha. Further, his son Ajatasatru conquered the Lichchhavis of Vaishali in second half of sixth century B.C. At the beginning of 5th century B.C. there was struggle for supremacy between Magadh and Kosala. Victory went to Magadha kingdom, making the Magadha supreme power in northern India. Hence, Ajatasatru became the founder of Magadhan supremacy.