By Christine DiGangi/Credit.com

You’re probably going to die with some debt to your name. Most people do. In fact, 73 percent of consumers had outstanding debt when they were reported as dead, according to December 2016 data provided to Credit.com by credit bureau Experian. Those consumers carried an average total balance of $61,554, including mortgage debt. Excluding home loans, the average balance was $12,875.

The data is based on Experian’s FileOne database, which includes 220 million consumers. (There are about 242 million adults in the U.S., according to 2015 estimates from the Census Bureau.) To determine the average debt people have when they die, Experian looked at consumers who, as of October 2016, were not deceased, but then showed as deceased as of December 2016. Among the 73 percent of consumers who had debt when they died, about 68 percent had credit card balances. The next most common kind of debt was mortgage debt (37 percent), followed by auto loans (25 percent), personal loans (12 percent) and student loans (6 percent).

Get Breaking News Delivered to Your Inbox

These were the average unpaid balances: credit cards, $4,531; auto loans, $17,111; personal loans, $14,793; and student loans, $25,391.

What Does Happen to Debt After You Die?

For the most part, your debt dies with you, but that doesn’t mean it won’t affect the people you leave behind.

“Debt belongs to the deceased person or that person’s estate,” said Darra L. Rayndon, an estate planning attorney with Clark Hill in Scottsdale, Arizona. If someone has enough assets to cover their debts, the creditors get paid, and beneficiaries receive whatever remains. But if there aren’t enough assets to satisfy debts, creditors lose out (they may get some, but not all, of what they’re owed). Family members do not then become responsible for the debt, as some people worry they might.

That’s the general idea, but things are not always that straightforward. The type of debt you have, where you live and the value of your estate significantly affects the complexity of the situation. (For example, federal student loan debt is eligible for cancellation upon a borrower’s death, but private student loan companies tend not to offer the same benefit. They can go after the borrower’s estate for payment.)

There are lots of ways things can get messy. Say your only asset is a home other people live in. That asset must be used to satisfy debts, whether it’s the mortgage on that home or a lot of credit card debt, meaning the people who live there may have to take over the mortgage, or your family may need to sell the home in order to pay creditors. Accounts with co-signers or co-applicants can also result in the debt falling on someone else’s shoulders. Community property states, where spouses share ownership of property, also handle debts acquired during a marriage a little differently.

“It’s one thing if the beneficiaries are relatives that don’t need your money, but if your beneficiaries are a surviving spouse, minor children — people like that who depend on you for their welfare, then life insurance is a great way to provide additional money in the estate to pay debts,” Rayndon said.

How to Avoid Burdening Your Family

One way to make sure debt doesn’t make a mess of your estate is to stay out of it. You can keep tabs on your debt by reviewing a free snapshot of your credit report, in addition to sticking to a budget that helps you live below your means. You may also want to consider getting life insurance (this blog post explains how to know if you need it) and meeting with an estate planning attorney to make sure everything’s covered in the event of your death. If you’re worried about leaving behind debt after death, here’s more on how protect your loved ones.

Poor planning can leave your loved ones with some significant stress. For example, if you don’t have a will or designate beneficiaries for your assets, the law in your state of residence decides who gets what.

“If you don’t write a will, your state of residence will write one for you should you pass away,” said James M. Matthews, a certified financial planner and managing director of Blueprint, a financial planning firm in Charlotte, North Carolina. “Odds are the state laws and your wishes are different.”

It can also get expensive to have these matters determined by the courts, and administrative costs get paid before creditors and beneficiaries. If you’d like to provide for your loved ones after you die, you won’t want court costs and outstanding debts to eat away at your estate.

This article originally appeared on Credit.com.