For accurate determination of the service life we must take into account the loading, which are in most cases random loading of variable amplitude, the geometry and material properties of construction elements which are known not to be constants. The more precise these input parameters are modeled; the more precise and reliable are the results. In our paper we will deal in detail with the model of crack initiation and propagation in the complex structures as a basis of the algorithm for calculating the service life. For determination of the service life for the area of short cracks we used Bilby, Cottrell and Swinden model which is based on the theory of continuously distributed dislocations and we complemented it with random generation of structure of material before cracks. For the long crack we have developed a stochastic model for determination of service life.