Today, with the increasing global demand for energy and, of course, hydrocarbons, the need to drilling more oil and gas wells is felt. One of the major problems that increase the cost and time Therefore, it is necessary to use a comprehensive geomechanical model to reduce consumed for drilling wells is the neglect of geomechanical problems. time and cost. Analysis of wellbore stability and determination of drilling mud safe window is used to select suitable mud weight to prevent formation failures like Breakout, the shear failure and formation failure, drilling mud losses and pipe stuck in due to the high hydrostatic influx due to low hydrostatic pressure of drilling fluid and also a tensile pressure of the mud After calculating the petrophysical properties of the formation and geo-mechanical parameters of the rock from the electric well-logging data, and using the FMS (Formation micro-Imager) diagram to find fractures and micro-fractures, the geo-mechanical zoning along the studied well in the Sarvak Formation was performed, It was divided into 10 zones. After stability analysis of the well-bore was performed by separating the zones constructing the initial model of the well and rock mass, using FLAC software, pressure than the pore pressure and continue up to the plastic wall movement identified using the Mohr-Coulomb failure criterion, initially for well without hydrostatic pressure. Then start again for the drilling fluid with less numerical parameter NYZA. The well-bore remains stable if NYZA parameter above and beyond. For each of the desired pressures, the area of the plastic area was calculated using AutoCAD software. The value obtained represents the becomes wider. remains smaller than the value one, using this parameter, the safe mud window is set. The analysis of the results shows that with increasing resistivity parameters and formation hardness factors the width of the safe mud window