Note: This is my own researched and way of understanding and felt like sharing it. you might have found this information somewhere...
either you read it and learn from it, or read it and forget about it. Thank You!

You first take the Median Income Test.
the median income test adds up your gross income from all sources during the 6 months preceding the month of filing then divide by 6 arrive at a monthly average.

If that monthly exceeds the "median income for a similarly sized family" then you fail.
then you might find yourself in a chapter 13 repayment plan rather than a chapter 7 liquidation.

Note: Bonuses (like Xmas Bonuses) will distort your median income calculation. if you file your case in Jan,Feb,March,April or June,

A June Filing, for example would look at gross income during Dec through May to generate a monthly average. A July Filing, by contrast, would look at gross income for January through June and not count any Christmas Bonuses.
If your household income is close to the median income test limit, you may find yourself waiting until July to file a case that otherwise could have been filed earlier.