How do I calculate net interest margin (NIM) for a bank?
Net interest margin equals net interest income divided by average earning assets, expressed as a percentage. A bank that earns $90 million in net interest income on $2.5 billion in average earning assets has a NIM of 3.6%.
NIM measures how much profit a bank makes from its core lending and investing activities relative to the size of its interest-generating asset base. It captures the fundamental business of banking: taking in deposits at one rate and lending money out at a higher rate, with the difference (after subtracting all funding costs) expressed as a percentage of earning assets.
The Formula
NIM = (Net Interest Income / Average Earning Assets) × 100
Each component has a specific meaning:
- Net interest income is total interest income (what the bank earns on loans, securities, and other investments) minus total interest expense (what it pays on deposits, borrowings, and other funding sources)
- Average earning assets are the assets that generate interest revenue. These include loans, investment securities, interest-bearing deposits at other banks, and federal funds sold. The average is typically calculated by adding the beginning and ending period balances and dividing by two
Worked Example
Consider a community bank that reports $95 million in interest income and $5 million in interest expense for the year. Net interest income is $90 million. The bank's earning assets averaged $2.5 billion over the same period.
NIM = ($90 million / $2.5 billion) × 100 = 3.6%
This means the bank earned 3.6 cents on every dollar of earning assets after covering its funding costs. Most U.S. commercial banks operate with NIMs somewhere between 2.5% and 4.0%, though this range shifts with the prevailing interest rate environment.
NIM Versus Net Interest Spread
NIM and the net interest spread are related but not interchangeable, and confusing the two is one of the more common mistakes in bank analysis. The net interest spread is the difference between two separate ratios: the yield on earning assets (interest income divided by average earning assets) and the cost of interest-bearing liabilities (interest expense divided by average interest-bearing liabilities).
The key distinction is in the denominators. NIM uses total earning assets in its denominator, while the cost side of the spread calculation uses only interest-bearing liabilities. Banks fund a portion of their earning assets with non-interest-bearing deposits (like basic checking accounts) and equity, neither of which carries an explicit interest cost. Because the bank earns interest on assets funded by these free sources, NIM will almost always be higher than the net interest spread. The gap between the two reflects how effectively the bank puts its non-interest-bearing funding to work.
Tax-Equivalent NIM
Some earning assets, primarily municipal bonds, generate interest income that is exempt from federal income tax. A bank that holds a large municipal bond portfolio earns income that looks lower on paper but is worth more after taxes than equivalent taxable interest.
To compare NIM on an apples-to-apples basis across banks with different levels of tax-exempt holdings, analysts gross up the tax-exempt interest to its pre-tax equivalent:
Tax-equivalent interest = Tax-exempt income / (1 - Marginal tax rate)
A bank earning $5 million in tax-exempt interest at a 21% corporate tax rate would report this as approximately $6.33 million on a tax-equivalent basis ($5 million / 0.79). This adjusted figure replaces the actual tax-exempt income in the NIM formula, producing a tax-equivalent NIM that more accurately reflects the true earning power of the bank's asset portfolio.
Finding the Inputs in SEC Filings
The income statement (consolidated statements of income) is the starting point. Interest income and interest expense are typically broken out by category:
- Interest and fees on loans
- Interest on investment securities (often split between taxable and tax-exempt)
- Interest on deposits at other institutions
- Interest on borrowings (federal funds purchased, FHLB advances, subordinated debt)
Net interest income appears as a subtotal after these line items. Average earning assets may be disclosed directly in the management discussion and analysis (MD&A) section or in the supplemental statistical tables that many banks include in their 10-K and 10-Q filings. If the figure is not disclosed, you can approximate it by averaging the beginning-of-period and end-of-period totals for loans, investment securities, and other earning assets from the balance sheet.
Quarterly Calculations
NIM is inherently an annualized ratio because both the numerator and denominator cover the same time period. When you use one quarter of net interest income and the average earning assets for that same quarter, the resulting percentage is already expressed as an annual rate.
Some analysts multiply quarterly net interest income by four before dividing by quarterly average assets. This produces the same result since both sides of the fraction scale equally. The mistake to avoid is mixing time periods: dividing a full year of net interest income by a single quarter's average assets, or the reverse. Both the income figure and the asset base must align to the same period.
Common Calculation Mistakes
- Using total interest income instead of net interest income as the numerator. Total interest income does not subtract funding costs, so it overstates what the bank actually earns from its spread business.
- Mixing GAAP and fully tax-equivalent (FTE) figures without realizing it. Some banks report NIM on an FTE basis in their earnings releases, while the GAAP income statement does not include this adjustment. When comparing NIM across sources or between banks, check whether each figure is calculated on a GAAP or FTE basis.
- Using total assets instead of earning assets in the denominator. Total assets includes non-earning items like cash, bank premises, and goodwill that do not generate interest income. Including them dilutes the ratio and understates how much the bank earns on its productive asset base.
- Mismatching time periods between the numerator and denominator, such as using annualized income with a single quarter's average assets.
What the Result Tells You
A single NIM figure in isolation tells you relatively little. The real analytical value comes from tracking a bank's NIM across multiple quarters to spot trends, and from comparing it against peers of similar size and business mix.
Community banks tend to run higher NIMs because they hold a greater proportion of higher-yielding loans relative to securities, while larger banks often carry bigger securities portfolios and more wholesale funding that compress margins. A NIM of 3.2% might be strong for a $50 billion regional bank but below average for a $500 million community bank.
A declining NIM is not automatically a warning sign if the bank is intentionally shifting its asset mix toward lower-risk securities or growing non-interest-bearing deposits that will benefit margins over time. But an unexpected decline without a clear explanation in management commentary is worth investigating further.
Related Metrics
- Net Interest Margin (NIM)
- Return on Equity (ROE)
- Return on Average Assets (ROAA)
- Cost of Funds
- Cost of Deposits
- Interest Income to Average Earning Assets
Related Questions
- What is a good net interest margin for a bank?
- What causes net interest margin to increase or decrease?
- What is net interest income and why is it the most important revenue line for banks?
- How do I calculate yield on earning assets (interest income to earning assets)?
- Why do some banks have much higher NIMs than others?
- How do rising interest rates affect bank net interest margins?
Key terms: Earning Assets, Yield on Earning Assets, Net Interest Spread, Net Interest Income — see the Financial Glossary for full definitions.