# Calculate APY given start balance, end balance, and term

I'm having trouble figuring out the formula for calculating APY given a starting balance, ending balance, and term in length of years. What's the formula to do this?

The formula for APY is essentially solving the future value (or present value) formula for the rate:

``````    end_bal = start_bal * (1+APY)^N
==> (1+APY)^N = (end_bal/start_bal)
==> 1+APY = (end_bal/start_bal)^(1/N)
==> APY = (end_bal/start_bal)^(1/N) - 1
``````
• Thank you! And am I correct to assume that N is number of periods? Commented Dec 23, 2021 at 16:49
• Number of years. If you use compounding period other than years you'd need to adjust the formula slightly. Commented Dec 23, 2021 at 16:50

I decided to go with the solution a friend gave me, since it gives me continuous compounding:

• Note that your result is not exactly the APY. APY assumes annual compounding, not continuous. But you could easily convert your answer to annual compounding: `APY = e^r - 1`. Mathematically it ends up the same. Commented Dec 23, 2021 at 17:57
• What would what I have be considered technically? Commented Dec 23, 2021 at 18:05
• Technically, it’s continuous growth. That’s great for a lot of things, but not finance. Commented Dec 23, 2021 at 18:19
• What about estimating APY for a stock portfolio? Would that be continuous growth? Commented Dec 23, 2021 at 23:36
• I think continuous is the right answer to the question "what is the effective APY for an investment that went from \$a to \$b in t years". Commented Dec 24, 2021 at 0:56