In the present work we have proposed the method that allows one to easily estimate hardness and bulk modulus of known or hypothetical solid phases from the data on Gibbs energy of atomization of the elements and corresponding covalent radii. It has been shown that hardness and bulk moduli of compounds strongly correlate with their thermodynamic and structural properties. The proposed method may be used for a large number of compounds with various types of chemical bonding and structures; moreover, the temperature dependence of hardness may be calculated, that has been performed for diamond and cubic boron nitride. The correctness of this approach has been shown for the recently synthesized superhard diamond-like BC5. It has been predicted that the hypothetical forms of B2O3, diamond-like boron, BCx and COx, which could be synthesized at high pressures and temperatures, should have extreme hardness.