What is Net Interest Margin and How Do I Calculate It?

“In the end, banking is a very good business unless you do dumb things.”

– Warren Buffett

Investing in banks remains the same as investing in other businesses. We need to understand the fundamentals and how they make money. Part of that understanding is the net interest margin or NIM. 

Part of how every bank makes money revolves around interest rates and the money banks make from lending. Much of a bank’s income stems from its credit portfolio and the spread between rates.

Understanding the inner workings of banks and the language of their accounting will go a long way. 

As the Federal Reserve continues raising rates, many assume banks would benefit. But this is not always the case, and the rates don’t always correlate. 

The net interest margin can help investors measure a bank’s profitability. And can be a great way to compare banks across asset sizes. 

In today’s post, we will learn:

Let’s dive in and learn more about the net interest margin.

What is the Net Interest Margin?

Net interest margin equals the income generated from interest products less the interest paid to lenders. 

The net interest margin remains a standard in the banking industry.  Many analysts use net interest margins to measure the profitability of banks. It can help investors and analysts determine how efficient the bank is in its lending policies.

Banks generate net interest income from a combination of the following:

  • Mortgages
  • Personal loans
  • Auto loans
  • Credit cards

For example, the interest rates they charge us for an auto loan equals interest income. They use our deposits as a source of capital for the auto loan. But to entice deposits, they need to pay interest. The interest a bank pays out for a deposit is an expense for the bank. 

The difference between interest income and interest expense equals net interest income. 

The net interest margin, expressed as a percentage, helps investors quickly determine a bank’s profitability. It also helps us determine how well a bank uses its assets to drive profits. 

Contrary to how you may think, a bank’s loans sit on the company’s balance sheet as assets.

Why is this?

Because the loans they give to customers generate revenue and interest income and are assets.

While the deposits they take in (such as savings accounts or CDs) pay interest to depositors, to the bank, these accounts and the interest they pay to encourage deposits represent an expense.

And as such, it represents a liability on the bank’s balance sheet.

As with most metrics, the higher the margin, the more profitable the bank. A positive ratio indicates the bank lends effectively. Do I need to say the words if the bank produces a negative ratio?

If the bank produces a negative net interest margin, it must create some changes. For example, they might shift toward more profitable assets and tighten their lending policies. Or they might consider offering only savings accounts with lower interest rates. 

Banking is one of the industries where interest rates can have a big impact on profits. So, having a basic understanding of the Federal Reserve and how they set rates is a good idea. 

Studies have shown a lag between interest rate changes and the impacts of net interest margin. More on this later.

As a general rule, as rates go up, profits for banks should follow. Some banks operate more efficiently and benefit more from rate hikes than others. But as a general rule, as rates go up, so do net interest margins.  

How Do You Calculate Net Interest Margin?

We can calculate the net interest margin by the following formula:

Net Interest Margin = ( IR – IE ) / Average Earning Assets


IR = Interest Income

IE = Interest Expense

Diagram, text

Description automatically generated with medium confidence

Let’s unpack the inputs for the formula.

Interest Income

Banks generate interest income from the interest payments on outstanding loans. For example, our mortgage payment equals interest income for Wells Fargo.

These assets on the balance sheet consist of the following:

  • Mortgages
  • Auto loans
  • Personal loans
  • Credit cards
  • Investments (bonds)

For example, in 2022, J.P. Morgan made $92.8 billion in interest income from the following sources:

  • Loans – $52.7 billion
  • Investments – $11.3 billion
  • Trading assets – $9 billion
  • Federal funds sold – $4.6 billion
  • Securities – $2.2 billion
  • Deposits in other banks – $9 billion
  • Other interest-earning assets – $3.7 billion

These assets are offset by deposit expenses equaling $26 billion, giving us a net interest income of $66.8 billion ($92.8 – $26).

The majority of J.P. Morgan’s liabilities include items such as deposits, trading liabilities, and long-term debt.

Interest Expense

As we can see from the quick example above, the interest income less the interest expenses equals the net interest income or the denominator of our formula.

An easy way to think about the relationship between interest income and expenses is the expense equals the cost of borrowing money. The interest expense equals the interest accruing on outstanding liabilities.

A deposit for a bank equals a liability because when they take in the deposit, they can turn around and lend out the money to generate income. And because our system operates on a fractional basis, for each dollar that enters a bank, they can lend $5 out.

But when the depositor requests their cash deposits, the bank has to repay the money, reducing their ability to lend.

It’s a little more complicated, but in simple terms, this is the way banks operate.

Average Earning Assets

A bank’s average earning assets include investments that produce income without much effort from the bank. For example, a bank’s investments such as the following:

  • Stocks
  • Bonds
  • CDs
  • Promissory Notes
  • Loans

To calculate the average earning assets of a bank, take the average of the beginning balance of the average earning assets and the ending balance. Or take 2021’s average earning assets from the balance sheet, and likewise with 2022, and then average them.

In the case of J.P. Morgan, their earnings assets on the balance sheet include the following:

  • Federal Funds sold
  • Securities borrowed
  • Trading assets
  • Available-for-sale securities
  • Held-to-maturity securities
  • Loans

Now that we understand the formula and where to find some line items, let’s put this to use.

Real-Life Examples of Net Interest Margin

In this section, we will work through some banks’ net interest margin calculations using their actual financials.

For our first guinea pig, let’s look at J.P. Morgan, using the latest 10-K, dated December 31, 2022. All the numbers listed below will be in millions unless otherwise stated.

JP morgan consolidated statements of income

Pulling info from the income statement, we see:

Net interest income = $66,710

JP morgan consolidated statements of income

Interest-earning assets:



Federal Funds






Trading assets



AFS securities



HTM securities






Total earning assets



So now, we can take our inputs and plug them into our formula.

JPM NIM = 66,710 /(2,701,843+2,635,290)/2 = 2.49%

That wasn’t so hard.

Let’s look at another one for giggles, PNC, and I will use the above chart to outline the inputs.

  • Net Interest income = $13,014 million

Average Interest earning assets:






Loans HFS



AFS securities



HTM securities






Equity investments






And now, taking the inputs from above and plugging them into our formula:

PNC NIM = $13,014 / (($502,126+$505,995)/2) = 2.58%

And to wrap it up, let’s look at one more for giggles.

For our final example, let’s look at the balance sheet of Charles Schwab (SCHW), dated December 31, 2022.

  • Net interest revenue – $10,682 million

Average interest-earning assets:



Cash + Investments



Receivables from Brokerage



AFS securities



HTM securities



Bank loans






And now, taking the above inputs and plugging them into our formula:

Schwab NIM = 10,682 / ((471,024+569,204)/2) = 2.05%

It is all fairly easy once we know where to find the different inputs and calculate the formula.

Potential Impacts on Net Interest Margin

Many factors, including supply and demand, can impact a financial net interest margin. I know, who would think supply and demand?

The net interest margin will decline if financials see a surge in demand for savings accounts relative to loans. The declines stem from the financials paying higher interest rates than they receive from loans, for example.

On the flip side, if the bank sees higher demand for loans than savings accounts, i.e., more customers want loans versus savings accounts, the bank’s net interest margin will grow.

Other factors impacting the net interest margins include Federal Bank policies. The Fed’s monetary policy greatly impacts the net interest margin of financials because these rate increases/decreases help drive supply and demand.

When rates are low, like they have remained for the last decade, we have seen a huge upswing in borrowing because money is cheap. Over time this can help increase net interest margins, generally.

But when rates increase, as we have seen for most of 2022 and 2023, borrowing becomes more costly, the demand for loans falls, and the demand for savings products increases, all of which puts a strain on net interest margins.

Contrary to popular belief, the Fed raising or lowering rates doesn’t impact net interest margins as much as one would expect.

For example, since 1984, the Fed has lowered rates to all-time lows, with periods of tightening or raising rates to fight inflation, avoid recessions, and other events. During this time, the net interest margin across the industry remained relatively flat.

movements of the fed funds rate and average net interest margin

Source: Federal Reserve Bank of Richmond

Average Net Interest Margins for Banks: Industry Overview

The net interest margin has fluctuated over the past few years, with several contributing factors influencing these changes. Among them are balance sheet structures, interest rate movements, and the pace of rate increases.

These factors impact any changes in net interest margin, including supply and demand discussed earlier.

The chart below helps us visualize the changes in net interest margin across the financial landscape.

drivers of net interest margin changes

Source: Federal Reserve Bank of Kansas City

For example, the net interest margin has grown from 3.17% to 3.41% over the last year plus. We can attribute the changes to a few factors:

  • Interest income from loans growing as rates rise
  • Interest income from services growing as rates rise
  • A decrease in both average earning assets and interest expenses.

The average net interest margin rate has fallen from 3.78% in 1984 to current levels of 3.37% in 2023.

According to the FDIC:

The Net Interest Margin Widened for the Third Consecutive Quarter: The net interest margin (NIM) increased 23 basis points from a quarter ago and 82 basis points from the year–ago quarter to 3.37 percent, above the pre–pandemic average of 3.25 percent. The year–over–year growth in the NIM was the largest reported increase in the history of the QBP.

The average yield on earning assets increased 76 basis points from the third quarter 2022 to 4.54 percent due to strong loan growth and higher market interest rates. Average funding costs increased 53 basis points from the prior quarter to 1.17 percent.”

Overall net interest margin rates have fallen from an average of 4.3% to current levels, with the overall trend going down. We can see this idea played out in the chart below.

net interest margin for all us banks

Source: Federal Bank of St. Louis

Zooming out, we can see some of the rates for a cross-section of financials to help compare any bank you might analyze.

  • J.P. Morgan – 2.47%
  • Bank of America – 2.31%
  • Charles Schwab – 2.16%
  • Bank of New York Mellon – 1.56%
  • Goldman Sachs – 0.88%
  • M&T Bank – 2.65%

If we dig deeper into J.P. Morgan’s latest quarterly report, we can see some commentary from Jamie Dimon, CEO, and what he thinks helps drive the net interest margin for the bank.

J.P. Morgan’s last quarter saw a net interest income of $10.6 billion, an 8.12% decrease from the previous quarter. However, the company’s guidance for the fourth quarter of 2022 implies an approximate run rate of $76 billion, which equals a big increase in the run rate from the first quarter.

Dimon stated that the company is comfortable with its earnings power and the margins and returns it generates. There is uncertainty surrounding the trajectory of key drivers, including rates, deposit reprice, and loan growth. Dimon also mentioned that the card net charge-off rate expects to be approximately 1.5%, which is below their previous expectations.

Investor Takeaway

To wrap up, the net interest margin is a key financial metric that measures the profitability of a bank or other financial institution.

We can calculate the ratio by dividing the bank’s net interest income by its average earning assets. A higher net interest margin tells us the bank is earning more money on its loans and investments than paying out interest on its deposits.

Several factors can affect a bank’s net interest margin, including the level of interest rates, the mix of loans and deposits, and the bank’s cost structure.

Banks can improve their net interest margins by raising interest rates on loans, lowering interest rates on deposits, or reducing their cost structure.

The net interest margin is an important metric for investors to consider when evaluating a bank’s financial performance. A higher net interest margin can indicate that the bank is more profitable and is better able to withstand economic downturns.

Some additional points to keep in mind when considering the net interest margin:

  • The net interest margin is a lagging indicator, meaning that it reflects past economic conditions.
  • The net interest margin can be volatile and can be affected by many factors, including changes in interest rates, the mix of loans and deposits, and the bank’s cost structure.
  • The net interest margin is not the only factor investors should consider when evaluating a bank’s financial performance. Other factors, such as asset quality, capital levels, and profitability, are also important.

And with that, we will wrap up our discussion related to net interest margin.

Thank you for reading today’s post, and I hope you find something of value. If I can further assist, please don’t hesitate to reach out.

Until next time, take care and be safe out there,


Learn the art of investing in 30 minutes

Join over 45k+ readers and instantly download the free ebook: 7 Steps to Understanding the Stock Market.

WordPress management provided by OptSus.com