I am selling my house to a friend (for what I owe on the mortgage) which is $107k because I am behind on my payments and don't want to go through foreclosure, but it's worth $155k who gets the extra money?
There's no objective definition of what your house is worth between sales. If you sell it for $107K, then that's the current functional definition of its worth. There is not "extra" money to be had because you sold it for less than it was worth. If the buyer is able to flip it for more, then the value of the house effectively went up and he will pocket the difference when he sells it.
EDIT This turned out to be unexpectedly controversial, so let me be more precise in my answer. I think this is important because it seems like many people misunderstand equity and how it figures (or doesn't) into the value of their home, which then leads to significant confusion and errors in what's many people's largest single investment.
At any given time there are several possible ways to put a dollar value on your home. A non-exclusive list that includes:
- The value used by your local authorities to assess property tax
- The value appraised as part of a sale (if any - if the buyer is paying cash and doesn't need insurance you could potentially have a sale without this appraisal)
- The appraised value you got when you bought the house
- The last sale of a "comparable" house in your neighborhood
- Whatever you happen to believe yourself
- At the time of a sale, what the buyer and seller agree for the transaction
Some of these obviously are more "official" than others. It would not be strange for these different values to vary by quite a bit at any given time. (This is what I meant in my original answer when I said there's "no objective definition of what your house is worth between sales.")
The interesting thing - and what I meant in my original answer when I wrote "current functional definition of its worth" - is that none of these factor directly into the transaction that the OP described of selling his house except for the last. Using the numbers from the OP's example, that means the $107K. Wherever the OP got the number $155K (either from one of the options on my list above or somewhere else), it won't be directly part of the sale between him and his friend.
(For completeness, with a nod to Eric's comments on my original answer, some of these numbers may indirectly influence the sale. For example, the buyer typically won't be able to get a mortgage for a value greater than the appraised value of the house, and so that might influence what he's willing and able to bid. There may also be tax consequences if the price is artificially low, like, say, a gift. As further expounded below, however, that's not directly relevant to answering the OP's stated question.)
Now, the OP seemed to believe that there is an "extra" $48K in cash up for grabs in this scenario. That comes from the $155K value that the OP claims his house has and the $107K price of the actual proposed sale. This is a complete misconception. When the buyer and seller sit down at closing and the title agent sums up who owes and who receives cash in this transaction, the $155K "theoretical" value will not enter into the calculation and therefore no one will pocket it.
Subsequently, however, after the buyer takes possession, he may sell it. If it's true that he "got a deal" on the transaction at $107K, then he maybe able to flip it and turn a profit. But if that happens, it will be in a completely separate, subsequent transaction. Even if you look to this hypothetical second sale, however, the $155K doesn't really figure. The new owner will have to find his own buyer, and they will have to agree on a price. That might happen to be $155K, but there's no real reason to believe that it will or it won't.
What if there were no mortgage, and you gave the friend the house? They are getting the house' value. In your case the discount from market value is their instant profit. We often think of our house in terms of the equity we have, plus the mortgage. Equity therefore is what's left after the mortgage is paid off, if you sell the house. In your question, you are, in effect, "giving all equity to your friend. Where else would you imagine it goes?