Varāhamihira (6th century CE, possibly 505 – 587), also called Varāha or Mihira, was an astrologer-astronomer who lived in Ujjain in present-day Madhya Pradesh, India.
Unlike other prominent ancient Indian astronomers, Varāhamihira does not mention his date. However, based on hints in his works, modern scholars date him to the 6th century CE; possibly, he also lived during the last years of the 5th century.
In his Pancha-siddhantika, Varāhamihira refers to the year 427 of the Shaka-kala (also Shakendra-kala or Shaka-bhupa-kala). Identifying this calendar era with the Shaka era places Varāhamihira in the 505 CE. Alternative theories identify this calendar era with other eras, placing him before the 5th century CE. However, these theories are inaccurate, as Varāhamihira must have lived after Aryabhata (born 476 CE), whose work he refers to. The particulars of the date mentioned by Varāhamihira - Shukla pratipada of the Chaitra month of the Shaka year 427 - align accurately with 20-21 March 505 CE. Al-Biruni also places Varāhamihira in 505 CE.
In accordance with the contemporary tradition, 505 CE was most probably the year in which Varāhamihira composed Pancha-Siddhantaka or began planning it. However, some scholars believe that it was the year of Varāhamihira's birth or of another important event in his life. This is because according to Amaraja, the author of a commentary on Brahmagupta's Khanda-khadyaka, Varāhamihira died in 587 CE (Shaka year 509). If Varāhamihira wrote his work in 505 CE even at the young age of 25, he must have been over 105 years old at the time of his death, which seems exceptionally high to these scholars. Consequently, these scholars consider date Varāhamihira's lifespan to 505-587 CE. Other scholars doubt the accuracy of Amaraja's statement, since he lived a thousand years after Varāhamihira.
According to a historically inaccurate tradition, Varāhamihira was associated with the first century BCE legendary emperor Vikramaditya.