The confirmation of the existence of black holes is one of the most basic results in astrophysics. There is a wide range of masses of black holes, from those with stellar mass, which are the result of the catastrophic final phase of very massive stars, to the supermassive black holes at the centres of most galaxies. The mass of a black hole is up to now the only parameter which scientists are able to measure. In this work, we present an original method for measuring the masses of black holes, from those of stellar mass to the supermassive variety, based on a simple measurement of the temperature of the gas that is is produced in the surroundings of a black hole when it is active, i.e. when it is “smallowing” the matter which falls into its gravitational field. This new method is based on a theory first proposed in 1973 by the astronomers N. Shakura y R. Sunyaev, applied to binary stars which emit X-rays, each of which contain a compact object, usually a black hole, and a companion star. The new method opens the possibility to measure black hole of stellar mass, and also for intermediate mass and supermassive black holes. At the same time, thanks to its theoretical basis, the method offers also the possibility of determining the rotation, the spin, of a black hole. A result of this work, perhaps counterintuitive, is that the more massive the black hole, the more inactive it becomes and the cooler is the medium which surrounds it. The opposite occurs when they have less mass, in which case they are able to heat the material around them to millions of degrees, although only when they are active.