This document explores the use of an Extended Kalman Filter (EKF) algorithm to accurately estimate the state of charge (SOC) of lithium-ion batteries under various operating conditions. The proposed second-order resistance-capacitance (RC) battery model combined with the EKF demonstrates significant improvements in SOC estimation accuracy, with errors ranging from 0.30% to 2.47%, outperforming conventional methods. The findings suggest that the EKF-based approach can enhance battery management and contribute to the development of more reliable energy storage systems.