When structures undergo extreme loading conditions, the materials pass the elastic limits. Therefore, to preserve economy as well as safety, it is essential to perform a realistic elastoplastic analysis using the constitutive equations in plasticity. On the other hand, computing the stress alongside its associated variables on Gauss points is a delicate process and virtually the most important part of these analyses. In this study, an efficient stress-updating technique is presented for the constitutive rate equations of the pressure sensitive materials such as concrete, rock, soil and some kind of metals. Accordingly, the Drucker–Prager plasticity is utilized to consider the hydrostatic pressure in addition to the J2-invariant of the deviatoric stress. Moreover, the isotropic and kinematic hardenings are used to take into account more realistic behavior of the materials. Finally, a wide range of numerical tests is carried out to show the performance of the presented method together with the application of the suggested formulations in elastoplastic analysis of a gravity dam.