There are many applications for using wireless sensor networks (WSN) in ocean science; however, identifying the exact location of a sensor by itself (localization) is still a challenging problem, where global positioning system (GPS) devices are not applicable underwater. Precise distance measurement between two sensors is a tool of localization and received signal strength (RSS), reflecting transmission loss (TL) phenomena, is widely used in terrestrial WSNs for that matter. Underwater acoustic sensor networks have not been used (UASN), due to the complexity of the TL function. In this paper, we addressed these problems by expressing underwater TL via the Lambert W function, for accurate distance inversion by the Halley method, and compared this to Newton-Raphson inversion. Mathematical proof, MATLAB simulation, and real device implementation demonstrate the accuracy and efficiency of the proposed equation in distance calculation, with fewer iterations, computation stability for short and long distances, and remarkably short processing time. Then, the sensitivities of LambertWfunction and Newton-Raphson inversion to alteration in TL were examined. The simulation results showed that LambertWfunction is more stable to errors than Newton-Raphson inversion. Finally, with a likelihood method, it was shown that RSS is a practical tool for distance measurement in UASN.