We construct a new measure of mortgage credit availability using a technique developed for production frontier estimation. The resulting loan frontier describes the maximum amount obtainable by a borrower of given characteristics. We estimate this frontier using mortgage originations data from 2001 to 2014. We find a substantial expansion of mortgage credit for all borrowers during the housing boom, not only for low-score or low-income borrowers. The subsequent contraction in credit was most pronounced for low-score borrowers. Using variation in the frontier across metropolitan areas over time, we show that borrowing constraints played an important role in the recent housing cycle.