Might just be missing something, but how exactly are you calculating this?
You can calculate the monthly payment amount for a 1% loan in OpenOffice Calc using the payment function.
10 year payment =PMT(1%/12;10*12;100000)= -$876.04
30 year payment =PMT(1%/12;30*12;100000)= -$321.64
The amount in your account from investing the difference for 7 years, 5 months at 4% can be found using the future value function.
=FV(4%/12;(7+5/12)*12;-876.04+321.64) = $57,331.21
The monthly investment payout (interest plus some principal) that would deplete the investment on the last 30-year loan payment, starting at 7 years, 5 months is given by
=PMT(4%/12;(30-(7+5/12))/12;57331.21) = $321.63
Notice that this is the same as the 30 year payment, minus a penny. So, if you pay your mortgage off with monthly payments of $876.04, it will take you ten years, but if instead you put $321.64 into your mortgage and invest $554.40, you can stop at 7 years, 5 months, and then pay the rest of your mortgage from the investment account one month at a time for the next 22 years, 7 months.
You could solve for the 7 years, 5 months, but I did it by trial-and-error.
If you want to be more conservative, use [inflation+]3% for the rate of return. It still ends up shaving 2 years off of your 10-year schedule, and the FIREcalc success rate goes up to 96%.
It's an interesting exercise that shows that paying off low interest debt doesn't make sense from a financial perspective, and it frames the question in terms of time rather than money.
(Note: I messed up the FIREcalc part of this analysis; see below.)