Is margin interest deductible against capital gains?

Is margin interest deductible against capital gains? Trying to figure out where I stand for this year. I've been using a margin account pretty heavily — borrowed against my portfolio to buy more positions, paid a decent chunk in interest. My broker shows the total on my year-end statement. I assumed it would just offset my capital gains on Schedule D but now I'm reading that it's not that simple. Looked at Publication 550 and saw something about "investment interest expense" and a Form 4952 but I couldn't follow how the limit actually works or whether my gains count as the income I can deduct against. Does the type of gain matter? Long-term vs short-term? I haven't filed yet and want to make sure I'm putting this on the right form and line.

33 comments

The short answer is: not automatically, and not dollar-for-dollar against capital gains the way you might expect. Margin interest is investment interest expense, deductible on Schedule A (if you itemize) up to your net investment income for the year — that limit is calculated on Form 4952. Net investment income is a specific IRS definition: short-term gains count automatically, but long-term capital gains are only included if you elect to treat them as investment income, and that election comes with a cost.

Olivia M.

Author

Thanks, that's the core of what I was missing. So I need Form 4952 regardless and Schedule A. What's the cost you mentioned with electing to include the gains?

Had a nearly identical situation last year — margin interest, mostly long-term gains. I uploaded my brokerage statement and my draft return to taxr.ai and it flagged that my Form 4952 line 4g was blank when it should've had an entry, and it walked through exactly which lines tied to Schedule A line 9. Saved me from under-reporting my deductible amount. To answer your question though: the "cost" mentioned above is that if you elect to include long-term capital gains as investment income on Form 4952, those gains get taxed at ordinary rates instead of the preferential long-term rate. So you're trading a lower tax rate for a bigger deduction — you have to run the numbers to see which helps more.

Olivia M.

Author

That tradeoff is what I suspected but hadn't seen spelled out. I'll run both scenarios. Good to know Form 4952 line 4g is where that election shows up.

Does your margin interest all relate to buying taxable investments? Because if any of it was used to buy tax-exempt securities, that portion is not deductible at all — Publication 550 is pretty clear on that. Worth checking how your broker categorized the borrowing.

Olivia M.

Author

All taxable positions, no munis or tax-exempt anything. But good flag, I wouldn't have thought to check.

Same goes for borrowing to fund an IRA or Roth IRA contribution — that interest also doesn't qualify. Not common but worth knowing.

Are you itemizing? Because the deduction lives on Schedule A line 9. If you're taking the standard deduction, Form 4952 still computes the allowed amount but you get zero benefit from it in the current year — the disallowed portion carries forward though, indefinitely, which is the one piece of good news if you're in standard-deduction territory.

Olivia M.

Author

I do itemize, so that part works in my favor. Didn't realize there was a carryforward either — that's useful for future years if the deduction gets capped.

To be clear on how the limit works: net investment income generally includes interest, dividends (non-qualified), short-term gains, and royalties. Long-term gains and qualified dividends are excluded by default. So if your only investment income is long-term gains, your deductible margin interest is zero without that election. You'd carry the whole amount forward.

Does it matter which positions the margin was actually used to buy? Like if I borrowed and then sold something for a loss, does that change anything?

The IRS doesn't require you to trace margin borrowing to specific securities for the investment interest deduction — it's your total net investment income that matters, not which lot was bought on margin. But if you have wash sales or disallowed losses in the mix, those don't increase your net investment income either.

Got it, so it's a portfolio-level calculation not a lot-by-lot one. That simplifies things.

Worth mentioning Form 4952 line 1 — that's where the investment interest expense itself goes. Lines 4 through 6 work through the net investment income limit, and line 8 is what actually flows to Schedule A. I gave Taxr my Schedule A draft and the Form 4952 beside it and it caught that I'd pulled the wrong number into Schedule A line 9 — I had a rounding difference that also messed up my state return. Useful double-check when these forms talk to each other.

Olivia M.

Author

Thanks — I'll make sure the number on Schedule A line 9 matches what comes out of Form 4952 line 8 exactly. Good reminder to check the state return too.

Can someone clarify — if you make the election to treat long-term gains as investment income, does that apply to all of your long-term gains for the year or just part of them?

You can elect a partial amount — Form 4952 lets you specify how much of your net capital gain you're treating as investment income. You don't have to elect all of it. The instructions for Form 4952 walk through the calculation. The key is whatever amount you elect loses the preferential rate and is taxed as ordinary income.

That's more flexible than I thought. So you'd elect just enough to absorb the margin interest and leave the rest at the lower rate.

One thing I'd double-check: are you sure your broker is reporting the margin interest correctly on the year-end statement? Mine had it bundled into a line that looked like a fee and I almost missed pulling it out. It should be clearly labeled as margin interest or interest on margin loans.

Olivia M.

Author

Mine shows it separately as 'margin interest paid' on the tax document summary, so I think I'm okay, but I'll confirm the number matches what's in my account activity.

The carryforward mentioned earlier is worth emphasizing. If your net investment income is lower than your margin interest in a given year, the disallowed amount carries to the next year on Form 4952 — no expiration. So it's not lost, just deferred until you have enough investment income to absorb it.

What about if the margin account is inside a trust or a retirement account — does the same Form 4952 treatment apply?

Retirement accounts can't hold margin in the standard sense — FINRA rules generally prohibit it, and IRAs can't have loans against them without disqualification. Inside a trust, yes, the investment interest rules can still apply but the return and form would be filed differently. That situation probably calls for a CPA or enrolled agent familiar with trust returns.

Something to keep in mind: the investment interest deduction is only available if you itemize. If you're close to the standard deduction threshold, running the numbers both ways before electing to treat gains as investment income is worth doing. The election affects your rate on those gains and you want to be sure the Schedule A deduction actually clears the standard deduction before you give up the lower rate.

Olivia M.

Author

Good point. I need to tally up my other itemized deductions first and confirm the total beats the standard deduction before I commit to anything on Form 4952.

Can margin interest ever land somewhere other than Schedule A — like deducted directly on Schedule D or somewhere else?

Not for investment margin interest — it's investment interest expense and belongs on Form 4952 then Schedule A line 9 if you itemize. It doesn't offset capital gains directly on Schedule D or Form 8949. Some people confuse this because margin interest feels like a cost of trading, but the IRS treats it as a separate category from your gain/loss on the securities themselves.

That clears it up. I'd been assuming it reduced the gain directly, which is not how it works at all.

Publication 550 covers investment interest expense in detail if anyone wants to read the actual rules — the IRS page for it is at irs.gov/publications/p550. The section on investment interest walks through net investment income, the Form 4952 limit, and the carryforward all in one place.

Worth saying plainly: if your margin interest is very large relative to your investment income, and especially if you're also dealing with carry-forwards from prior years, it might be worth having an enrolled agent or CPA review Form 4952 before you file. The interactions between the election, the rate change, and multi-year carry-forwards can get complicated fast.

Olivia M.

Author

My situation isn't huge but I'll at least walk through it carefully and maybe have someone look it over before I submit.

Did you check whether any of the interest was paid in December but not actually debited to the account until January? Timing matters — you generally deduct it in the year you actually paid it on a cash basis, not when it accrued.

Olivia M.

Author

Good catch — I'll reconcile the statement date against the account activity to confirm the year the payment actually hit.