This paper proposes a low-complexity online state of charge estimation method for LiFePO4 battery in electrical vehicles. The proposed method is able to achieve accurate state of charge with less computational efforts in comparison with the nonlinear Kalman filters, and also can provide state of health information for battery management system. According to the error analysis of equivalent circuit model with two resistance and capacitance, two proportional-integral filters are designed to compensate the errors from inaccurate state of charge and current measurements, respectively. An error dividing process is proposed to tune the contribution of each filter to the finial estimation results, which enhances the validation and accuracy of the proposed method. Recursive least squares filter can provide the state of health information and updates the parameters of battery model online to eliminate the errors caused by parameters uncertainty. The proposed method is compared with extend Kalman filter in regards to accuracy and execution time. The execution time of the proposed method is measured on Zynq board platform to validate its suitability for online implementation. In this paper, the proposed method is able to obtain less than 1% error for state of charge estimation.