Lithium ion batteries are widely used on many different applications, where the estimation algorithms of the state of charge (SOC) and state of health (SOH) are fundamental tools on the safety management of these batteries. However, the accurate estimation of those inner states is not simple under some circumstances, such as after rest times. This work provides improved SOC and SOH estimators by considering the effect that the rest periods have on the battery behavior. On one hand, rest times can generate a voltage relaxation effect. The voltage response of the battery changes without an energy change on the SOC, which can bias the SOC estimator. On the other hand, rest times can generate a capacity recovery effect. The dischargeable capacity increases instead of decreasing, which can bias the SOH estimator. At the same time, the generated error on the SOH estimator biases as well the SOC estimator. The generated bias on both cases is solved by incorporating knowledge about the effect the rest time has on both estimators. The capacity recovery effect and the voltage relaxation effect of a lithium ion battery are reproduced and discussed. For that, a specific aging test matrix is developed and tested on a lithium ion battery. The designed aging test matrix contains tests cycled at operation conditions mixed with different rest periods. The voltage relaxation effect is expected to appear on rest times smaller than the time the battery requires to change its state to an equilibrium state. In contrast, the capacity recovery effect is expected to appear on longer rest periods. Typically, it is assumed that a lithium ion battery requires in between 3h to 8h to change its state to an equilibrium state. Therefore, tests are done with rest times of 1h, 8h and 48h. The results with a 1h and 8h rest time have shown that the voltage relaxation effect is present. In contrast, the results with a 48h rest time have shown unexpectedly that the tested battery does not experience any capacity recovery effect. Instead, the battery experiences a momentary capacity decrease on the first cycle after rest times of 48h. A voltage profile evaluation on this phenomenon has shown that the stoichiometry of the electrodes of the battery has changed. Motivated by this, the deconvoluted voltage profiles of each electrode (Half-Cell data) have been obtained by running additional tests on coin cells built with samples of both electrodes. Then, the shift on the stoichiometric value of the electrodes has been quantified. The results show that the bias generated by the rest periods is eliminated on the improved SOC and SOH estimators.