We often think of debt as a matter of overspending—consumers swiping credit cards left and right without a plan in place to pay down their growing balances. And for some people, this is certainly the case. But it’s also important to realize that there are many more reasons people accrue debt, some of which are outside the realm of an individual’s control.

Did you know medical debt is the number one source of personal bankruptcy filings in the U.S.? As USA Today reports, estimates show 40 percent of Americans racked up debt because of a medical issue in 2014. And struggling with medical debt was not just an issue for un- or underinsured Americans; even people with insurance through their employers or the individual marketplace often experience difficulty trying to cover the costs of medical bills.

Keep reading to learn more about the medical debt epidemic and some possible solutions for consumers looking to eliminate their debt.

How Much Medical Debt Is Common?

Of course, medical debt looks different for each patient. Some people may owe a few hundred dollars for a certain appointment or procedure. Others may find themselves thousands in debt.

Becker’s Hospital Review sheds some light on the average amount of medical debt owed in the U.S. by generation:

  • Baby Boomers: $2,408.
  • Generation Xers: $19,670.
  • Millennials: $11,622.

As you can see, the price tag for medical debt can be steep. To repay these costs without wreaking havoc on their financial health, consumers need a plan.

The Medical Debt Epidemic

Possible Solutions for Major Medical Debt

Many people have no choice but to put their medical debt on credit cards, perhaps even opening a new line of credit in the process. It’s frustrating to find yourself in this situation, to say the least. But, like any kind of debt, there are various debt solutions available to explore.

If your credit is in decent standing, debt consolidation may help you streamline your debts. By taking out a loan with a lower interest rate and using it to pay back your assortment of higher-interest debts, you make the repayment process simpler for yourself and save money in the long run. However, it’s important to make sure you’re actually coming out ahead in the end, and that you can commit to paying off your entire loan.

Another tactic for debt exceeding $7,500 is to try to settle with your creditors for less, meaning you’d pay a percentage of your original balance. Here’s how a leading program like the one offered by Freedom Debt Relief works: You make monthly deposits into a special account you control. It’s likely that you may have to prioritize these payments over paying your creditors, so be aware you’ll still get collection calls in the meantime.

When you’ve saved enough, negotiators from the company contact your creditors in an attempt to settle for less. If it’s successful, the money from your account goes toward resolving your debt.

Consumers can also consider conducting a balance transfer. If your medical debts are on a credit card with a high interest rate, you may be able to transfer them, for a fee, to a card with zero or lower APR. While this doesn’t reduce how much you owe, it does stop interest from compounding.

These are not the only debt relief options available for medical debt, but they’re a starting point for research.

The Importance of Building an Emergency Fund

Medical debt is frustrating because nobody chooses to get sick—and you certainly can’t predict every medical issue you’ll experience in your lifetime. The only way to protect yourself against having to rack up debt is maintaining an emergency fund. Just 29 percent of Americans currently have six months or more in emergency savings. It’s very important to set up auto-deposit and keep building your emergency savings before a mishap occurs.

While the medical debt epidemic is unfortunate, there are options for getting your finances back on track if you’re already carrying some.