What Is Net Interest Margin (NIM)? Formula and Examples in Banking
By Markets & Investing DeskUpdated Nov 10, 2026

Definition
Net interest margin (NIM) is a bank's net interest income, meaning interest earned minus interest paid, divided by its average earning assets and expressed as a percentage.
Key takeaways
- NIM = (interest income − interest expense) ÷ average earning assets.
- The numerator is net interest income (NII), a dollar amount. NIM turns it into a rate so banks of different sizes can be compared.
- A positive NIM means the interest earned on assets exceeds the interest paid on funding. A negative NIM means the reverse.
- NIM depends on loan and deposit pricing, the mix of loans and securities, how quickly assets and liabilities reprice, and how much of the balance sheet is funded by money that costs nothing.
- NIM is measured before credit losses and operating costs. A wide margin does not by itself mean a profitable or safe bank.
Net interest margin (NIM) is a bank’s net interest income (interest earned minus interest paid) divided by its average earning assets, expressed as a percentage. It shows how much a lender keeps from its core business of borrowing money at one rate and lending or investing it at a higher one, scaled to the assets that produce that interest. In banking, NIM is one of the first figures analysts check, because interest income is the main revenue source for most deposit-taking institutions.
How Net Interest Margin Works
A bank takes in deposits and other borrowed funds, pays interest on part of them, and puts the money into loans and securities that pay interest back. This is maturity transformation: banks typically fund longer-dated loans with short-term deposits and earn the difference between the two rates. Net interest income is that difference in dollars. NIM expresses it relative to the assets doing the earning.
Calculating Net Interest Margin
The net interest margin formula:
NIM = (Interest income − Interest expense) ÷ Average earning assets
- Interest income includes interest on loans, investment securities, interest-bearing balances at other banks or the central bank, and similar assets.
- Interest expense includes interest paid on deposits, borrowings and issued debt.
- Average earning assets are the interest-producing assets averaged over the period (for example, the average of daily or quarterly balances). Branches, equipment, goodwill and non-interest cash in the vault are excluded because they earn no interest.
An average is used because balances change over a quarter or year, while interest accrues on the balances actually held during the period. When a bank reports a quarterly NIM, it is usually annualized so it can be compared with yearly figures.
Interpreting Net Interest Margin
There is no single dividing line between a good and a bad net interest margin. A useful reading compares a bank with its own history and with peers that have a similar business model. A credit card lender, for instance, earns much higher rates on its loans than a bank focused on home mortgages or commercial lending, so its NIM will typically be higher. A falling NIM at one bank while peers hold steady points to something specific, such as rising deposit costs or loans repricing lower.
A negative NIM means the institution pays more in interest than it earns. If a firm earns $1 million on its assets, pays $2 million in interest expense and holds $10 million of average earning assets, its NIM is ($1M − $2M) ÷ $10M = −10%. A firm in that position would be better off using the funds to reduce its debt than keeping them in those assets.
Why Is Net Interest Margin Important?
For a traditional bank, net interest income often makes up most of revenue, so small changes in NIM move earnings. Applied to a hypothetical $50 billion of earning assets, a margin change of 0.10 percentage point equals $50 million of annual net interest income. That sensitivity is why bank managements give NIM guidance and why investors watch it closely when interest rates shift.
NIM also shows how a bank is positioned for rate changes:
- Asset-sensitive banks have assets that reprice faster than liabilities (for example, floating-rate business loans funded by slow-moving deposits). Their NIM tends to widen when rates rise and compress when rates fall.
- Liability-sensitive banks have funding that reprices faster than assets (for example, long fixed-rate mortgages funded by deposits that must be repriced to keep customers). Their NIM tends to compress when rates rise.
How much of a rate change a bank passes on to depositors (its deposit beta) is often the deciding factor. Central bank policy shapes the starting point, but competition for deposits, loan demand and the yield curve determine how much of the change shows up in the margin.
Over the long run, U.S. bank margins have tracked the direction of the federal funds rate. Industry-wide NIM averaged roughly 3.8% from 1984 onward but trended lower over time, dipped during recessions, and compressed for years after the 2008 financial crisis while policy rates sat near zero, before recovering in 2015.
Example of Net Interest Margin
Hypothetical bank, one year, annual figures:
| Item | Average balance | Rate | Annual interest |
|---|---|---|---|
| Loans | $400 million | 6.0% | $24.0 million |
| Securities | $100 million | 4.0% | $4.0 million |
| Earning assets | $500 million | $28.0 million | |
| Interest-bearing deposits | $420 million | 2.0% | $8.4 million |
| Borrowings | $30 million | 5.0% | $1.5 million |
| Interest-bearing liabilities | $450 million | $9.9 million |
Net interest income = $28.0M − $9.9M = $18.1M. NIM = $18.1M ÷ $500M = 3.62%.
The bank’s net interest spread is different. It compares average yields and costs as rates: 5.60% yield on earning assets ($28.0M ÷ $500M) minus 2.20% cost of interest-bearing liabilities ($9.9M ÷ $450M) = 3.40%.
NIM is higher than the spread because $50 million of the earning assets are funded by money that carries no interest: non-interest-bearing checking accounts and shareholders’ equity. This is also why raising new capital and putting it into loans or securities can lift NIM: the new assets earn interest, but the funding behind them adds no interest expense.
Limitations of Net Interest Margin
- It stops before credit losses. NIM is calculated from net interest income before the provision for credit losses. A bank can show a wide margin by lending to riskier borrowers at high rates, then give much of it back when those loans default.
- It ignores operating costs and fee income. A high-margin bank with expensive branches can earn less than a low-margin bank with lean costs and strong fee businesses. Return on assets and return on equity (ROE) capture the full result.
- Business models differ. Banks that earn a large share of revenue from wealth management, trading or payments can run lower margins without being weaker.
- Definitions vary. Banks differ in how they calculate average earning assets and in whether they report NIM on a tax-equivalent basis, which grosses up tax-exempt interest (such as on municipal bonds) to its pre-tax equivalent. Compare figures only on the same basis.
- One-off items distort it. Interest recoveries on previously nonaccrual loans, prepayment fees or accounting accretion on acquired loans can inflate a single period. Some banks therefore also report a core NIM that strips such items out.
NIM vs. Related Measures
| Measure | What it is | Unit |
|---|---|---|
| Net interest income (NII) | Interest income minus interest expense | Dollars |
| Net interest margin (NIM) | NII divided by average earning assets | Percent |
| Net interest spread | Yield on earning assets minus cost of interest-bearing liabilities | Percent |
| Gross interest margin | Interest income relative to earning assets, before subtracting interest expense (usage varies) | Percent |
| Profit after tax (PAT) | Bottom-line profit after provisions, operating costs and taxes | Dollars |
NII tells you how much interest profit a bank made. NIM tells you how efficiently its earning assets produced it. Neither replaces total revenue or profit after tax: NII leaves out fee income, and NIM leaves out every cost below the interest line.
FAQs
Is NIM calculated net of the allowance for credit losses?
The numerator is not reduced by the provision for credit losses: net interest income is measured before it. Treatment of the allowance in the denominator depends on each bank's definition of average earning assets, so check the bank's disclosure when comparing.
What does "core NIM" mean?
Core NIM is a bank's net interest margin after removing items it considers non-recurring, such as accretion on acquired loans or unusual fee recognition. It is not a standardized measure, so each bank's adjustments should be read before comparing.
Is net interest income or total revenue more useful for evaluating a bank?
It depends on the bank. For a lender that earns most of its revenue from interest, net interest income and NIM explain most of the earnings picture. For banks with large fee or trading businesses, total revenue, along with efficiency and return measures, gives the fuller view.
The Bottom Line
NIM matters most to investors and analysts judging banks that rely on interest income, since small shifts move earnings and reveal how a lender is positioned for rate changes. Compare a bank's NIM with its own history and with peers that share its business model, using the same calculation basis. Because NIM stops before credit losses, operating costs and fee income, pair it with return on assets and return on equity before drawing conclusions.















