There is no such formula because there is no fixed amount of compression needed for collapse.
As a scaling problem the Schwarzschild radius is directly proportional to the mass, while the volume enclosed before collapse is proportional to the cube of the radius. That means that the minimum density required before collapse decreases as the square of the mass.
You do not need to compress mass to a dense state if you simply have a lot of it. Specifically, the Schwarzschild radius is $$R=\frac{2GM}{c^2}$$ and the volume of a sphere (neglecting curvature) is $$V=\frac{4}{3}\pi R^3$$ so the critical density in flat spacetime is $$\rho=\frac{M}{V}=\frac{3}{32\pi}\frac{c^6}{G^3 M^2}$$ $$\rho M^2 = 7.287 \ 10^{79}\mathrm{\ kg^3 \ m^{-3}}$$
So if you have a mass $M$ of material of natural density $\rho$ then you do not need any compression at all for it to form a black hole. For instance, $2.70 \ 10^{38} \mathrm{\ kg}$ of ordinary liquid water would be sufficient to form a black hole without any compression