I am a begginner C# programmer working on a investment calculator as a personal project. I have not done much math in the last 15 years, please help.
The parameters are:
Principal - the original sum deposited in the account, lets say 1000
Interest - for example 5(%). This can be calculated monhly or yearly
Compound Interval - Years for the investment to grow, like 10 years
intervalsInAYear - how many times in a year the interest is calculated(12 for monthly)
Additional contribution, monthly or yearly, for example 100 per month
The equation below is what i got working, but it does not have the additional contribution:
$$endAmount = principal {\left( {1 + {{interest} \over intervalsInAYear }} \right)^{intervalsInAYear\:*\:compoundInterval}}$$