Query: Formula that predicts whether one is better off investing or paying down debt

Relevant passages:
 <=SEP=> I ended up writing a simulation in R. Here is my code: It produces a plot like this:  This code assumes you have a lump sum and either wish to pay down a loan or invest it all immediately. Feedback welcome.

 <=SEP=> you should always invest if your investment rate of return is higher   than your interest rate Your next line, about standard deviation is dead on.  There are too many variables to give an exact answer here, in my opinion. The main reason is that one variable isn't easy to quantify - One's risk tolerance.  Clearly, there's one extreme, the 18% credit card. Unless you are funding loanshark type rates of 2%/week, it's safe to say that 18% debt should take priority over any investments, except for the matched 401(k) deposits.  What I think you're talking about is something we've addressed here in multiple threads.  Do I prepay my sub 4% mortgage or invest? In this case, (and to Noah's comment) the question is whether you can expect a post-tax return of over 3% during your time horizon. I look at the return for 15 years from 1998-2013 and see a 6% CAGR for the S&P. I chose 15 years, as the choice is often one of paying a 30 year mortgage faster, as fast as 15. The last 15 years offer a pretty bad scenario, 2 crashes and a mortgage crisis. 6% after long term gains would get you 5.1% net.  You can pull the data back to 1871 and run CAGR numbers for the timeframe of your choosing. I haven't done it yet, but I imagine there's no 15 year span that lags the 3% target I cite.  What makes it more complex is that the investment isn't lump sum. It may not be obvious, but CAGR is a dollar invested at T=0, and returns calculated to T=final year. It would take a bit of spreadsheeting to invest the extra funds every month/year over your period of analysis.  In the end, there are still those who will choose to pay off their 4% mortgage regardless of what the numbers show. Even if the 15 year result showed worst case 3.5% (almost no profit) and an average 10%, the feeling of risk is more than many will want.

 <=SEP=> Although I don't think you need to factor in risk tolerance to get the probabilities, I agree with JoeTaxpayer that you will need to factor in risk tolerance in order to make a practical decision about what to do.  In fact, I think that to make a practical decision you will need more than the specific probability you ask for you in the question; rather, you would like to see the complete probability distribution of possible outcomes. In other words, it's not enough to know that there is a 51% chance that investing will outperform paying down debt.  You actually need to know much it outperforms when it does outperform, and how much it underperforms when it underperforms.  As JoeTaxpayer's comment suggests, you might not choose to make an investment that had a 99% chance of outperforming debt payment by 1%, and a 1% chance of underperforming by 99%. I think it possible to address these questions by doing simulations.  This can be done even with a spreadsheet, but more flexibly with simple programming.  Essentially you can create some kind of probabilistic model of the various factors (e.g., chance that your investment will go up or down) and see what actually happens: how often you lose a lot of money, lose a little money, gain a little money, or gain a lot of money.  Then based on that you can consult your inner spirit animal to decide whether the probability distribution of possible gains outweighs that of possible losses.

 <=SEP=> "The formula you are looking for is pretty complicated. It's given here: http://itl.nist.gov/div898/handbook/eda/section3/eda3661.htm You might prefer to let somebody else do the grunt work for you. This page will calculate the probability for you: http://stattrek.com/online-calculator/normal.aspx. In your case, you'd enter mean=.114, standard deviation=.132, and ""standard score""= ... oh, you didn't say what you're paying on your debt. Let's say it's 6%, i.e. .06. Note that this page will give you the probability that the actual number will be less than or equal to the ""standard score"". Enter all that and click the magic button and the probability that the investment will produce less than 6% is ... .34124, or 34%. The handy rule of thumb is that the probability is about 68% that the actual number will be within 1 standard deviation of the mean, 95% that it will be within 2 standard deviations, and 99.7% that it will be within 3. Which isn't exactly what you want because you don't want ""within"" but ""less than"". But you could get that by just adding half the difference from 100% for each of the above, i.e. instead of 68-95-99.7 it would be 84-98-99.9. Oh, I missed that in a follow-up comment you say you are paying 4% on a mortgage which you are adjusting to 3% because of tax implications. Probability based on mean and SD you gave of getting less than 3% is 26%. I didn't read the article you cite. I assume the standard deviation given is for the rate of return for one year. If you stretch that over many years, the SD goes down, as many factors tend to even out. So while the probability that money in a given, say, mutual fund will grow by less than 3% in one year is fairly high -- the 25 - 35% we're talking here sounds plausible to me -- the probability that it will grow by an average of less than 3% over a period of 10 or 15 or 20 years is much less. Further Thought There is, of course, no provably-true formula for what makes a reasonable risk. Suppose I offered you an investment that had a 99% chance of showing a $5,000 profit and a 1% chance of a $495,000 loss. Would you take it? I wouldn't. Even though the chance of a loss is small, if it happened, I'd lose everything I have. Is it worth that risk for the modest potential profit? I'd say no. Of course to someone who has a billion dollars, this might be a very reasonable risk. If it fails, oh well, that could really cut in to what he can spend on lunch tomorrow."

 <=SEP=> "Old question I know, but I have some thoughts to share. Your title and question say two different things.  ""Better off"" should mean maximizing your ex-ante utility.  Most of your question seems to describe maximizing your expected return, as do the simulation exercises here.  Those are two different things because risk is implicitly ignored by what you call ""the pure mathematical answer.""  The expected return on your investments needs to exceed the cost of your debt because interest you pay is risk-free while your investments are risky. To solve this problem, consider the portfolio problem where paying down debt is the risk-free asset and consider the set of optimal solutions.  You will get a capital allocation line between the solution where you put everything into paying down debt and the optimal/tangent portfolio from the set of risky assets.   In order to determine where on that line someone is, you must know their utility function and risk parameters.  You also must know the parameters of the investable universe, which we don't."