Mahavira was born a little before the Buddha. While the Buddha was the founder of Buddhism, Mahavira did not found Jainism. He is the 24th great teacher (Tirthankar) in the Jain tradition that was founded in the present era by Rishabh or Adinath, thousands of years before Mahavira.