Because there are always non-line-of-sight effects in signal propagation, researchers have proposed various algorithms to mitigate the measured error caused by non-line-of-sight. Initially inspired by flocking birds, particle swarm optimization is an evolutionary computation tool for optimizing a problem by iteratively attempting to improve a candidate solution with respect to a given measure of quality. In this article, we propose a new location algorithm that uses time-of-arrival measurements to improve the mobile station location accuracy when three base stations are available. The proposed algorithm uses the intersections of three time-of-arrival circles based on the particle swarm optimization technique to give a location estimation of the mobile station in non-line-of-sight environments. An object function is used to establish the nonlinear relationship between the intersections of the three circles and the mobile station location. The particle swarm optimization finds the optimal solution of the object function and efficiently determines the mobile station location. The simulation results show that the proposed algorithm performs better than the related algorithms in wireless positioning systems, even in severe non-line-of-sight propagation conditions.