The smartphone-based Wi-Fi fine time measurement (FTM) technique has provided a new approach for Wi-Fi-based indoor location on mobile phones since the 2018 release of the Google Android Pie system, which supports the IEEE 802.11-2016 protocol and can directly measure the distance between the initiator and the responder. This paper studies in detail the properties of mobile phone Wi-Fi ranging and positioning performance. Considering non-line-of-sight (NLOS) error identification, a real-time ranging error compensation model based on the least-squares (LS) method and an adaptive Wi-Fi FTM positioning algorithm (AWFP) utilizing the weighted least-squares (WLS) method are devised. To improve accuracy, a new tightly coupled fusion positioning algorithm integrating Wi-Fi FTM and built-in mobile phone sensors based on the extended Kalman filter (EKF) is constructed. The experimental results show that the ranging precision and Wi-Fi positioning accuracy are improved. Based on the high-precision Wi-Fi ranging and positioning results, the final location accuracy of the proposed fusion method is 0.98 m, and the root-meansquare error (RMSE) is 1.10 m, which are better than those of the PDR, Wi-Fi FTM and loosely coupled PDR/Wi-Fi FTM integration based on the EKF. INDEX TERMS Indoor positioning, Wi-Fi FTM, pedestrian dead reckoning, tightly coupled, ekf.