Radioactive dating using uranium decay to lead gives an age near 4.7 billion years, with an uncertainty of about 0.1 billion years either way. The oldest rocks recovered from ancient geological strata are about 3.9 billion years old or thereabouts. The oldest moon rock samples from the lunar highland regions are about 4.2 billion years old. And meteorite samples recovered from many localities indicate ages of 4.5-4.9 billion years for the minerals, or dust grains. Presumably, this meteoritic material dates from a time when the solar system was just forming, and the planets had not as yet begun to appear. The oldest signs of life in the form of fossil bacteria, date from about 3.8 billion years and indicate that life began to appear on the surface of the Earth within about 500 million years after the planet had begun to form a stable crust that allowed radioactive isotopes to be trapped, and allow the possible of radioactive dating to yield ages near 4.5-4.7 billion years.
Computer models suggest that it only takes less than 5 million years to form a planet, but afterwards, the planet is constantly bombarded by small asteroids, so for much of the 500 million years since its formation, and the appearance of life, the surface must have been periodically devastated by tremendous impacts. Some biologists speculate that life may have appeared several times, and each time blasted into oblivion, before the bombardment subsided and life could at last establish itself around 4 billion years ago.
It is hard not to end this answer without commenting on some of the other 'answers' you will find on the internet. Many of these seemingly authoritative web sites are authored by people who have hidden agendas, namely, the furtherance of a religious point of view at the expense of modern scientific evidence.
The Creationists are the most troubling of these factions. They have published many pages that purport to show evidence that the Earth is young. They require from a literal reading of the Bible according to THEIR way of reading it, that the Earth must be less than 10,000 years old. To make this work, they have to claim that radioactive dating is a fraud, and leads to conflicting results. They have expertly collected a variety of discordant age estimates, or references to conflicting results in the literature, but when you look closely you will find that their references are either 50-100 years out of date, or they have completely misrepresented the scientific evidence. Here are some examples that are touted by Creation-Evolution Encyclopedia; as astronomical evidence for a young Earth:
"1 - Star clusters. One type of galaxy in outer space is the star cluster. There are many of them; and, within each one, are billions of stars. Some of these clusters are moving so rapidly, that it would be impossible for them to remain together if the universe were very old.-p. 11."
First, star clusters are not galaxies, so they have immediately started out on the wrong foot. Star clusters form continuously out of interstellar clouds in space...even today...but the process has been going on for a very long time in cosmic history. Some star clusters have only a few hundred stars ( Pleiades) while others have nearly a million (globular clusters). Star clusters eventually get stripped to pieces by the gravitational tidal forces of the Milky Way and are in fact always losing stars from their outer peripheries. There is no mystery to this. Its just basic gravitation at work.
2 - Large stars. Some stars are so large, and radiate energy so rapidly, that they could not have contained enough hydrogen to radiate at such fast rates for long ages, because their initial mass would have had to be too immense.-p. 11.
This is a rather typical example of how many discordant issues are thrown together into the same sentence to make the whole thing look like a major problem. Stars come in a range of masses from over 100 times the sun, to 0.01 times the sun. The more massive stars have higher core gravities and so the central temperatures are much higher than for the sun. This means that nuclear fusion reactions there are occurring at a much more rapid pace. The result is that massive stars use up their available core nuclear fuels in only a few 100 million years or less, compared to the sun which can toodle along for 10 billion years. The comment about 'they could not have contained enough hydrogen..." is meaningless and is inserted as a red herring to derail the reader.
3 - High-energy stars. Four types of stars radiate energy too rapidly to have existed longer than 50,000 to 300,000 years.-pp. 11-12.
There are no such things as 'high-energy' stars. Astronomers speak of high-mass stars, and it is true that the more massive of these can live less than a few million years before going supernova. These stars are being born all the time, and nearly every nebula that you see in the Milky Way ( especially the Great Nebula in Orion) contains colonies of massive stars being born even now. They were not all created at the same time billions of years ago. This is the error that the Creationists like to introduce because most people who are not astronomers think that the stars were all formed about the same time.
4 - Binary stars. Most stars in the disk of galaxies are binary stars (two stars revolving about one another); yet, frequently, one is classified as very old and the other very young. This cannot be.-p. 12.
They are right when they say that most stars are members of binary star systems. They are wrong when the present age differences as evidence of a problem. It is well known from direct observation that many binary systems evolve in a complicated way. Two stars formed from the same cloud at the same time will evolve very differently depending on their masses. The more massive one will become a red giant star in a few hundred million years, and the companion star can consume or accrete the outer layers of the red giant star. This influx of new gas onto the companion star can literally reset the clock on the companion, making it look younger than the red giant. In fact, even before this happens, the red giant obviously looks like a much older star than its companion. This has nothing to do with when they were formed, but the fact that the more massive one evolves faster and will look older.
5 - Hydrogen in the universe. Hydrogen cannot be made by converting other elements into it; therefore, if the universe were as old as the theory requires, there would now be very little hydrogen in the universe.-p. 12.
Their first statement, that significant quantities of hydrogen cannot be made by converting other elements into it, is correct. What is incorrect is the second statement which is actually very vague. What theory do they mean? Their's? Astronomers? Big Bang Cosmology? With no new cosmological sources of hydrogen since the Big Bang, during the present age of the universe (15 billion years or so) not all of this hydrogen should have been converted into stars. We can see how inefficient it is to form stars from gas clouds, and given the rates that the Milky Way's interstellar medium gets converted into stars, it will take another few hundred BILLION years before it is all gone. Eventually the universe will run out of free hydrogen not already buried in the dense stellar cinders called white dwarfs or neutron stars, but this will take several trillion years or more.
https://image.gsfc.nasa.gov/poetry/venus/q1152.html