The main part of this work is to present a formula allowing a microscopic derivation of the Schwarzschild black hole entropy in arbitrary dimension. More generally, this Cardy-like formula applies for static black holes whose gravitational entropy scales as a power of the temperature, and is also effective for negative heat capacity solutions. The formula involves the scaling power, the black hole mass and the energy of a gravitational soliton identified as the ground state of the theory. The robustness of this formula is verified in the most famous example of solution with negative heat capacity, namely the Schwarzschild black hole. The mass of the Schwarzschild regular soliton is computed using the counterterm method for asymptotically flat spacetimes. Corrections of the black hole entropy of the order of logarithm of the area are shown to arise for dimensions strictly greater than four. Finally, we will see that a slight modification of the Cardy-like formula involving the angular generator, perfectly reproduces the four-dimensional Kerr entropy.