If the earth was a black hole how big would it be in diameter

What about the sun?

According to this calculator:

The Schwarzschild radius for an object with the mass of the Earth is around 8.8 mm.

For an object with the mass of our Sun, it’s 2.9 km.

Damn. That is one interesting stat.