The formula is: NPV = ∑ {After-Tax Cash Flow ÷ (1+r ... Use What-If analysis, a built-in calculator in Excel, to solve for the discount rate that equals zero. Take our NPV/IRR example.