Trying to calculate FV with annual & monthly fees First question on here so please go easy if it's a stupid one!
I have created a PHP based FV calculator for use on a client's website. This is the scenario:
They offer returns of 3% per month based on a variable investment amount (for argument's sake, let's say $10,000). Return is calculated monthly so my formula is:
$$
FV = PV (1 + i)^n
$$
This works fine. The problem I have is that they charge fees both annually (let's say $1,000) and monthly (say, $60).
I have tried just adding the fees up and taking them from the FV figure but this is obviously wrong as the fees would affect the amount calculated each month and year.
How would I calculate the amount of fees paid and the net profit?
 A: I guess it depends on when the fees are taken.  For example, when the fees are taken at the beginning of the month and year, you could have, in one year,
$$FV = (\cdots (((PV-m)(1+i)-m)(1+i)-m)(1+i) \cdots -m)(1+i) - y (1+i)^{12} $$
where $m$ and $y$ are the monthly and yearly fees, respectively.  Note that I am using the future value of the annual fee, as you stated that it is charged at the beginning of the year.  Expanding out the expression, you get
$$FV = (PV-y) (1+i)^{12} - m \sum_{n=1}^{12} (1+i)^n = (PV-y) (1+i)^{12} - m (1+i) \frac{(1+i)^{12}-1}{i} $$
Using your numbers, I get $FV = \$ 11,954.80$.
You can then use this future value as a present value one year later to continue the calculation.
I should add that, to compute the fees after one year, simply take the original future value of the initial deposit of $ \$ 10000 $, which is $ PV (1+i)^{12} = \$14,257.60$, then subtract your $FV$ above to get that you paid, in this one year, about $ \$ 2302.83$ in fees, for a net profit of $ \$ 1954.80$.  
On the other hand, if you do not pay the annual fee until after the first year, then 
$$FV=PV (1+i)^{12} - m (1+i) \frac{(1+i)^{12}-1}{i} -y \approx \$ 12,380.50$$
which implies $\$1877.07$ in fees and a profit of $\$2380.50$.
