To solve the problem of low localization accuracy in traditional DV-Hop, an improved localization algorithm in WSN was proposed. The algorithm proposed three improvements, including a new calculation of distance from anchor nodes to unknown nodes, the concept of confidence level of anchor nodes, and coordinate calculation of unknown nodes by using Weighted Least Square Estimates. Results of the Matlab simulation showed that the improved algorithm reduces the location error by distance calculation effectively and has better performance in localization accuracy at the same network environment.