We present an analytic model for the interaction between planetary atmospheres and stellar winds from main sequence M stars, with the purpose of obtaining a quick test-model that estimates the timescale for total atmospheric mass loss due to this interaction. Planets in the habitable zone of M dwarfs may be tidally locked and may have weak magnetic fields, because of this we consider the extreme case of planets with no magnetic field. The model gives the planetary atmosphere mass loss rate as a function of the stellar wind and planetary properties (mass, atmospheric pressure and orbital distance) and an entrainment efficiency coefficient α. We use a mixing layer model to explore two different cases: a time-independent stellar mass loss and a stellar mass loss rate that decreases with time. For both cases we consider planetary masses within the range of 1 → 10 M⊕ and atmospheric pressures with values of 1, 5 and 10 atm. We apply our model to Venus by estimating its atmospheric mass loss rate by the interaction with the solar wind and compare our model with more detailed simulations. We find a good agreement between our results and the atmospheric mass loss obtained by more detailed models, and it is therefore appropriate for carrying out an exploration of the broad parameter space of exoplanetary systems. For the time-dependent case, planets without magnetic field in the habitable zone of M dwarfs with initial stellar mass losses of M<10-11M☉ year -1, may retain their atmospheres for at least 1 Gyr. This case may be applied to early spectral type M dwarfs (earlier than M5). Studies have shown that late type M dwarfs (later than M5) may be active for long periods of time (⩾4 Gyr), and because of that our model with constant stellar mass loss rate may be more accurate. For these stars most planets may have lost their atmospheres in 1 Gyr or less because most of the late type M dwarfs are expected to be active. We emphasize that our model only considers planets without magnetic fields. Clearly we must expect a higher resistance to atmospheric erosion if we include the presence of a magnetic field. Nevertheless, as a first approximation our model is able to give a reliable timescale, as evidence by comparing our results with more detailed models.