This paper focuses on real-time estimation of Li-ion State of Charge (SoC). A first-principles model validated by experimental data from literature is chosen to mimic a real Li-ion cell. Its impedance responses at different SoCs are studied by a simulated electrochemical impedance spectroscopy (EIS). An equivalent circuit model is developed for estimator design in which the parameters (including lumped series resistances R-1, lumped interfacial resistances R-2 and time constant tau) are derived from system identification and compared with the EIS results. The estimator is designed using extended Kalman filtering (EKF) and is implemented in the first-principles model. It is demonstrated by computer simulation that the SoC during charge/discharge cycles can be estimated with a relative error <3%. The accuracy of SoC tracking is improved if it is jointly estimated along with either R-1 or R-2 given that these model parameters vary with SoC as revealed by EIS. (C) 2016 Elsevier Ltd. All rights reserved.