I think the factors determining pre-pay vs invest include: income level, stability of income, state of residence (property & state income taxes), AMT threshold and AMT exemption phaseout limits, and after-tax returns on alternative investments. These are all unique to each person and I'd suggest generalizations are not useful.
1. I live in CA, HCOL, high state income tax and property taxes. These have always exceeded federal std deduction and I have used itemized deductions always. Hence the mortgage interest gets the full benefit of 40% to 45% savings in federal and state income taxes based on the marginal tax rate in a given year. My interest rate started at 5.75 % for 30 year fixed and currently down to 2.5% for 10 year fixed, giving me an after tax rate of 3.45% at the beginning to 1.375% now. I went through a couple of refinancing -- 5/1 ARMs at pre-tax rate of 4 and 3.5 and after tax rate of 2.2 and 1.925%.
2. California tax exempt intermediate bond fund (VCADX) has provided after tax returns of 4.17%, 3.82%, 5.63%, and 4.63% for 1/2/5/10 year periods ending 3/31/2016. Note that I haven't sold VCADX and so didn't incur any capital gains taxes. The dividend distributions quoted above are exempt from federal and state income taxes. These returns have exceeded the after-tax interest rate of my mortgage by a considerable margin. To me personally, it makes no financial sense to pre-pay.
3. AMT doesn't reduce the value of my mortgage interest deduction since the AMT exemption limit is larger than the sum of personal exemptions + state income tax + property tax.
Can pay off the mortgage by selling of the bonds but I feel no need/compulsion/emotional pull to do so. Enough emergency savings to tide over 2 years of living exp including mortgage and the house has appreciated a lot and is in a desirable area, 30 minutes of driving to high tech companies. Houses in my area were selling within a month even during 2008-09 melt down. No foreclosures in my neighborhood.
It is very hard to keep risk same and equate bond yields after taxes+costs to same amount as mortgage return(with tax deduction).
Depends on individual circumstances and it is possible to do so. Many of my friends are in a similar situation as me, very low mortgage interest rate and better returns from bonds.
Here is another often overlooked factor...you have to earn that much more money at your marginal tax rate to pay the mortgage.
What if one's income is stable and/or rising so that this is not an issue even remotely? Job is great and working is fun and great company to work for.