Calculate payoff time for PV system I want to calculate the payoff time for a photovoltaic system. Some constants:
Current electricity price per kWh: 0,122 EUR
Electricity production per yearh: 4427 kWh
Annual electricity price increase: 5%
Feed rate into the power grid: 68%
Costs: 9.080 EUR  
How can I calculate the payoff time? I tried it with this formula but failed:
n = log(Kn/Ko)/log(q)
Kn = 9080
Ko = 0,122 * 4427 * 0,68
q = 1,05
The result is ~66 years, but it should be 17. Is the compound interest the wrong way?
 A: The costs are fix costs. They are payed at t=0. Interest rates and the inflation rate are not taken into account. 
The profit after n years is
$P=\left( \text{electricity per year [kWh]} \right) \times \left( \text{feed rate}\right) \times \left( \text{price per kWh}\right) \times \left( \text{future value annuity factor}\right)-\text{fix costs}$ 
$=4427\cdot 0.68\cdot 0.122\cdot \frac{1-1.05^n}{1-1.05}-9080 \geq 0$. 
Let $4427\cdot 0.68\cdot 0.122=x$ and $9080=y$. The equation becomes 
$x\cdot  \frac{1-1.05^n}{1-1.05}-y=0 \Rightarrow x\cdot  \frac{1-1.05^n}{1-1.05}=y$
multiplying both sides by $(1-1.05)$
$ x\cdot  (1-1.05^n)=y(1-1.05)$
$  (1-1.05^n)=\frac{y(1-1.05)}{x}$
$ 1.05^n=1-\frac{y(1-1.05)}{x} $
Taking logs
$n\cdot log(1.05)=log\left(1-\frac{y(1-1.05)}{x} \right)$
$n=\frac{log\left(1-\frac{y(1-1.05)}{x} \right)}{log(1.05)}$
If you insert the corresponding values, you get $\boxed{n\approx 16.49}$.
Since n is defined for natural numbers and you want to have no loss the result has to be rounded up.
