Commercial real-estate loans could generate losses of $100 billion by the end of next year at more than 900 small and midsize U.S. banks if the economy's woes deepen, according to an analysis by The Wall Street Journal.

Such loans, which fund the construction of shopping malls, office buildings, apartment complexes and hotels, could account for nearly half the losses at the banks analyzed by the Journal, consuming capital that is an essential cushion against bad loans.

Total...