The calculation in one line
The payback period is the investment divided by the annual net return. The net return is the annual saving less the running costs of the unit. The result states after how many years the money invested has been earned back.
An example with assumed figures that are not market prices: investment including installation 30,000 euros, annual saving 14,000 euros, running costs 2,000 euros. The net return is 12,000 euros, the payback period two and a half years.