Stellar mass-loss rates are an important input ingredient for stellar evolution models since they determine stellar evolution parameters such as stellar spin-down and increase in stellar luminosity through the lifetime of a star. Due to the lack of direct observations of stellar winds from Sun-like stars stellar X-ray luminosity and stellar level of activity are commonly used as a proxy for estimating stellar mass-loss rates. However, such an intuitive activity – mass-loss rate relation is not well defined. In this paper, I study the mass-loss rate of the Sun as a function of its activity level. I compare in situ solar wind measurements with the solar activity level represented by the solar X-ray flux. I find no clear dependency of the solar mass flux on solar X-ray flux. Instead, the solar mass-loss rate is scattered around an average value of 2 × 10−14 M⊙ yr−1. This independency of the mass-loss rate on level of activity can be explained by the fact that the activity level is governed by the large modulations in the solar close magnetic flux, while the mass-loss rate is governed by the rather constant open magnetic flux. I derive a simple expression for stellar mass-loss rates as a function of the stellar ambient weak magnetic field, the stellar radius, the stellar escape velocity and the average height of the Alfvén surface. This expression predicts stellar mass-loss rates of 10−15 to 10−12 M⊙ yr−1 for Sun-like stars.