A battery calculating method, apparatus, and program are provided. The
battery capacity calculating method and apparatus can very accurately
calculate a residual capacity of a secondary battery especially in the
last stage of discharging independently of environmental conditions such
as a temperature or a deteriorated state. the battery capacity
calculating apparatus is equipped with a voltage measuring circuit which
measures the terminal voltage (V.sub.mea) of a battery at the time of
discharging, a current measuring circuit which measures the current value
(I) of the battery at the time of discharging, and a control circuit
which calculates a residual capacity and/or residual power. The operation
unit in the control circuit calculates a discharged capacity (Q.sub.mea)
and an apparent discharged capacity (Q.sub.ocv) based on a terminal
voltage (V.sub.mea) and a current value (I) measured by the voltage
measuring circuit and the current measuring circuit, respectively,
estimates a discharge curve (C.sub.pre) in the future including the last
stage of discharging based on a capacity shift (.DELTA.Q) being the
difference between the discharged capacity (Q.sub.mea) and the apparent
discharged capacity (Q.sub.ocv) during discharging, and calculates the
residual capacity and/or the residual power of the battery based on the
estimated discharge curve (C.sub.pre).