Plaque with description of Barnala inscription
Barnala Yupa pillar, Rajasthan
A number of ancient and medieval inscriptions used the Vikram Samvat. Although it was reportedly named after the legendary king Vikramaditya, the term "Vikrama Samvat" does not appear in the historical record before the 9th century; the same calendar system is found with other names, such as Krita and Malava. In colonial scholarship, the era was believed to be based on the commemoration of King Vikramaditya expelling the Sakas from Ujjain. However, later epigraphical evidence and scholarship suggest that this theory has no historical basis. During the 9th century, epigraphical artwork began using Vikram Samvat (suggesting that the Hindu calendar era in use became popular as Vikram Samvat); Buddhist and Jain epigraphy continued to use an era based on the Buddha or the Mahavira.
According to popular tradition, King Vikramaditya of Ujjain established the Vikrama Samvat era after defeating the Śakas.
Kalakacharya Kathanaka (An account of the monk Kalakacharya), by the Jain sage Mahesarasuri, gives the following account: Gandharvasena, the then-powerful king of Ujjain, abducted a nun called Sarasvati, who was the sister of the monk. The enraged monk sought the help of the Śaka ruler King Sahi in Sistan. Despite heavy odds but aided by miracles, the Śaka king defeated Gandharvasena and made him a captive. Sarasvati was repatriated, although Gandharvasena himself was forgiven. The defeated king retired to the forest, where he was killed by a tiger. His son, Vikramaditya, being brought up in the forest, had to rule from Pratishthana (modern Paithan in Maharashtra). Later on, Vikramaditya invaded Ujjain and drove away from the Śakas. To commemorate this event, he started a new era called the "Vikrama era". The Ujjain calendar started around 58–56 BCE, and the subsequent Shaka-era calendar was started in 78 CE at Pratishthana.
The association of the era beginning in 57 BCE with Vikramaditya is not found in any source before the 9th century CE; earlier sources call the era "Kṛṭa" (343 and 371 CE), "Kritaa" (404), "the era of the Malava tribe" (424), or simply "Samvat". The earliest known inscription which calls the era "Vikrama" is from 842. This inscription, from the Chauhana ruler Chandamahasena, was found at Dholpur and is dated "Vikrama Samvat 898, Vaishakha Shukla 2, Chanda" (16 April 842). The earliest known inscription which associates the era with a king called Vikramaditya is dated 971, and the earliest literary work connecting the era to Vikramaditya is Subhashita-Ratna-Sandoha (993-994) by the Jain author Amitagati.
A number of authors believe that the Vikram Samvat was not started by Vikramaditya, who might be a legendary king or a title adopted by a later king who renamed the era after himself. V. A. Smith and D. R. Bhandarkar believed that Chandragupta II adopted the title of Vikramaditya, and changed the era's name to "Vikrama Samvat". According to Rudolf Hoernlé, the king responsible for this change was Yashodharman. Hoernlé believed that he conquered Kashmir and is the "Harsha Vikramaditya" mentioned in Kalhana's Rajatarangini.
Some earlier scholars believed that the Vikraa Samvat corresponded to the Azes era of the Indo-Scythian (Śaka) king King Azes. This was disputed by Robert Bracey after the discovery of an inscription of Vijayamitra, which is dated in two eras. The theory was discredited by Falk and Bennett, who place the inception of the Azes era in 47–46 BCE.