Now we're talkin'. The notation is a little rough, but I think I have it.
You must be careful with the interest rates, but even a good guess will get you in the ballpark. Generally, you are given an annual rate. It should be called "APR" or "Nominal". If this is so, there is no problem using a variant of this formula.
Here's the general version:
n = Number of
Years
m = Number of Periods per year
i = Annual Nominal Interest Rate
It's an easy enough cut-and-past task. I'll just type in a bunch...
Annual: m = 1 -- After a little algebra, this should look familiar.
Semi-Annual: m = 2
Quarterly: m = 4
Monthly: m = 12
Weekly: m = 52
Daily: m = 365 (You may want 360 or 366, sometimes.)