While it’s been played for laughs on both television (“Modern Family”) and the big screen (“Failure to Launch”), the trend of young adults living with their parents into adulthood isn’t slowing down.

The percentage of young adults living with their parents or other relatives rose from 15.3 percent in 2000 to 26.3 percent in 2016, according to a 2018 report from the National Association of Home BuildersPew Research Center in 2016 also found that living with a parent was the most common living arrangement for adults ages 18 to 34.

Data shows that unemployment isn’t the primary reason young college grads are choosing to return or stay home. In fact, their job prospects have risen. Rising home prices, paired with stagnant wages, staggering student loan debt and the rise of underemployment, are instead keeping them from living and thriving on their own.

According to the 2018 Millennials and Money survey by TD Ameritrade, millennials didn’t expect to be financially independent from their parents until age 25. Nineteen percent of those surveyed don’t expect to ever be completely independent.

For millennials who return or remain in their childhood homes, either out of necessity or convenience, there are important habits to pick up now to ensure that once you do gain financial independence, you’re prepared to stay there.

1. Get to work

First and foremost, find a way to earn some sort of income while you’re staying at home.

If you, like many, have returned home in order to pay off student loans, taking on work — either in your field or just as a part-time opportunity — is essential.

If part-time work is all you can find, consider using your skill set for remote work, either through a formal business or a site like Upwork, which matches freelancers skilled in graphic design, programming, transcription and more with clients.

Part-time work-from-home opportunities, including freelancing, can be both lucrative and flexible as you balance multiple gigs on the hunt for full-time work.

2. Pay off debt

Personal debt is a major factor driving recent graduates to return home. In fact, 27 percent of millennials cited student loan debt as a factor prohibiting them from moving out of their parents’ homes as adults, according to TD Ameritrade’s 2017 Young Money survey.

That’s why the first priority for many young adults crashing with their parents is to make as much of a dent as possible in student loan payments.

Recent graduates aren’t required to begin paying off their federal loans until six months after graduation, but that doesn’t mean you have to wait that long. Grads who are already earning before that six-month mark can make a big difference in their total loan amount by starting payments as early as possible before they begin collecting interest.

Develop a game plan to get your student loans paid off as efficiently as possible.

If you also have auto loans or credit card debt, it may take time to calculate which to focus on first based on interest rates and how much you expect to pay over the lifetime of the loan. Use Bankrate’s debt paydown calculator to create a schedule that accounts for all your debts.

3. Grow your emergency fund

Living with parents sometimes translates to taking on minimal expenses, which creates an opportunity to build or even start your emergency fund.

A standard emergency fund should be enough to cover three to six months’ worth of expenses. It’s helpful to park the fund in a liquid account like a high-yield savings account or money market account so you can easily access it in case of an emergency.

In your calculations for the fund, consider housing, transportation, health care, utilities and debt, as well as any other non-negotiable expenses.

Rather than saving for the cost of each expense now, estimate what the cost of your future mortgage or rent and utilities will be once you’ve moved out and aim for that amount instead. That way, you can ensure you’re prepared for the increase should anything delay your future plans.

4. Start investing

Even if your earnings aren’t quite where you would like them to be, or you’re dedicating much of it to your debts, it’s still important to invest when possible.

If you’re working and your employer offers 401(k) enrollment, especially with a match or safe harbor, dedicate at least enough to get the full match.

Just a 3 percent contribution of a $50,000 annual salary beginning at 25 can turn into over $300,000 by the time you reach age 65, even before factoring in employer matching or salary increases over the lifetime of your career. Use Bankrate’s 401(k) calculator to see how your savings will grow over time.

You may also want to look into opening a traditional or Roth IRA. You can contribute up to $5,500 pretax income to a traditional IRA, and the same amount after-tax to a Roth IRA. There is no income limit for a traditional account, but a Roth IRA requires single filers to make less than $118,000 annually to contribute the full amount.

5. Pay rent and utilities (in some form)

Often, the biggest perk and strongest motivator of living at home as an adult is the opportunity to forgo steep rents and utility costs.

However, if that’s your situation, you should aim to get yourself into the habit of dedicating a portion of your income to those standard expenses to make it easier on yourself when you make the jump to renting or buying your own place.

If your parents don’t charge you anything themselves, dedicate a fair portion of your income to a savings account. This will help you develop budgeting habits with each paycheck and also allow you to save a little more cash to help with your eventual move.

Take the time to do your share in other ways, too. Help out around the house, pick up groceries and other household items, and actually spend time with your parents each week. Not only will your parents appreciate the assistance, you’ll pick up good habits for when you’re on your own.

6. Build credit

Whether you’re a recent college grad and haven’t had the opportunity to build credit yet or you’ve burned through credit card limits and need to work on your score, living at home presents a great opportunity to improve your credit.

Using your line of credit responsibly and developing the habit of paying off the balance each month now can make applying for a mortgage or auto loan that much simpler when you’re financially ready in the future.

Choosing your credit card wisely with your own rewards preferences and priorities in mind will not only raise your credit score but also help you develop healthy spending habits for your independent future.