How to Calculate the time of Charging and Discharging of battery?
Discharge time is basically the Ah or mAh rating divided by the current.
So for a 2200mAh battery with a load that draws 300mA you have:
\$\frac{2.2}{0.3} = 7.3 hours\$*
The charge time depends on the battery chemistry and the charge current.
For NiMh, for example, this would typically be 10% of the Ah rating for 10 hours.
Other chemistries, such as Li-Ion, will be different.
*2200mAh is the same as 2.2Ah. 300mA is the same as 0.3A
Charging of battery: Example: Take 100 AH battery. If the applied Current is 10 Amperes, then it would be 100Ah/10A= 10 hrs approximately. It is an usual calculation.
Discharging: Example: Battery AH X Battery Volt / Applied load. Say, 100 AH X 12V/ 100 Watts = 12 hrs (with 40% loss at the max = 12 x 40 /100 = 4.8 hrs) For sure, the backup will lasts up to 4.8 hrs.
Discharge rates are well enough covered here.
LiIon / LiPo have almost 100 current charge efficiency but energy charge efficiency depends on charge rate. H=Higher charge rates have lower energy efficiencies as resistive losses increase towards the end of charging.
Below LiIon and LiPo are interchangeable in this context.
The main reason to adding an answer to a 3+ year old question is to note that:
LiIon / LiPo should not be charged at above manufacturers spec. This is usually C/1, sometimes C/2 and very occasionally 2C. Usually C/1 is safe.
LiIon's are charged at CC = constant current = <= max allowed current from 'empty' until charge voltage reaches 4.2V. They are then charged at CV = constant voltage = 4.2V and the current falls under battery chemistry control.
Charge endpoint is reached when I_charge in CV mode falls to some preset % of Imax - typically 25%. Higher % termination current = longer cycle life, lower charge time and slightly less capacity for the following discharge cycle.
When charged from "empty" at C/1 a LiIon cell achieves about 70% - 80% of full charge in 0.6 to 0.7 hours ~= 40 to 50 minutes.
The CV stage typically takes 1.5 to 2 hours (depending on termination current% and other factors) so total charge time is about 40m +1.5 hours to 50 minutes +2 hours or typically 2+ to 3 hours overall. But, a very useful % of total charge is reached in 1 hour.