The best thing to do is to ask your IP to do this for you, as they have detailed knowledge of your case.
One way of doing the calculation would be to calculate how many more payments you have to make, and then discount the fees which would not have to be charged if you were to settle early - but this is best carried out by your IP.