In economics, there are two types of interest: simple interest and compounded interest. In commercial banks, the compounded interest is used. The equation for compounding interest is
F = P(1+i)^n
where
F is the future worth
P is the present worth
i is the interest rate
n is the time
You should not that the units for i and n must be consistent. If you use n in years, the i must be in percent per year compounded yearly. But since the given interest is given quarterly, we have to convert this first from nominal interest rate, r, to effective interest rate, i,eff:
i,eff = (1 + r/m)^m - 1, where m is the number of quarters in 1 year. That would be 4. Substituting the values
i,eff = (1 + 0.036/4)⁴ - 1 = 0.0365
We use this to the first equation where n=30 years
F = $5,140.17(1 + 0.0365)³⁰
F = $15,068.04
Thus, after 30 years, the money would be worth $15,068.04. The interest earned is equal to:
Interest earned = $15,068.04 - $5,140.17
Interest Earned = $9,927.87