Abstract—Pedestrian dead reckoning (PDR) with three 3-axis sensors are used to localize moving subjects for indoor localization. However, due to the complex influences in indoor environment, the accuracy of localization is not ideal. In this paper, we develop a reliable algorithm called Inertial Sensors and WIFI Signal Based Algorithm (ISW). We will show how accurate and ubiquitous tracking of a user can be performed using inertial sensors embedded in the smart phones with the help of WIFI signals. For the detection of steps we use build-in 3D acceler-ometer sensors and we set up a Step Mapping Module and utilize WIFI signals to automatically calculate the step length when the user is walking. Moreover, to tackle the challenges of drifting during estimation, our work can also detect the orientation of pedestrians based on magnetic field sensor and the additional integration of the gyroscope. The experiments show the improvement of tracing accuracy compared to other traditional indoor localization algorithm like DTW and Zee under the influence of nearby ferromagnetic interference in many complex indoor environments.