Do note that, even if the math works out such that the bank doesn't actually lose money, a short sale remains on your credit history for the subsequent seven years, which makes it very difficult to buy another house during that period. It's not something you want to do if you can avoid it.