For stochastic PERT networks the main difficulty in calculating the probability distribution function (pdf) for project completion time is caused by structural and statistical dependence between activities. This paper presents a method for taking into account the structural dependence between activities and provides a generalized algorithm to evaluate the exact PDF for project completion time. The proposed procedure provides an exact pdf for project completion time when the duration times of activities are discrete. It can be applied for PERT networks with statistical dependence as well as structural dependent relationship between activities and can be applied for PERT networks with discrete or continues distribution. It has been tested using simple activity network models with different structural dependence between activities.