Let’s say that I have a $400,000 mortgage, 30-year adjustable, say 4 years into it, current payment is about $2400/month. Let’s say that I find myself with $400,000 in the bank.

Now, it seems obvious that if I’m planning to stay in the house for at least (or even close to) the rest of the life of the mortgage, I’m better off to pay off the mortgage with my savings and then put what I would have paid to the mortgage back into my savings. Twenty six years later, I’ll have a lot more money, right?

But what if I’m planning to sell the house in, say, five years? Or three? Or ten? Is it always better to pay off the mortgage, if you can? Or is there a short term during which it’s better to keep the savings and keep paying the mortgage?

I’m not quite sure how to figure this out, or what factors go into it. I would think that the interest rate on the mortgage vs. the interest I earn from the savings would factor into it, but I’m not sure how. And of course, continuing to pay the mortgage gives me the tax deduction, so that if we say I’m roughly in a 33% bracket then paying off the mortgage and not having that deduction means that I’m actually saving about $1600 per month. But again, I’m not sure how to put that all together to see which is better.

It’s actually very simple. If you can get a better real rate of return on an investment than you pay in interest on the mortgage, you’re better off to invest the money. Otherwise you should pay off your mortgage. Basically, if the gains an investment would make each month could cover your mortgage payment with something left over, you’re better off with the investment. Otherwise, you’re better off with the mortgage. Here are some things to consider:

real rate of return is after tax. Generally you must pay tax on capital gains, dividends and interest gained. You do not pay taxes on interest payments, which means that paying off debt is a great “investment”. When making the comparison, subtract the tax you’ll pay on your return from the return.

Paying off debt usually carries zero risk(I say usually because if you have a variable rate mortgage, paying it off technically has interest rate risk). In most circumstances to get an investment with a return higher than the interest you are paying on debt, you have to take risk along with that investment. That risk means uncertain(possibly even negative!) returns on your investment. If your interest is fixed, you know exactly how much money that you will save in interest.

The US government, in its infinite wisdom, gives favourable tax treatment for holding a mortgage. I don’t know how significant this is, but it does mean that if you are in the US and you pay off your mortgage you lose the tax savings, so subtract the savings from your mortgage payment to make a fair comparison.
In general paying off debt is going to be far superior to investing the money directly. Take the mortgage payments that you’ll no longer be paying and invest them instead.

Why wouldn’t you place the $400k into a bank at 3% return and use that to pay the mortgage? 3% a year gives basically a $1000 per month which drops your mortgage payments in half, keeps your principal available and, if you’re in the US, allows you to deduct the mortgage interest.

Mind you a 40 year mortgage boggles my poor, non tax deductible Canadian mind. I’ve got a 25 year one that gets renegotiated every 5 year or so.

Also, keep in mind that debt repayment is a guaranteed return. Investment in vehicles that would net returns that would exceed the cost of a mortgage are rarely guaranteed and therefore inherently speculative in nature.

Paying off your mortgage early is generally always a smart thing to do, as there are no savings accounts that will ever return more than you would otherwise lose in compound mortgage interest, and any investment that might come close would be extremely high risk. All the financially acute people I know pay off their mortgages as quickly as they are able.

The tax treatment of investment income vs. the tax treatment of mortgage interest - this varies by jurisdiction;

The different interest rates available and the risk associated with them - is the mortgage fixed-rate, variable or renegotiated periodically? Generally, rates from more speculative investments (for example, equities) will be higher over the long term but risks in the short term are likely to be higher;

Liquidity. Money you put into the mortgage is not very liquid - that is, if you want that money back, you must either sell the house or take out further loans against it. It is often much easier to sell investments like equities if you want money right now.

There is going to be no “right answer” for everyone. I’ll tell you what I do - I try as best I can to diversify; I take half my surplus income and use it to make extra payments on mortgage; I take the other half and invest it in various vehicles that give positive tax advantages (I’m Canadian, so that amounts to RRSPs, RESPs, and TFSAs) - part in equities, part in bonds, and part in safe but staid GICs.

For those of you advising that the OP invest money and look at rate of return, I’d like to remind you of a little thing called “leverage” and that it had a certain impact on our economy just two short years ago that we’re still noticing.

I’m not going to say that leveraging assets is always bad, but that it requires a much more careful analysis of risk than even professional investment bankers were doing back in 2006. You have to address all of the “what if?” scenarios to ensure that the amount of reward is right for the amount of risk. Leverage doesn’t just multiply return on investment, after all; it also multiplies risk.

So the “what ifs” that have be asked including down housing markets, poor investment performance, loss of a job, unexpected medical expenses, death, casualty/disaster losses (and the degree to which insurance may cover them) and much more.

A lot of people (especially two years ago) were maxing out their mortgages and making investments when they didn’t even have a rainy day fund in cash that they can live off of if they lose their job. Now they’ve got no job, no house, no credit and huge investment losses.

I agree with that. My approach in dealing with a multiplicity of potential risks is to diversify my investments, as stated above - keep some money in cash equivalents, some in equities, invest some in the mortgage. After all, one’s mortgage is the most higly leveraged investment one is likely to have; OTOH one’s house is also the most illiquid asset you are likely to own. The one aspect militates in favour of putting one’s cash into the mortgage, and the other militates against doing so.

Ok, I appreciate all the replies, but no one has yet really addressed my specific question.

What I’m looking for is the formula (or just a description of “how to figure it out”) into which I can plug the following:

mortgage loan amount,
mortgage interest rate (and some WAG about how it might change year to year, since it’s a variable mortgage),
years left on mortgage (does this even matter if I’m going to sell before it’s up?),
some WAG on the interest rate I’ll get on money kept in savings (or investments, etc.),
my tax bracket (I’m in the US, and California),
and the number of years until I sell the house.

And then see what the difference is between keeping the mortgage vs. paying it off, at the time I (hypothetically) sell it. I’d like to be able to plug in some different values (especially the last one) so that I can compare the results of paying off the mortgage vs. keeping the savings.

For example, if I pay off the mortgage right now then sell the house in five years, compared to keeping the $400K in an account that earns 2% interest then sell the house in five years, will I have a few hundred dollars more? A few thousand? Ten thousand? If my mortgage interest rate goes up 1% every year for those five years, how does that change the result? What if it goes up 2% every year?

Well, actually the replies so far have offered several alternatives for you. I think you need to compile basic financial information about your current mortgage (the details), your current investments (the details), and weigh them against several scenarios, including the current market and your personal risk. Only then would you have enough information to decide the best course of action for you.

Your loan schedule should tell you the amount you deduct for interest for each month of the loan. It depends where you are in the loan as to how much equity you are gaining.

I have no idea what the tax concessions are, so I don’t know how to factor them in. Also depends on what you do with that extra money, put it on the mortgage, into savings or into lifestyle.

The years left on the mortgage, or the years until you sell the house, are basically irrelevant to the question you are asking.

You have borrowed money from a mortgage lender at whatever rate – lets say 5%. And since you get a tax deduction, the real rate is actually a bit less – say 4%.

Since you’re borrowing money, you need to get a higher rate of return (after taxes) than you’re paying to borrow the money. If you don’t, it makes sense to pay the money back.

So the question is, do you have an investment that will pay you a guaranteed 4% after taxes? It appears you don’t. Borrowing money at 4%, then turning around and investing it at 3% (after taxes, more like 2%) is a bad plan. So pay it back.

That’s strictly by the numbers. There may be other reasons to preserve liquidity. There may be higher paying investments. But you can do worse than a guaranteed 4% return, which is what you’d be getting by paying back the money.

Calculating the cost to you of your mortgage is easy, because you know your interest rate and the value to you of that interest rate deduction. The difference is what it costs you to have the mortgage.

Calculating the opportunity cost of the money you’d spend paying off the mortgage is not possible without specifying how you would invest it, since rates of return on investment vary in rough proportion to risk and are not guaranteed.

The whole idea of interest rates is to balance out this equation. Perhaps you’d like to invest in being a mortgage lender, lending out your cash at 5%, borrowing your own mortgage at 5%, paying income tax on your lent money and deducting your borrowing costs. Mostly a wash. Perhaps you’d like to find some bonds to invest in; US Treasury Bonds might give a different rate of return than Greek ones.

Perhaps you’d like to use your cash as venture capital for a start-up idea, risking the loss of all of it for a potential return of some large multiple…

It’s not clear to me why you don’t think you already have the “formula.”

The other factor with paying off the mortgage is what I call the “will-power factor”. Once you have no forced mortgage payment, can you actually pay the investment fund that $2400 or more a month - or will something more urgent keep coming up, like that Hawaii trip or the transmission repair or the new swimming pool?

The other calculation is that a house (especially today) is likely worth more later, when it comes time to sell - although the lesson from last year is that it depends on the market and the economy too. You may get your $400K back and then some - or not. But - the same is true with any investments other than interest accounts.

The simplest way to test various scenarios, if you are good with Excel - create a spreadsheet with a few basic cells at the top: this is my interest rate, this is my expected rate of return on investing.

Then put a pair of rows of cells across the sheet - my mortgage balance, my investment balance, interest paid, etc. The second row will be the formulas for how a month’s values change from the month above; mortgage principal is last month’s principal minus payment plus principal times interest rate less tax refund, etc. Investment fund equals last month’s value, plus investment amount plus interest(?) earned, less taxes.

Copy that row down several dozen times to see how your values change each month. If you made interest rates a separate single cell, you can also fiddle with that to see how it affects long-term value.

Maybe I have misunderstood. To me, the devil is in the details - specifically, in what risks you find acceptable.

The major reason to invest in one’s mortgage is that it has a guaranteed (that is, known in advance) return, and one that is better than most other reasonable safe investments.

The major reason to not invest in one’s morgage is that it ties up all of your money into one asset, where you cannot easily get it back.

in theory one could invest that money somewhere else, make a higher rate of return, pay off the mortgage and have cash in hand. In theory. The reason this typically is not done is that any investment that makes a higher rate of return will, almost by definition, be risky. After all, if there was an investment that offered a better return than a mortgage and that was as safe, the bank would invest their money in it rather than lending it to you.

Keep in mind also that interest rates change. Right now, you have a locked in rate on your mortgage. Don’t just compare it to what the rates are today (which are, by all reports, historic lows), but also what they might be over the next 26 years.

Suppose, for example, interest rates climbed rapidly and 2 years from now you could get a 10 year CD at 7-8%. Would that change your decision to lock in today’s rate?

My impression was that the OP’s scenario specified an adjustable-rate mortgage. If so, that transfers some or all (depending on terms and caps) of the risk of interest rates rising onto the borrower. The risk there is that if you don’t pre-pay now, you may be paying much higher rates on interest on that money in the future.

If that is the case, the risk of being leveraged may be greater than anticipated.

My own mortgaged was for a 15 year term, fixed rate for 5 years and then rate to be re-negotiated, no penalty for pre-payment. I’ve been pre-paying to principal, and have reduced the principal by two-thirds over the first five years. I’m not unhappy with this, but of course it would have been a better strategy if interest rates were horribly high right now rather than horribly low …

You used to hear that all the time - before the last couple of years. Take out as big a mortgage as you can and invest that money in equities! You will be a lot richer in the long run than someone with a conservative strategy of paying their mortgage off as fast as possible! Don’t listen to you fuddy-duddy parents (God bless 'em, but they are awful cute) who natter on about how taking out big loans is dangerous. Sure, folks in the Great Depression lost their homes, but that never happens these days.

It’s all kinda-sorta true, but the caveat is an important one - as long as you don’t mind risk. As someone noted upthread, lots of folks who took that advice (and I know several) ended up over the last couple of years with no job, no ability to pay off the big mortgage, and a bunch of worthless equities - in short, all those risks over which they had little control went against them.

But the advice is sound enough - take risks and you are more likely to end up rich. Or broke.