Abstract One of the main problems facing accurate location in wireless communication systems is non-line-of-sight (NLOS) propagation. Traditional location algorithms are based on classical techniques under minimizing a least-squares objective function and it loses optimality when the NLOS error distribution deviates from Gaussian distribution. An effective location algorithm based on a robust objective function is proposed to mitigate NLOS errors. The proposed method does not require the prior knowledge of the NLOS error distribution and can give a closed-form solution. A comparison is performed in different NLOS environments between the proposed algorithm and two additional ones (LS method and Chan's method with an NLOS correction). The proposed algorithm clearly outperforms the other two.