The limit. For individuals, estates and trusts, section 163(d)(1) says the deduction for investment interest "shall not exceed the net investment income of the taxpayer for the taxable year". Net investment income is investment income minus investment expenses. Investment income includes taxable interest, nonqualified dividends, annuity income and royalties from property held for investment, and short-term gains from selling investment property. The limit stops borrowed money from producing a deduction against wages or business income while the investment's return is deferred or taxed at lower rates.
The carryforward. Under section 163(d)(2), interest disallowed in one year is treated as investment interest paid in the next year, and so on, with no expiration. It becomes deductible in a year when net investment income is large enough to absorb it.
The election for qualified dividends and capital gains. Qualified dividends and net long-term capital gains from investment property are left out of investment income unless the taxpayer elects to include them, on line 4g of Form 4952. Whatever is elected stops qualifying for the lower capital gains rates and is taxed at ordinary rates. So the election trades a lower rate on those dollars for a larger interest deduction now, and it only pays when the interest deduction is worth more than the rate difference given up. Once made, the IRS says, the election can be revoked only with its consent.
What does not count. The rules follow the use of the borrowed money, under allocation regulations that trace loan proceeds. Interest on a margin loan used to buy a car is personal interest, which is not deductible, even though stocks secure the loan. Interest on debt used to buy or carry tax-exempt municipal bonds is disallowed by section 265 and is not investment interest at all. Interest on a loan used in an active business is business interest, with its own rules.
Investment expenses now. Investment expenses are deductions other than interest directly connected with producing investment income, such as depreciation on an investment asset. Advisory fees and similar costs used to be miscellaneous itemized deductions; those are now permanently disallowed under section 67(h), so they no longer count as investment expenses either, which leaves net investment income higher and the interest limit easier to meet.
Two different "net investment income" figures. The 163(d) figure is not the same as the base for the 3.8% net investment income tax under section 1411, although investment interest that is deductible reduces both.