Sounds like a compounding problem with the interest. As there are several
possible scenarios in which you could be working, it is difficult to post an
effective solution.
If you post some more information, including the formulae you are using, it
will be easier for someone to provide assistance.