Ct = net cash inflow during the period t
Co= total initial investment costs
r = discount rate, and
t = number of time periods
To calculate IRR using the formula, one would set NPV equal to zero and solve for the discount rate r, which is here the IRR. Because of the nature of the formula, however, IRR cannot be calculated analytically, and must instead be calculated either through trial-and-error or using software programmed to calculate IRR.