A generalized line tension model has been developed to estimate the critical resolved shear stress in precipitation hardened alloys. The model is based in previous line tension models for regular arrays of either impenetrable or shearable spherical precipitates that were expanded to take into account the effect of the elastic mismatch between the matrix and the precipitates. The model parameters are calibrated from dislocation dynamics simulations that covered a wide range of precipitate diameters and spacing as well as of the mismatch in elastic constants. This model is extended to deal with random arrays of monodisperse spherical precipitates by changing the geometrical parameters of the model by the averaged ones corresponding to the random distributions. The model predictions were in good agreement with the critical resolved shear stresses obtained from dislocation dynamics simulations of random spherical precipitates distributions for both impenetrable and shearable precipitates, providing a fast and accurate tool to predict precipitate strengthening in metallic alloys.