There a few misconceptions about the IRR calculation. The major one is that IRR automatically assumes that all cash outflows from an investment are reinvested at the IRR rate. IRR is the "internal rate of return" with "internal" meaning each dollar in an investment. It makes no assumptions about what an investor does with money coming out of an investment. Whether the investor gives it away or puts it in a coffee can, the IRR stays the same.
It does however have a few drawbacks. First, IRR is not made to calculate negative cash flows after the initial investment. If an investment has an outflow of $1,000 in year three and an IRR of 30%, the $1,000 is discounted at 30% per year back to a present value. You would have to put this PV amount in an investment earning 30% per year for the IRR to reflect the true yield. Also, IRR ignores the reinvestment potential of positive cash flows. Since most capital investments will have intermediate positive cash flows, the firm will need to reinvest these cash flows, and the firm's cost of capital is a reasonable proxy for the return to be expected. Investments with large or early positive cash flows will tend to look far better with IRR than with MIRR for this reason.
To illustrate: a firm has investment options with returns that are generally moderate. An unusually attractive investment opportunity comes up with much higher return. The cash spun off from this latter investment will probably be reinvested at the moderate rate of return rather than in another unusually high-return investment. In this case, IRR will overstate the value of the investment, while MIRR will not.
Formula MIRR is calculated as follows:
where n = i + j