Compound interest question

SithSolo1

Diamond Member
Mar 19, 2001
7,740
11
81
Ok

Say you deposit $2000 annual(meaning each year I put another in $2000) into a savings account that compounds annually at 10% and you want to know what the amount would be after 5 years. What would the formula look like?

 

KMc

Golden Member
Jan 26, 2007
1,149
0
76
That's only if he never deposits any more money. He is asking what happens if he keeps putting in $2,000 each year on top of that.
 

SithSolo1

Diamond Member
Mar 19, 2001
7,740
11
81
grrr, thats the one I use but my application isn't working correctly. It spits out $3,221.02 at the end of 5 years instead of $12,210.20 which I think is the correct answer.


'Declare variables and constants
Const decRATE As Decimal = 0.1D
Dim intYears As Integer
Dim decAnnualDeposit, decAmount As Decimal

'Calculate and display the account value at the end of each term

decAnnualDeposit = Convert.ToDecimal(Me.txtAnnualDeposit.Text)

For intYears = 5 To 30 Step 5

decAmount = Convert.ToDecimal(decAnnualDeposit * ((1 + decRATE) ^ intYears))
Me.lblValue.Text = Me.lblValue.Text & "At the end of " & intYears.ToString & " years: " & _
decAmount.ToString("C2") & ControlChars.NewLine

Next intYears



Edit:
Originally posted by: KMc
That's only if he never deposits any more money. He is asking what happens if he keeps putting in $2,000 each year on top of that.


Yes, that is what I am after
 

KMc

Golden Member
Jan 26, 2007
1,149
0
76
End of Year 1 = 2000(1.10) = 2200
End of Year 2 = (2200+2000)(1.10) = 4620
End of Year 3 = (4620+2000)(1.10) = 7282
End of Year 4 = (7282+2000)(1.10) = 10,210.20
End of Year 5 = (10,210.20+2000)(1.10) = 13,431.22
 

Anubis

No Lifer
Aug 31, 2001
78,712
427
126
tbqhwy.com
Originally posted by: SithSolo1
grrr, thats the one I use but my application isn't working correctly. It spits out $3,221.02 at the end of 5 years instead of $12,210.20 which I think is the correct answer.


'Declare variables and constants
Const decRATE As Decimal = 0.1D
Dim intYears As Integer
Dim decAnnualDeposit, decAmount As Decimal

'Calculate and display the account value at the end of each term

decAnnualDeposit = Convert.ToDecimal(Me.txtAnnualDeposit.Text)

For intYears = 5 To 30 Step 5

decAmount = Convert.ToDecimal(decAnnualDeposit * ((1 + decRATE) ^ intYears))
Me.lblValue.Text = Me.lblValue.Text & "At the end of " & intYears.ToString & " years: " & _
decAmount.ToString("C2") & ControlChars.NewLine

Next intYears



Edit:
Originally posted by: KMc
That's only if he never deposits any more money. He is asking what happens if he keeps putting in $2,000 each year on top of that.


Yes, that is what I am after

then you simplay add 2000+ to your equation as stated above
 

SithSolo1

Diamond Member
Mar 19, 2001
7,740
11
81
Originally posted by: Anubis
then you simplay add 2000+ to your equation as stated above

I have no idea how to code it to do that. Oh well, guess I'll find out in class.

Thank you all for your quick responses.

btw I said $12,220.20 was the correct answer because that is the answer given on the image of the form the teacher printed out for $2000 a year. I have no idea if it is actually correct.
 

KMc

Golden Member
Jan 26, 2007
1,149
0
76
Your professor is applying the interest at a different time than my example above. I applied it at the end of the current period, he is applying it at the beginning of the next.

End of current period method:
End of Year 1 = 2000(1.10) = 2200
End of Year 2 = (2200+2000)(1.10) = 4620
End of Year 3 = (4620+2000)(1.10) = 7282
End of Year 4 = (7282+2000)(1.10) = 10,210.20
End of Year 5 = (10,210.20+2000)(1.10) = 13,431.22

Beginning of next period method:
Beginning of Year 1 = 2000
Beginning of Year 2 = (2000)(1.10)+2000 = 4200
Beginning of Year 3 = (4200)(1.10)+2000 = 6620
Beginning of Year 4 = (6620)(1.10)+2000 = 9282
Beginning of Year 5 = (9282)(1.10)+2000 = 12,210.20

You can see how it makes a big difference to understand how the interest compounds on an investment.
 

txrandom

Diamond Member
Aug 15, 2004
3,773
0
71
End of year:
2000*1.1^0 + 2000 * 1.1^1 + 2000 * 1.1^2 + 2000 * 1.1^3 + 2000 * 1.1^4 = 12210.2

Beginning of year:
2000*1.1^1 + 2000 * 1.1^2 + 2000 * 1.1^3 + 2000 * 1.1^4 + 2000 * 1.1^5 = 13431.22
 

duragezic

Lifer
Oct 11, 1999
11,234
4
81
Easy way to express the future value of some uniform amount deposited at the end of each time period at interest i: (F/A, i, n) (you would read "F/A" as "Find F given A")

F = A[((1+i)^n - 1) / i]

so

F = 2000[((1.10)^5 - 1 / .1] = 12210.20

So you can use whatever the inside part evaluates to at a given i and n for any A (yearly deposit). In this case, it is 6.1051, so you can quickly compute the future value F of any A at that interest and amount of time.

I thought you were to assume end of time period if not otherwise specified, but that might be wrong. What I wrote above is for end of time period.