Аннотация:It was demonstrated that for weak flares the dependence on spottedness can be rather weak. The fact is that such flares can occur both in small and large active regions. At the same time, powerful large flares of classes M and X occur much more often in large active regions. It should be noted that the procedures used to determine the spot areas on the Sun and stars are essentially different. In the former case, the observer directly calculates the area of each spot from the full image of the Sun and, then, sums up the values obtained. The penumbra is traditionally included in the spot area. For stars, a different procedure is used, which is based on the temperature difference between the star and the observed spot. This difference corresponds to the temperature difference between the spot umbra and the star. This means that, in fact, we find the total area of the umbra or, to be more precise, the area of a starspot can be considered coinciding with the area of the umbra. Therefore, in energy estimates, the mean magnetic field in starspots can also be assumed equal to the mean field in the sunspot umbra. So the effective mean magnetic field is ~900 Mx/cm^2 in sunspots and ~2000 Mx/cm^2 in starspots. K Moreover, the height of the energy storage cannot be strictly proportional to A^1/2. For stars, the fitting factor is an order of magnitude smaller. The analysis of the occurrence rate of powerful solar X-ray flares of class M and X and superflares on stars shows that, with allowance for the difference in the spottedness and compactness of active regions, both sets can be described by a single model. Thus, the problem of superflares on stars and their absence on the Sun is reduced to the problem of difference in the effectiveness of the dynamo mechanisms. Acknowledgements Authors acknowledge the support of Ministry of Science and Higher Education of the Russian Federation under the grant 075-15-2020-780.