The figure is eight times as big as the previous best guess, which counted perhaps 400 billion at most.
The new total of 3,040,000,000,000 trees represents roughly 420 trees for every person on the planet.
A team from Yale University in America carried out the research and collected information from over 400,000 forest plots around the world.
The new number will now help with a wide range of research – everything from studies that look at animal and plant habitats to climate issues.
What is clear from the study is the influence humans now have on the number of trees on Earth.