In this article, we present two distance-based sensor network localization algorithms. The location of the sensors is unknown initially and we can estimate the relative locations of sensors by using knowledge of inter-sensor distance measurements. Together with the knowledge of the absolute locations of three or more sensors, we can also determine the locations of all the sensors in the wireless network. The proposed algorithms make use of gradient descent to achieve excellent localization accuracy. The two gradient descent algorithms are iterative in nature and result is obtained when there is no further improvement on the accuracy. Simulation results have shown that the proposed algorithms have better performance than existing localization algorithms. A comparison of different methods is given in the paper.