Today, the elderly population is increasing and they endure many drawbacks, especially defects in their knee joints which lead to improper gait. To solve this problem, their knee joint can be replaced with knee arthroplasty. In this letter, the level of improvement in the human gait before and after total knee arthroplasty (TKA) surgery is investigated using the Dynamic Time Wrapping (DTW) algorithm. For this purpose, several volunteers who have problems with their knees incorporate in a test before and after TKA surgery, and data of gait analysis is collected. Then, the obtained data is compared with a reference using the DTW algorithm. The outcome results illustrate an improvement of 89\% - 97\% by the proposed algorithm after TKA surgery. Therefore, patients can see improvement with high speed and accuracy that result in more promising for using TKA surgery.