How long ago was the earth created according to the Bible?

Jewish tradition states that the Earth was created on the 25th of Elul (late summer), 3760 BCE.See also:

Is there evidence for Creation?

Can you show that God exists?

Seeing God's wisdom

Simple Answer:

The Bible never states when the Earth was created. Closely reading Genesis 1, the reader will soon realize the 'already formed' planet is in total darkness and under water. We see then it was already created - the time line is absent so it could have been a moment or billions of years previously. But it also says it was 'tohu and bohu' or roughly empty(void) and formless (vain). Later in Isaiah, we are told God does not create this way (see Isaiah 45:18). Indeed, when God created the universe and Earth in particular, the angels shouted with joy (see Job 38:7).

Genesis is speaking of the 'renewal' of the face of the Earth after some sort of disaster (see Psalm 104:30).