How do You Calculate Irr?

The irr calculation is used to derive the value of r, and then given the net series of benefits (i), the equation yeilds zero and the NPV. The calculation is performed iteratively. A computer program guesses the value of r and continues unitl the equation yeilds zero or close to zero as it can get.