Is Margin Interest Deductible Against Capital Gains?

Yes, margin interest is deductible against capital gains, but with an important split: short-term capital gains count toward the deduction automatically, while long-term capital gains and qualified dividends only count if you make a specific election that gives up their preferential tax rate. In either case, the deduction is capped at your net investment income for the year, and anything you can’t use carries forward.

Short-Term Gains Count Automatically

Short-term capital gains are taxed at ordinary income rates, so the IRS folds them into your net investment income (NII) with no extra step.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses Sell stock you held a year or less, book $10,000 of gain, and that full $10,000 raises the ceiling on how much margin interest you can write off this year. Add any taxable interest and non-qualified dividends and you have your NII.2Internal Revenue Service. Form 4952 – Investment Interest Expense Deduction

This is the clean case. You keep the tax character of your gains, and your margin interest gets deducted up to the NII limit.

Long-Term Gains and Qualified Dividends Require an Election

Long-term capital gains and qualified dividends are excluded from NII by default because they already receive preferential rates. To use margin interest against them, you elect on Form 4952 to reclassify some or all of that income as ordinary investment income.2Internal Revenue Service. Form 4952 – Investment Interest Expense Deduction You pick the dollar amount; it’s not all-or-nothing.

The cost is direct. Every dollar you elect to include loses the 0%, 15%, or 20% capital gains rate and is taxed at your ordinary rate instead. You make the election on line 4g of Form 4952. Once filed, you can only revoke it with IRS consent, so the choice is locked in for the year. A late election is allowed on an amended return filed within six months of the original due date, not counting extensions.

When the Election Is Worth It

The math depends on the gap between your ordinary rate and your capital gains rate, and on how much interest you’d otherwise carry forward with no NII to absorb it. For 2026, long-term gains are taxed at 0%, 15%, or 20% depending on taxable income, while ordinary rates run from 10% to 37%.3Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026, Including Amendments from the One, Big, Beautiful Bill

A worked example: an investor in the 24% ordinary bracket has $20,000 of long-term gains taxed at 15% and $12,000 of disallowed margin interest that would otherwise carry forward. Electing to reclassify $12,000 of those long-term gains as ordinary income costs an extra $1,080 in tax on the reclassified gains (the 9-point spread between 24% and 15%, applied to $12,000). But the deduction now saves $2,880 (24% of $12,000). Net benefit: $1,800.

The election tends to help when:

  • Your ordinary bracket is low (10% or 12%), so the spread between ordinary and capital gains rates is small or zero.
  • You have a large carryforward that isn’t likely to be absorbed by future NII.
  • Your long-term gains would fall in the 0% bracket anyway. In 2026 that means taxable income under $49,450 single or $98,900 joint. Reclassifying those gains costs nothing in lost preference if they stay in the 0% zone.

The election tends to hurt when you’re in the 32% to 37% bracket and your long-term gains would otherwise be taxed at 15%. That 17-to-22-point spread usually outweighs the value of accelerating the deduction, unless the carryforward is very large and you don’t expect to use it any other way.

The Net Investment Income Cap and Carryforward

The deduction can never exceed your NII for the year. Pay $8,000 of margin interest with only $3,000 of NII, and you deduct $3,000 now; the other $5,000 carries forward to next year.4Office of the Law Revision Counsel. 26 USC 163 – Interest The carryforward is indefinite. It keeps its character as investment interest and joins next year’s Form 4952 calculation, again subject to the NII ceiling.

NII equals gross investment income minus investment expenses other than interest. Advisory and custodial fees reduce it. Two things do not survive the taxpayer’s death: unused carryovers are lost. For jointly held accounts, a surviving spouse generally carries forward only their share.

Investors who run heavy margin against growth stocks that pay little income can build up years of frozen deductions. That’s the situation where periodically re-running the election math matters, because a year with a low ordinary bracket or a 0% capital gains bracket may be the moment to convert the carryforward into real savings.

Not All Margin Interest Qualifies

The IRS traces interest by how the borrowed money is actually used, not by what secures the loan. Borrow on margin to buy stock, and the interest is investment interest. Borrow on margin and pull the cash out to buy a car, and the same interest becomes non-deductible personal interest.5eCFR. 26 CFR 1.163-8T – Allocation of Interest Expense Among Expenditures (Temporary) The regulations give a direct example: pledging investment stock as collateral for a loan spent on personal expenses produces zero investment interest deduction. Collateral doesn’t decide the character; use of proceeds does.

If you’ve used margin funds for a mix of purposes, you’ll need to trace each disbursement to figure out what share of the interest qualifies. Interest tied to buying tax-exempt securities such as municipal bonds is not deductible at all.6Internal Revenue Service. Topic No. 505, Interest Expense

You Have to Itemize

Investment interest is an itemized deduction. It only produces a real tax benefit if your total itemized deductions clear the standard deduction, which for 2026 is $16,100 for single filers and $32,200 for married filing jointly.3Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026, Including Amendments from the One, Big, Beautiful Bill If your state and local taxes, mortgage interest, charitable gifts, and margin interest together don’t clear that number, the standard deduction wins and the write-off effectively disappears for the year.7Internal Revenue Service. Deductions for Individuals: The Difference Between Standard and Itemized Deductions, and What They Mean

The disallowed amount still carries forward, so a year of taking the standard deduction doesn’t destroy the interest expense. It waits.

How to File It

You claim the deduction on Form 4952, which walks through the NII calculation and produces the allowable amount.8Internal Revenue Service. About Form 4952, Investment Interest Expense Deduction Total interest expense (including any carryforward) goes on line 1. The NII math happens on lines 4a through 4f. If you’re electing to include long-term gains or qualified dividends, that amount goes on line 4g. Line 8 produces your allowable deduction, which then transfers to Schedule A, line 9. Excess interest carries forward automatically.2Internal Revenue Service. Form 4952 – Investment Interest Expense Deduction

If you file the election on line 4g, use the Schedule D Tax Worksheet in the Schedule D instructions rather than the Qualified Dividends and Capital Gain Tax Worksheet to figure the tax on Form 1040, line 16. That step is what actually taxes the elected gains at ordinary rates.

Two Boundaries Worth Knowing

The 3.8% Net Investment Income Tax is a separate calculation. It applies to modified AGI above $200,000 single or $250,000 joint and uses its own broader definition of net investment income that already includes long-term gains and qualified dividends without any election.9Internal Revenue Service. Topic No. 559, Net Investment Income Tax Your Section 163(d) margin interest deduction reduces regular taxable income on Schedule A, but it does not reduce the NII figure used for the 3.8% surtax. If you’re above those thresholds, factor the surtax in separately when weighing the election.

The Alternative Minimum Tax can also change the result. Form 4952 notes that investment interest may need to be recalculated on Form 6251 for AMT purposes.2Internal Revenue Service. Form 4952 – Investment Interest Expense Deduction For taxpayers near or above the AMT line, that recalculation can shrink or wipe out the deduction’s real value, so it’s worth running both calculations before locking in the election.