This paper focuses on the state of charge estimation (SOC) for battery Li-ion. By modeling a battery based on the equivalent circuit model, the extended Kalman filter approach can be applied to estimate the battery SOC. An electrical battery model is developed in Matlab, Where the structure of the model is detailed by equations and blocks. The battery model has been validated from the experiment results. The comparison shows a good agreement in predicting the voltage, SOC estimation and the model performs better in SOC estimation.