Here's how I calculate the return of paying down your mortgage to get rid of PMI:

You need both the payment schedule for paying off PMI early and the payment schedule for not paying off PMI early. The schedule should extend to the end of your mortgage using the more time consuming method. That may be triggered by refinancing the mortgage, paying the whole mortgage off, or selling the house. Consider the difference between the two schedules as a series of cash flows. If there is a difference in equity between the two schedules at the end of the mortgage, consider this an additional cash flow. Find the internal rate of return for the series of cash flows.

For instance, if I consider you paying $400 extra per month towards your principle for the duration of PMI only, then you would have an internal rate of return of 3.557% over the 5 year term. Since neither schedule would be rid of PMI yet in that scenario, you would only really be benefiting from the rate of the mortgage. The same scenario over 7 years has a 5.659% internal rate of return. Here we see more of a benefit since PMI has been paid off in the abbreviated schedule, so extra cash is freed over the slower pay-off schedule. However, if we look at this scenario over 20 years, then the internal rate of return re-approaches the rate of the mortgage at 4.524%. Over the full 30 year term of the mortgage, the cumulative return would be 4.241%.

Your numbers will be different than mine above since I just assumed a scenario for the purpose of illustration, but they will follow the same approximate pattern.