Most people think bankruptcy is something they'll never have to go through. You may think that because you're diligent about spending less than you earn and avoiding excessive debt, you could never go bankrupt.

However, the number of people filing for bankruptcy is increasing, especially among seniors. People aged 55 and older account for about 20% of total bankruptcy filings -- a number that's doubled since 1994, according to a study from Debt.org. And even financially responsible people go bankrupt far more often than you might expect.

So why do so many people file for bankruptcy? There are many reasons, but the most common is outstanding medical bills.

Petition for bankruptcy forms

Image source: Getty Images.

When medical bills break the bank

Roughly a quarter of American households are struggling to pay their medical bills, according to the Kaiser Family Foundation revealed. And if you think health insurance protects people from crushing medical debt, consider that 10 million Americans with year-round health insurance coverage are struggling to pay their medical bills, according to NerdWallet Health.

Seniors aren't immune to this struggle either. Many retirees (incorrectly) assume that Medicare is their ticket to low healthcare expenses, but even Medicare has its gaps. For example, Medicare doesn't cover routine eye care, dental care, or hearing aids, and it also doesn't cover long-term care -- which can be ruinously expensive. In addition, you're responsible for paying deductibles, copays, and coinsurance, and these costs add up quickly -- in fact, the average 65-year-old couple retiring today can expect to pay upwards of $275,000 in medical bills during retirement.

Seniors are especially prone to high medical bills, as they're more likely to develop expensive health conditions. Although older Americans age 65 and up only make up 12% of the population, they account for 34% of prescription drug usage and 35% of hospital stays, according to the Center for Disease Control and the Department of Health and Human Services -- and a single trip to the hospital can cost tens of thousands of dollars.

What you can do to avoid bankruptcy

While there's no surefire way to avoid health problems and the resulting medical bills, you can take a few steps to protect yourself from skyrocketing healthcare costs.

First, make sure you have an emergency fund that covers three to six months' worth of expenses. Roughly a quarter of American adults have nothing at all saved in an emergency fund, according to a Bankrate.com survey, but what's more worrisome is that 32% of soon-to-be retirees aged 53 to 62 have nothing set aside. An emergency fund can help you cover a major one-time expense without taking on a lot of debt or tapping your retirement savings, which can cause you to burn through your nest egg to fast and cost you dearly in future investment gains.

A health savings account is another option for covering medical bills. An HSA allows you to invest pre-tax dollars, let those savings grow free of capital gains and dividend taxes, and then withdraw them tax-free so long as they go toward qualified medical expenses -- which can include everything from deductibles to contact lenses to long-term care.

Finally, simply being aware of what you may need to spend on medical expenses can help ensure you're not blindsided when the bill arrives. Know what Medicare covers (and, more importantly, what it doesn't), read up on your insurance plan so you know your deductible, copay, out-of-pocket limit, etc., and take a realistic look at your overall health to better plan for any medical expenses you may face down the road. While you can't predict every health issue, if your family has a history of developing a certain ailment, it's wise to budget treatment into your savings plan.

Although it's not fun to think about, bankruptcy is a concern for a growing number of older Americans. As healthcare costs skyrocket, even those who have health insurance and are financially responsible are not immune to the rising medical bills. By being aware of the medical expenses you may face in retirement and preparing accordingly, though, you have a much better chance of avoiding bankruptcy during your golden years.

The Motley Fool has a disclosure policy.