NEW YORK (MainStreet) - What would you have to do to get your underwater mortgage above water, and how long would it take?

A pair of new calculators from HSH Associates, the mortgage-data firm, can provide the answers. Well, call them good estimates, as certain variables, like the rate of home-price appreciation, can’t be predicted for sure.

Still, the process can provide valuable insight, helping homeowners make key decisions about how to invest spare cash, or, in the worst case, whether to walk away from a home. About one in five mortgage borrowers are underwater – owing more than the home is worth.

Getting above water doesn’t solve all problems. After all, you would lose money on a home if you sold it for less than you’d paid, even if you didn’t have a mortgage. But getting above water makes it easier to sell and move on, as you would not have to come up with cash for the difference between the low sales price and high remaining debt. Psychologically, it’s a lot easier to face monthly payments when they don’t seem to be going into the black hole of an underwater loan.

The HSH calculators focus on three factors that can get a homeowner above water: amortization, or the gradual paying down of debt through regular monthly payments; appreciation, or the gradual gain on the property’s value; and prepayments, the benefits of making extra principal payments to reduce the debt.

Imagine you had taken out a $300,000 mortgage at the start of 2007, paying 6.5%, and that the home is currently worth an estimated $225,000. The KnowEquity When calculator shows your current loan balance at $279,702, putting your underwater by $54,702.

TheStreet Recommends

If you assume no appreciation, it will take 107 more months, with payments of $1,896 a month, to eliminate the negative equity. With annual appreciation averaging 2%, you’d be in the black in 65 months. The home value and loan balance would then be the same – $250,722.

To sell, however, you’d have to expect a 6% real estate agent’s commission. So, with 2% appreciation, it would take 81 months to break even.

Can you speed the process? Well, a higher appreciation rate would do that, but that’s almost entirely out of your control. That leaves prepayments, which would reduce the outstanding debt faster. By putting an extra $200 a month into the mortgage, you could get above water and pay the agent’s commission after 65 months instead of 81.

HSH’s KnowEquity How calculator uses similar calculations to show how much you’d have to put into the mortgage to get above water by a certain deadline, such as your retirement date.

Keep in mind that prepayments aren’t necessarily the best way to resolve your mortgage problem. As an alternative, you could invest the extra cash in some other way that might be more profitable, then add those bigger gains to the proceeds from selling the home to pay off the loan.

The example assumes a mortgage rate of 6.5%, about the going rate in 2007. Prepayments would therefore earn a 6.5% “return” by allowing you to avoid interest charges at that rate. If you could earn more elsewhere, that would be a better option. Of course, the 6.5% return on prepayments is guaranteed. To beat that you’d probably have to take more risk.

The homeowner in the example might consider one more option: using spare cash to pay the debt down in one step, so the loan could be refinanced, reducing the 6.5% interest charge to today’s rate of around 4%. That would put the loan above water right away, reduce the required payments, and dramatically cut interest costs throughout the life of the loan.

If you’ve given up on your underwater home, here are some tips about the dangers of walking away from it.