Hi Seema,
Irregular payments means you are giving through IT 0008 with normal payroll process or you are doing irregular payments with off-cycle payroll ?
if you are doing with regular payroll process we cant calculate what you want. if you are doing through off-cycle it can be done with function INBTD process.
give some inputs regarding this, then i can help you.
Regards.