Dinosaurs lived on Earth for about 175 million years, until they were entirely wiped out by the K-T extinction event at the end of the Cretaceous Period. They lived during the Mesozoic Era, and examples of dinosaurs can be found in all three periods of that era.