According to popular tradition, the legendary 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 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.
Historicity of the legends
The association of the era beginning in 57 BCE with Vikramaditya is not found in any source before the 9th century CE. The earlier sources call this era by various names, including Kṛṭa (343 CE and 371 CE), Kritaa (404 CE), the era of the Malava tribe (424 CE), or simply, Samvat.
The earliest known inscription that calls the era "Vikrama" is from 842 CE. This inscription of Chauhana ruler Chandamahasena was found at Dholpur, and is dated Vikrama Samvat 898, Vaishakha Shukla 2, Chanda (16 April 842 CE). The earliest known inscription that associates this era with a king called Vikramaditya is dated 971 CE. The earliest literary work that connects the era to Vikramaditya is Subhashita-Ratna-Sandoha (993-994 CE) by the Jain author Amitagati.
For this reason, multiple authors believe that the Vikram Samvat was not started by Vikramaditya, who might be a purely legendary king or the 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 Vikramaditya, and changed the name of the era to "Vikrama Samvat". According to Rudolf Hoernlé, the king responsible for this change was Yashodharman: Hoernlé also believed that he conquered Kashmir, and is same person as the "Harsha Vikramaditya" mentioned in Kalhana's Rajatarangini.
Earlier, some scholars believed that the Vikrama Samavat corresponded to the Azes era of the Indo-Scythian (Śaka) king King Azes. However, this was disputed by Robert Bracey following discovery of an inscription of Vijayamitra, which is dated in two eras. The theory seems to be now thoroughly discredited by Falk and Bennett, who place the inception of the Azes era in 47–46 BCE.