Although there have been many studies about lung sounds, a commercial product has not yet been developed that can recognize these sounds automatically. Firstly, endpoint of these sounds should be clearly defined in order to be automatically recognized in real time. Thus, studies could be conducted on that effort to reach the outcome of lung sounds will be made available for automatically classified in real time using with the appropriate features and classification methods. In this paper, a new method has been proposed for finding the endpoints of healthy and pathological lung sounds. Changes according to the time and energy spectrum density in a suitable frequency range of lung sound signals have been utilized and endpoints of lung sounds have been determined with Dynamic Time Warping method successfully. As we investigated in the literature, a suitable and successful method for determining the endpoints of recorded several lung sounds in single channel have been proposed for the first time.