Objective of the present work is to model EDM process using ANSYS software, and to investigate the eﬀects of most signiﬁcant machining parameters (pulse current and pulse duration) on the residual stresses developed in the beneath the spark produced by a single spark. The workpiece material is AISI D2 tool steel. The FEA model is then used to study the relation between these parameters and maximum temperature attended at the end of heating cycle along with residual stress produced at the end of cooling cycle. To establish the residual stresses in the work piece during EDM, the temperature distribution at the end of pulse duration in the work piece has to be estimated ﬁrst, latter on after cooling the residual stress is determined. In addition, residual stress which is the main aspect responsible for component failure, and the location of tensile peak stress, at the end of cooling cycle are investigated.