SAN FRANCISCO — Spoiler alert: This story will make you cry. First the good news. The median price of a house in the San Francisco Bay area fell to $742,900 at the end of last year, according to analysis released last month from mortgage adviser HSH.com. Even better, you only need to earn $142,448 to buy it. Why is that good news? For the San Francisco Bay area — known for its sourdough bread, well-paying tech jobs and, yes, expensive housing — those pricing and salary numbers are at bargain basement levels. That median price, for instance, is about $1,500 less than it was in September, while 30-year fixed mortgages are at a record low of 4.02 percent. “Affordability improved pretty much everywhere, largely because of unexpectedly low mortgage rates,” said Keith Gumbinger, vice president of HSH.com, which factored in housing prices, a standard 20 percent down payment and mortgage rates to find home buyers’ minimum qualifying salaries across 27 metropolitan areas.