So I've been having a hard time finding a formula that calculates savings annuity but where there is already a balance on the account (e.g. the payment per term changes after 10 terms, so I calculate the first 10 terms with 0 dollars already on the account and the i take the result(the future value) from that and set that as the base value of the next calculation with a different payment per term)
I've gotten it to work in Excel, but in a really bulky version where you have a row for each term and it's really inefficient.
I also have a more efficient version written in Python:
# Current balance
s = 188228.536644988
# Payment per term
y = 10000
# Interest rate
r = 0.045
# Number of terms
n = int(input("# of terms: "))
a = s
for x in range(0,n):
a = a*(1+r)+y
# Print future value to console
print(a)
Hope some of guys know how to do it.
Any help is appreciated.
Thanks