If you know the balance after a certain number of years, and you know how often the interest is compounded, you can figure out the interest rate. For example, suppose you invest $1000 into an account for 5 years where interest is applied monthly. After 5 years, the balance is $1283.36
Then:
A = 1283.36
P = 1000
r = UNKNOWN
n = 12 (times per year)
t = 5 (years)
1283.36 = 1000(1 + r/12)^(60)
To solve for r, divide by 1000
1.28336 = (1 + r/12)^60
Then take the 60th root:
(1.28336)^(1/60) = 1 + r/12
1.0041667 = 1 + r/12
Subtract 1:
0.0041667 = r/12
Solve for r:
0.0500004 = r
So r ≈ 0.05 or 5% annual percentage rate.
I hope this helps!