Casing wear is an essential and complex phenomenon in oil and gas wells. Research is being conducted to predict this phenomenon. This study was conducted at a well in southwestern Iran. In this paper, first examine the force exerted on the drill string. Next, the contact force between the drill string and the casing is calculated. Finally, the wear volume and the depth of the wear groove are determined. These calculations were performed using MATLAB and Python software. In addition, due to the high accuracy of coding, mud log data was used to make the results more accurate. It has also been shown that increasing RPM increases the depth of wear and attempts to drill a highly deviated wells as a sliding mode. Finally, compared the results and matched them with the wireline logs recorded from the well.