I know the no. of days that have elapsed between the payment made by A to B & the payment made by B to A which is 148. That divided by 365 will give the no. of years which is 0.4. I also know the rate of interest. So by using the compound interest formula i.e.

Amount=75000(1+5/100)^0.4

I get the interest using the formula

Interest=Amount-75000

I hope I am clear.

Thanks

Couple of things.

1) That may be "Compounded Annually". It depends on what you do next.

2) 148/365 = 0.405479. Rounding might make a difference.

--- $75,000 * 1.05^0.4 = $76,478.08

--- $75,000 * 1.05^0.405479 = $76,798.53 -- $20 more.

You'll have to decide what sort of precision is needed in your application.

3) You'll probably have to split things up a little more usefully.

14-09-2009 | 30,000.00 | |

27-01-2010 | | 75,000.00 |

25-02-2010 | 25,000.00 | |

25-02-2010 | 25,000.00 | |

25-02-2010 | 25,000.00 | |

25-02-2010 | 27,000.00 | |

08-03-2010 | | 20,000.00 |

10-03-2010 | | 20,000.00 |

The problem is that 14-09-2009 $30,000 never comes back as $30,000. Split it up like it does come back..

A to B

14-09-2009 $20,000 = P1Out

14-09-2009 $10,000 = P2Out ==> Total P1Out + P2Out = $30,000

25-02-2010 $10,000 = P3Out

25-02-2010 $15,000 = P4Out ==> Total P3Out + P4Out = $25,000

B to A

08-03-2010 $20,000 = P1In

10-03-2010 $10,000 = P2In ==> Total P1In + P2In = $30,000

10-03-2010 $10,000 = P3In

P4In will have to be on some other date.

P1Out to P1In will have its own interest charge.

P2Out to P2In will have its own interest charge.

P3Out to P3In will have its own interest charge.

There are other ways to proceed. This may prove sufficient.