Wellbore drilling is the main activity to access oil reservoirs for oil production. This study aimed at presenting a safe drilling mud window using two criteria for estimating the minimum and maximum drilling mud pressure in order to prevent tensile and shear failure in oil wells. To this end, data on oil wells was first collected. To calculate the lower limit of the mud window, the oil well was modeled at different drilling mud pressures with the help of the finite difference software FLAC2D. By plotting the normalized yield zone area (NYZA) versus the mud pressure, NYZA = 1 was considered as the shear failure threshold, the corresponding pressure to which was considered as the lower limit for the drilling mud weight. To calculate the upper limit of the mud window, the wellbore was modeled with the help of the finite element software, Abaqus. To this end, the drilling mud pressure was gradually increased, and according to the increase in the crack length in the borehole, the pressure causing tensile failure was considered as the upper limit of mud weight. Ultimately, two linear relationships were proposed using the multivariate linear regression analysis in SPSS. In the first relationship, the minimum drilling mud pressure to prevent a shear failure is estimated using pore pressure, minimum and maximum horizontal stresses, cohesion, and internal friction angle. The second relationship estimates the maximum drilling mud pressure to prevent a tensile failure using pore pressure, minimum and maximum horizontal stresses, and maximum and minimum tensile strengths. Combining these two relationships, a new correlation was obtained to estimate the optimal drilling mud pressure. As its main innovative aspect, this study aimed at providing a safe window for drilling mud using two criteria for estimating the minimum and maximum drilling mud pressures in order to prevent shear and tensile failures in oil wells in south Iran oilfields.