Indoor localization is currently of good interest concerning both business viability and end user experience. In this paper, we propose an accurate and robust step detection algorithm for smartphone based pedestrian dead reckoning (PDR) systems. The developed algorithm makes use of the acceleration measured from the smartphone and uses a statistical threshold based classification to detect the steps accurately. The statistical thresholds used are derived from extensive field trials with subjects of different age groups and found to provide good accuracy when used in real-time. For analyzing the performance of the proposed algorithm, we have implemented the algorithm on Android platform and performed extensive field trials. The analysis proves that the proposed algorithm identifies the user steps in real-time with an accuracy of more than 99% with minimum memory requirements. © 2018 IEEE.