As wireless communication technology develops, services using user’s location information are also increasing and becoming important. Among many technologies that can measure position, ultra wideband (UWB) is being used in many fields of robot and human positioning systems. A high-precision technology using UWB can find targets with an error of a few centimeters, from industrial robot operations to drones used in search and rescue operations. In this paper, indoor positioning is performed using UWB boards in line of sight (LOS) and non line of sight (NLOS) situations. With the long short-term memory (LSTM) Deep Learning Algorithm, we propose a method for compensating location errors and predicting a more accurate location. In the LOS situation, the location was measured based on fingerprinting using four anchors and tags. The measured distance values were classified into training and test dataset. By applying these distance values to the LSTM, it was confirmed that the position error was compensated. In the NLOS situation, the quality factor was measured for each obstacle by placing four types of obstacles (no obstacles, metal, mirror, multipath) between the anchor and the tag at a distance of 4 meters. By applying the measured values to the LSTM, it was confirmed that the position error was compensated by detecting an abnormal signal occurring in the UWB board. Finally, the experimental results show that the proposed method can provide more accurate position compensation and prediction in LOS and NLOS environments.