As over-;charging and over-;discharging can cause damage to batteries, to guarantee the stability and duration of batteries, it is necessary to avoid being over-;charged and over-;discharged. Therefore, knowing the batteries' state of charge (SOC) is essential. In this paper, the author describes in detail the procedure of building a SOC estimation algorithm. The SOC estimation algorithm is based on unscented Kalman filter. Moreover, changes of battery capacity and internal resistance are considered. The impact of these changes on the estimation accuracy is explored. Experiments on an Iron Phosphate Li-;ion battery cell with real load were conducted to justify this method. This method was verified to be not only precise but also stable.