This ordering is appropriate for investors in the US.
It is up to you whether to consider "saving for a house down payment" as a "day to day expense", vs. lumping the down payment savings in with "taxable investments" at the end.
If you are renting, you may not be throwing away as much on rent as you might think. See http://jlcollinsnh.com/2012/02/23/rent-v-owning-your-home-opportunity-cost-and-running-some-numbers/
for some thoughts.
In the lists below, thinking "first your 457 (if you have one), then your 401k and/or 403b" wherever "401k" appears is likely correct -
unless your 457 fund options are significantly worse than those in the 401k/403b -
due to penalty-free access to 457 funds at retirement, even if younger than 59 1/2.
"Max _____" means "contribute up to the maximum allowed for _____, subject to your ability to pay day-to-day expenses."
The benefits of employee stock purchase plans (ESPPs) relative to other opportunities is highly dependent on tax rates, because ESPP benefits all occur in taxable accounts.
- For someone paying 15% tax on ordinary income, and 0% on dividends and capital gains, ESPPs can be very favorable, perhaps competing with high interest rate loans in step 2.
- For someone paying 25% tax on ordinary income, and 15% on dividends and capital gains, ESPPs are not as favorable, perhaps coming between steps 6 and 7.
Differences of a few tenths of a percent are not important when applicable for only a few years (in other words, these are guidelines not rules).
Current 10-year Treasury note yield is ~2%. See http://quotes.wsj.com/bond/BX/TMUBMUSD10Y
0. Establish an emergency fund to your satisfaction
1. Contribute to your 401k up to any company match
2. Pay off any debts with interest rates ~5% or more above the 10-year Treasury note yield.
3. Max HSA
4. Max Traditional IRA or Roth (or backdoor Roth) based on income level
5. Max 401k (if 401k fees are lower than available in an IRA, or if you need the 401k deduction to be eligible for a tIRA, swap #4 and #5)
6. Fund mega backdoor Roth if applicable
7. Pay off any debts with interest rates ~3% or more above the 10-year Treasury note yield.
8. Invest in a taxable account with any extra.
0. Give yourself at least enough buffer to avoid worries about bouncing checks
1. Company match rates are likely the highest percent return you can get on your money
2. When the guaranteed return is this high, take it.*
3. HSA funds are totally tax free when used for medical expenses, making the HSA better than either traditional or Roth IRAs.
4. Rule of thumb: traditional if current marginal rate is 25% or higher; Roth if 10% or lower; flip a coin in between. See also Traditional versus Roth
See Credits can make Traditional better than Roth for lower incomes
and other posts in that thread about some exceptions to the rule.
The 'Calculations' tab in the Case Study Spreadsheet
can show marginal rates for savings or withdrawals.
5. See #4 for choice of traditional or Roth for 401k
6. Applicability depends on the rules for the specific 401k
7. Again, take the risk-free return if high enough
8. Because earnings, even if taxed, are beneficial
Similar to "put on your own oxygen mask before assisting others," you should fund your own retirement before funding 529 or similar plans for children's college costs.
The emergency fund is your "no risk" money. You might consider one of these online banks: http://www.magnifymoney.com/blog/earning-interest/best-online-savings-accounts275921001
If your 401k options are poor (i.e., high fund fees) you can check http://forum.mrmoneymustache.com/investor-alley/to-401k-or-not-to-401k-that-is-the-question-43459/
for some thoughts on "how high is too high?"
Priorities above apply when income is primarily through W-2 earnings. For those running their own businesses (e.g., rental property owner, small business owner, etc.),
putting money into that business might come somewhere before, in parallel with, or after step 5.
Why it is likely better not to pay a low interest rate mortgage early: http://allfinancialmatters.com/wp-content/uploads/2013/08/SandP500_5-Year_Rolling_Returns_with-CPI_calendar_year.pdf
for some data on historical returns.