Foreclosure can be a devastating experience. But for some homeowners, there is one rainbow at the end of the storm: They might get a little cash.

In many states, if a bidder offers more than is necessary to pay off the defaulted debt during a foreclosure auction, the former owner gets the excess cash. However, officials often have a difficult time locating former owners.

Find the best mortgage rates
Bankrate can help you find the lowest available mortgage rate.

“Most (foreclosed owners) don’t leave a forwarding address, and many people leave at the first sign of foreclosure and they’re long gone from their last known address,” says Dorothy Brown, circuit court clerk in Cook County, Ill.

Such instances of owed cash remain relatively rare. Last year, about 80 percent to 90 percent of foreclosed homes being auctioned were taken back by the bank, according to Rick Sharga, senior vice president of RealtyTrac.

That means that just 10 percent to 20 percent of auctioned homes yielded a surplus.

Still, surpluses from foreclosures that occurred years ago sit in unclaimed fund pools run by states and localities, waiting for owners to claim them.

How much could be there?

The process of foreclosure differs by locality. But typically, the home ends up being auctioned. Usually, the lending firm foreclosing on the homeowner bids what is owed in defaulted mortgage debt and takes back the property.

In most states, if another bidder offers more than what’s needed to pay off the defaulted debt, the resulting surplus goes to the former owner. (In Connecticut and Vermont, the title can transfer directly to the lender without an auction, says Geoff Walsh, an attorney with the National Consumer Law Center in Boston.)

Whether there’s a surplus depends on many factors, including how many parties are vying for the property, market conditions and the amount of debt on the property, says Walsh.

For instance, in Cook County, Ill. — which includes Chicago — there were 17,666 foreclosures completed in the first half of this year, according to RealtyTrac data.

“So far in 2010, we have taken in about $496,000 in unclaimed surplus funds,” says Brown, the Cook County circuit court clerk.

Meanwhile, in Florida’s real estate-depressed Manatee County, there have only been about 12 foreclosure cases with surplus funds in the first half of 2010 out of around 250 properties sold, says Libbey Cherko, administrator at the office of the County Clerk of Circuit Court and Comptroller.

Kathy Fortney, clerk of courts in Medina County, Ohio, says, “We haven’t seen much surplus lately. I don’t know if we will a couple of years down the road (when foreclosures underway now will be completed). But in the past, the average was about $3,000 or $4,000.”

Are you due funds?

So, how can you find out if you’re owed money after a foreclosure?

Some states have a “nonjudicial” foreclosure process, while others have a “judicial” process, says Walsh. You can find the report at the National Consumer Law Center website.

No matter the type of foreclosure, procedures call for former owners to be notified if they are due a surplus, Walsh says. But in many cases, the owners can’t be located, or the notification simply falls through the cracks, he says.

So, former owners should check to see if they are due funds. If you live in a state with judicial proceedings, contact the court that handled your case, says Charlie Green, clerk of circuit court, Lee County, Fla.

“Say, ‘Here is my case number — was there any balance left?'” he says.

If you live in a state with a nonjudicial process, ask the trustee listed on prior foreclosure documents for a report of the disbursements from the sale, Walsh says. These reports show how funds are distributed to mortgage companies and lienholders and should note any surplus due to the owner.

Get more news, money-saving tips and expert advice by signing up for a free Bankrate newsletter.