Internal rate of return -- or IRR -- is the discounted cash flow rate of return and is used to determine the profitability of different projects. The internal rate of return on a project that produces cash flows over time is the interest rate that makes the net present value of the cash flows equal to zero.

Calculate the Net Present Value (NPV) using the following formula:

N

Sum C[i]/(1+d)^t[i] = NPV(C, t, d)

i=0

in which d is the estimated discount rate, C[i] is the i-th cash flow, N is the total number of cash flows + 1 and t[N] is the total length of time under consideration.

Determine whether your cash flows are negative or positive by identifying the direction of cash flow. If the cash flows into the project, it can be given a positive sign for the calculation. If the cash flows out of the project, it can be given a negative sign for the calculation.

Calculate IRR iteratively using the trial-and-error method by setting NPV(C,t, IRR) = 0. Pick a value for IRR and plug it into the NPV calculation. If NPV doesn't equal to zero with this value, keep picking values iteratively until NPV is as close to zero as possible.

Repeat the calculation for different assumed discount rates to get a more accurate view of the value of IRR over a range of possible discount rates.