The outflow of gas from the surface of a star. The Sun loses about 10−14 of its mass through the solar wind each year, but winds are of much greater importance in pre-main-sequence stars (e.g. T Tauri stars) and in giants and supergiants. Extreme stellar winds are found in X-ray binaries, in which stars of spectral type O or B can lose around 10−6 of a solar mass per year to a compact companion (a neutron star or black hole). Stars of intermediate mass can lose up to 10−4 solar masses per year through stellar winds as they evolve from the asymptotic giant branch stage into a planetary nebula.