The mass of a protostar is calculated from the infall and dispersal of an isothermal sphere in a uniform background. For high contrast between peak and background densities and for short dispersal time t d , the accretion is ''self-limiting''; gas beyond the core is dispersed before it accretes, and the protostar mass approaches a time-independent value of low mass. For lower density contrast and longer dispersal time, the accretion ''runs away''; gas accretes from beyond the core, and the protostar mass approaches massive star values. The final protostar mass is approximately the initial gas mass whose free-fall time equals t d . This mass matches the peak of the IMF for gas temperature 10 K, peak and background densities 10 6 and 10 3 cm À3 , respectively, and t d comparable to the core free-fall time t core . The accretion luminosity exceeds 1 L for 0.1 Myr, as in the ''Class 0'' phase. For t d /t core ¼ 0:4 0:8 and temperature 7-50 K, selflimiting protostar masses are 0.08-5 M . These protostar and core masses have ratio 0:4 AE 0:2, as expected if the core mass distribution and the initial mass function have the same shape.