What you may be thinking of is the size of a black hole that would result if the Earth were somehow compressed enough to form a black hole. The size of the black hole you could make from an object is dependent on its mass, and is called the Schwarzschild radius
If you do the math, the Earth's Schwarzschild radius comes out to about 9 millimeters, which is about the size of a pea.
Black holes tend to form through massive stars going supernova, from the formation of really huge stars in the centers of galaxies
, or possibly in the early universe shortly after the Big Bang
. None of those methods of making a black hole could apply to making the Earth into a black hole. Since we don't know of any way to make the Earth into a black hole, we can't really say whether or not any of its mass would be lost in the process. The one method of black hole formation that I'm at all familiar with (IANA black hole physicist), a massive star going supernova, does result in the ejection of most of the star's mass prior to the formation of the black hole, so it's certainly possible that, if we somehow found a way to make the Earth into a black hole, part of its mass would be lost.