Banks and housing go hand in hand. For the vast majority of homeowners, the purchase of a home goes hand in hand with taking out a mortgage. 

As such, the housing business is a big money maker in the banking industry, especially so at some of the nation's leading home lenders like Wells Fargo (WFC 0.58%), JPMorgan Chase (JPM 0.78%), and Bank of America (BAC 1.33%).

How much money do these banks actually make lending on residential real estate?

Let's dive deep into the bank's most recent filings with regulators to get the answer (at present time, this data is still only available for the quarter ended March 31, 2014).

How do banks make money on housing?
Bank's make money from real-estate lending in three primary ways. First, there is the interest charged on the mortgage loans themselves. Second, banks generate revenue by charging fees related to those loans. Third, bank's earn money by charging servicing fees on loans they have sold to investors. These loans are no longer on the bank's books, but for a small fee the bank will continue to bill the customer, follow up for collection, and provide the front end customer interactions to ensure the loan is repaid.

We'll examine all three. 

Wells Fargo
In the first quarter, Wells Fargo generated $3.4 billion in interest income from 1-4 family residential real estate. This represents 31% of total interest income. The bank's average yield on these loans was 4.1%.

On the fee side of the equation, mortgage production contributed $575 million to the banks noninterest income. This is down sharply from 2013's numbers, as the mortgage refinance boom dried up in the second half of 2013 into 2014. In the first quarter, mortgage production represented just 6% of total noninterest income. In the fourth quarter, that number was 24%.

Adding in mortgage servicing and the percentage of total mortgage fees rise to 15% of total noninterest income, or $1.5 billion.

Altogether, Wells Fargo can attribute about $4.9 billion to lending activities on 1-4 family residential properties. That's 28% of the bank's $17.5 billion in total gross income.

JPMorgan Chase
JPMorgan relied less heavily on 1-4 family lending than Wells, reporting $2.0 billion in interest income from those properties. This was 17% of total interest income with an average yield of 3.9%.

JPMorgan generated $292 million in mortgage production income. Like Wells, this number was down considerably from 2013 -- moving lower by about $200 million quarter over quarter. 

The bank's mortgage servicing business brought in $713 million.

Altogether, JPMorgan's mortgage businesses generated $3.0 billion in the first quarter. That's 14% of the bank's $21.4 billion in total gross revenues.

Bank of America
Bank of America produced $3 billion of interest income from loans secured by 1-4 family homes in the first quarter. The average yield was 3.59%, and these loans represented 26% of the bank's total interest income. 

On the fee side, Bank of America generated $400 million in fees from new loan production and another $600 million from loan servicing fees. Like both Wells and JPMorgan, B of A saw a significant decline in mortgage fees in the first quarter.

Altogether, Bank of America produced $4 billion in revenue from its mortgage businesses. That's 20% of the bank's $19.8 billion in total gross revenues. 

Foolish takeaways 

The first, and perhaps most obvious conclusion from this exercise is that the mortgage business is very, very important to these banks. That being the case, this also paints a clear picture of some of the strategic differences between these mega banks.

Wells Fargo has made no secret that its strategic hinges heavily on success in mortgage lending. Its no surprise then that among these banks Wells depends most heavily on the mortgage business.

JPMorgan's focus is more diversified. The bank has a world leading investment banking division as well as the worlds largest portfolio of derivatives. JPMorgan is a key player in the U.S. mortgage market, but it's certainly not putting all its eggs in one basket.

Bank of America, of course, is in a different predicament altogether than either Wells or JPMorgan. After the fiasco that was the Countrywide acquisition, B of A has spent billions trying to clean up the mess that was its mortgage portfolio. The bank's long-term success will depend on fixing those problems first, and then refocusing on its historical core as a retail bank.