How many light years away is Mars from earth?
Light-years is not an adequate measure for distances inside the solar system. Symply a light-year is a humongously large measure of distance.
The distance between Earth and Mars is at the most 400 million km, and could be as small as 55 million km.
Even with the larger distance we would obtain:
Neverthless, here is your answer:
Just divide the time in seconds light takes between Earth and Mars, by the number of seconds within one year: