Titanium based alloy -Ti6Al4V and nickel based alloy -Inconel 718 belong to the group of difficult-to-cut materials. Thanks to their unique properties they can be used in constructions that need to withstand the high reliability requirements which are required inter alia in the aircraft industry. The physical properties of cutting layer, including residual stresses, play an important role during exploitation of products made out of difficult-to-cut materials. In the article, the method of residual stresses determination is described and the exemplary results of carried out studies are provided. Described method is based on the measurement of the defects in the crystal lattice. The carried out studies show that the state of residual stresses, in a subsurface layer, can be formed by the selection of machining conditions.