State of charge (SoC) is an important parameter for li ion battery (LiB) cells, and its estimation should be done online as its continuous operation before recharge depends on its SoC. While Coulomb counting method (also called Coulometry) is useful to estimate the SoC online, its accuracy depends on the value of its initial maximum capacity. Presently, this capacity is obtained by the periodic discharge of the cell fully but this can introduce damage to the cell and shorten its lifespan. In this work, an electrical model is developed for LiB cells based on the principle of electrochemistry from its discharge curve (i.e. the change in terminal voltage over time within a discharge cycle). This model is able to compute the internal parameters of a cell, including its maximum initial capacity at the beginning of each discharge cycle. With the internal parameters computed, it can also produce its Nyquist plot and the plot is found to agree well with its experimental electrochemical impedance spectroscopy (EIS) spectra. With this model, the status of a LiB cell and its maximum charge capacity can be determined in real time.