When was the Earth Formed?

The truth is we are not sure, but the earth was formed about 4.5 billion years ago shortly after the Sun was formed. The solar system formed from a gigantic cloud of galactic gasses.