At the end of life, your final thoughts won’t be on bad financial decisions. But before you approach the hereafter, you’ll likely have more than a few regrets about poor money management.

Fiscal distress often results from a lack of long-term planning. Failing to save enough for retirement — a decades-long endeavor — is the biggest financial regret among American adults, according to a Bankrate survey, followed closely by not having an adequately funded emergency savings account.

Much like your physical well-being, financial health requires both good habits and a bit of luck. By setting up financial goals and working hard to accomplish them, you can focus your energy on the more meaningful parts of your life.

1. Maintain a top-notch FICO score

You’re going to need to borrow a large sum of money at some point in your life. Want to buy a house? A car? Chances are you’re going to need to go to the bank first. The more creditworthy you appear to a financial institution, the less interest you’ll end up paying.

Guarding a super prime score, generally around 740, should be an important financial goal. Most Americans fall short. The average FICO score hit an all-time high last year, reaching 700. You should aim higher. Although don’t stress over trying to get a perfect mark of 850. Life’s too short.

How do you improve? Pay off all your credit card bills in full every month, on time. Use no more than 20 percent of your available credit and keep your oldest accounts going even if you don’t need them.

2. Have a 6-month emergency fund

Amassing six months’ worth of spending in a high-yield savings account is really hard. Depending on where you live and how much you earn, you’re looking at a stash of somewhere between $20,000 and $50,000. Only 39 percent of Americans would be able to pay for a $1,000 emergency with cash, according to a Bankrate survey. Wages have mostly stagnated since the Great Recession, and low interest rates are a headache for savers.

But this is a fundamentally important step. An emergency fund is a hedge against disaster. If you were laid off, it would let you take your time picking your next role. If you got sick or the roof caved in, you wouldn’t have to got into debt.

If you’re starting from scratch, place any windfall you receive into a savings account. You can even name the account “break in case of emergency.”

3. Become a 401(k) millionaire

How much you need in retirement savings depends on your current standard of living, but you may face some adjustments after calling it quits. Half of all households are at risk of spending their golden years with less spending power than they are used to, according to the Center for Retirement Research at Boston College.

The old rule of thumb suggests you need eight times your final income in retirement savings (there are more detailed measures you can use, or you can hire a financial planner). Still, retirement saving is relatively straightforward. Save 10 to 15 percent of your income, including a company match in your 401(k), and invest in low-cost diversified funds. One quick and easy way is to pick a target-date fund that gets more conservative (i.e., more bonds) as you age.

4. Pay off your mortgage

Even if you have a low mortgage rate — mortgage rates have been muted by historical standards since the onset of the housing crisis — owning your home outright is one of the most financially liberating steps you can take, and a sure way to save money.

Let’s say you put 10 percent down on a $262,500 home with a 30-year fixed rate mortgage at 3.88 percent. You’ll end up paying $164,000 in interest alone. Taking out a 15-year loan, instead, would save around $90,000.

Even if you stick with the average loan length, consider contributing extra to your monthly payment whenever possible, and join the 36 percent of mortgage-free homeowners.

5. Make a major purchase with cash

Despite an improving jobs picture and stock markets ascending to new heights, Americans are struggling with savings and debt. The personal savings rate has dropped dramatically over the past few years, while the percentage of families with credit card debt jumped by nearly six percentage points to 43.9 from 2013 to 2016, according to the Federal Reserve. The average indebted household owes $5,700. With the Fed poised to raise interest rates multiple times in 2018, taking on debt is an ever more expensive proposition.

The next time you need to make a big purchase, like a family vacation or a new car, try to make it completely with cash. You’ll not only enjoy the thing you just bought, but you won’t face the anxiety that accompanies new debt. To ramp up your savings rate, automatically siphon a small percentage of your biweekly paycheck into an earmarked savings account. Saving automatically is the quickest way to build up your cache.

6. Pay off student loans

Student loans afflict people of all ages. Nearly 1 in 6 Americans have student debt, with a median amount of $17,000. If you took on loans for postgrad studies, you owe $45,000. Meanwhile senior debt has quadrupled over the past 10 years, according to the Consumer Financial Protection Bureau.

If you’re already putting enough away for retirement — generally 10 percent of your pay, including any employer match — and have a fully-funded emergency fund, start working overtime to pay off your student debt. Put any raises, or your tax refund, to chip away at the mountain of debt.