The bankruptcy means test is a significant factor in determining who can file for debt forgiveness through Chapter 7 bankruptcy. See http://www.csmonitor.com/Business/Saving-Money/2016/0718/Why-the-bankruptcy-means-test-matters. It takes into account your income, expenses and family size as well as the state you live in to determine whether you can eliminate the debt or whether you have enough disposable income to repay some or all of your debts. Regarding the relevance of the state you live in, as an example, a family of four residing in Northeast Philadelphia Pennsylvania will need to have less income than a family of four residing in Pennsauken New Jersey because the statewide income is less in Pennsylvania then in New Jersey.
Although it was designed to restrict the number of debtors who can get their debts forgiven through a Chapter 7 bankruptcy, most people who take the means test pass it easily.
Those who don't qualify for Chapter 7 or who want to retain certain assets - like a house or expensive car - can choose instead to restructure their debts and pay them off over three to five years through Chapter 13 bankruptcy. If the means test determines you make more than the statewide average for a family your size than the repayment plan must be for 5 years.
The test is only for those who have primarily consumer debts, like credit card or medical debt; you don't need to pass the means test if your debt is mainly from a business you own. For Chapter 13 bankruptcy, the test also plays a part in setting the repayment schedule.
The first part of the means test checks whether your household income is below your state's median income. While the means test is based on the past six months, there are adjustments for recent or upcoming changes (i.e. recent unemployment and getting a new job).
The next step is to gather documentation about your expenses over the past six months. Things such as rent, groceries, clothing and medical costs make up what are called "allowable expenses." What's left after allowable expenses is deemed disposable income that could be put toward paying off debt.
What's allowable is based on both national and local standards used by the IRS. National standards cover items like food and clothing, while local standards cover expenses like housing and car payments.