It is well known that, as a result of the nonlocal nature of impact ionization, the noise of avalanche photodiodes decreases as the thickness of the multiplication region is reduced. In this paper, we present an alternative technique to calculate the gain distribution, including the dead-space effect, by numerical solution of the recursive equations. This method yields the average gain, the multiplication noise, and gain distribution curves. The results are compared with simple Monte Carlo simulation and the Z-transform technique.