(CNN) Glaciers that still exist on the surface of Mars are helping to tell the story of its past. The red planet experienced between six and 20 separate ice ages during the past 300 to 800 million years, a new analysis of glaciers on Mars has revealed. During the last ice age on Earth 20,000 years ago, our planet was covered in glaciers. Those glaciers then retreated to the poles. These masses of ice left behind rocks as evidence, dropping them while scraping and carving paths as they moved to the poles.