how to calculate the duty ratio of L4981???

How exactly do you want to connect the L4981 in a battery charger?

The chip is a boost power-factor-correction circuit, and is normally used to convert 120/230V input mains to 400V dc, while keeping the input current from the mains at close to a power factor of one.

I use the L4981B as the PFC stage in a 300W off-line SMPSU that I have designed here at work. It seems a strange chip to use as part of a battery charger.
 
The duty cycle output of a PFC chip varies; follows the 120Hz/100Hz full wave rectifier output, so that the input current flows for (most of) the whole AC power cycle, not just on peaks. For a 240VAC input, when the AC input voltage is at 45º, the duty cycle will be about 30%, falling to near zero% at the 90º peak. With lower voltage input, the duty cycle is higher. The PFC circuit dumps a constant ~400VDC through a single diode to the main input storage capacitor. That is then the input for another switcher, the one that produces useable voltages like 12V, 5V etc.

If you haven't already, download the ST pdf data and study the specs and examples.
Steve