Can you borrow against stocks instead of selling to avoid capital gains tax?

Been sitting on a pretty big gain in a taxable brokerage account — bought years ago and the position has grown a lot. My financial advisor mentioned I could borrow against stocks instead of selling to avoid capital gains tax, like a securities-backed line of credit (SBLoC) or pledged asset line. The idea being I get the cash I need without triggering a taxable event. Sounds almost too clean? I want to make sure I'm not missing something on the tax side. Does the loan itself create any taxable income? What about the interest — is that deductible? And are there any IRS traps I should know about before I go down this road? I've been reading Publication 550 but it's dense and I want to make sure I'm reading it right.

34 comments

I went through this with a pledged asset line last year. The loan itself is not a taxable event — borrowing is not income, full stop. You still own the shares, your cost basis doesn't change, and no capital gain is triggered. That's the whole appeal. Where it gets complicated is on the interest side and what happens if the account drops and the broker forces a sale.

Eric B.

Author

That forced sale scenario is exactly what worries me. If the broker liquidates shares to cover a margin call, that sale is fully taxable right? Like the loan doesn't shield you from that.

Correct. A forced sale is still a sale. The IRS doesn't care why it happened — if shares are sold at a gain, you have a capital gain. That's the risk people underestimate with these strategies.

I uploaded my brokerage statements and a summary of the SBLoC terms to taxr.ai and it walked through which parts of my situation would and wouldn't create taxable events. Really helped me see that the loan proceeds themselves are clean but the interest deductibility question was more complicated than I thought. Sharing what it found: investment interest expense is deductible only to the extent of your net investment income, and you claim it on Form 4952, not just as a line item somewhere.

Eric B.

Author

Form 4952 — hadn't even heard of that one. So the interest isn't just automatically deductible, there's a cap tied to investment income?

Exactly. And net investment income for this purpose doesn't automatically include long-term capital gains or qualified dividends unless you make an election to treat them as ordinary — but that election has tradeoffs on the rate those items get taxed at. Publication 550 at irs.gov covers investment interest expense in detail.

The strategy works until it doesn't. I had a concentrated position, took out a securities line, market dropped hard, broker issued a margin call, I couldn't post additional collateral fast enough and they liquidated shares. Ended up with a large capital gain I hadn't planned for and no cash left over because I'd already spent the loan proceeds. Plan for that scenario before you do this.

Eric B.

Author

This is a genuinely sobering story, thank you. Did you have any recourse with the broker or was the sale just done?

Sale was done. The agreement I signed gave them the right to liquidate without notice. Read that fine print carefully.

One thing worth separating out: there's a difference between a true non-purpose securities-backed loan and a margin loan. Margin loans tend to have lower interest rates but stricter maintenance requirements. Non-purpose loans (like a pledged asset line from a larger bank) often have more flexibility but may have their own covenants. The tax treatment of the loan itself is the same — not taxable — but the risk profile differs.

Agreed on separating those. Margin calls on margin accounts can come with very short notice windows, sometimes same day.

I gave Taxr my brokerage year-end statement and the loan agreement summary and it flagged that my interest charges from the pledged line needed to go through Form 4952 before anything reached Schedule A, and it drafted a worksheet showing how much of my investment interest was actually deductible given my net investment income that year. Saved me from just writing the full interest off and getting it wrong.

Eric B.

Author

That worksheet piece is helpful — I wouldn't have known Form 4952 was even in the picture.

I always thought borrowing against stocks was something only ultra-wealthy people did but it's actually pretty accessible now through major brokerages. The tax angle is real: no sale, no gain recognized. But I'd add that if you die holding the pledged shares, your heirs get a stepped-up basis and the loan gets repaid from the estate — that's a popular estate planning angle, though that's more of a CPA or estate attorney conversation than a DIY one.

Eric B.

Author

The stepped-up basis piece is interesting. So in theory you hold, borrow, spend, never sell, and the gain disappears at death?

In theory yes, and that's sometimes called 'buy, borrow, die.' But it only works cleanly if the loan gets repaid without forcing a sale of the appreciated assets. If the estate has to sell to repay, the gain could still be recognized depending on basis at that point. Estate planning attorney territory for sure.

If the loan pays for personal stuff like buying a car or taking a vacation, the interest on a securities-backed loan is not deductible, period. The investment interest deduction on Form 4952 only applies when the proceeds are used to buy taxable investments. If you used the loan proceeds for personal spending, the interest is nondeductible personal interest.

Eric B.

Author

Wait — does the IRS actually trace what you use the loan proceeds for?

Yes, the use of proceeds matters for interest tracing rules. If the loan is secured by investments but you spend the cash on personal items, the interest follows the use, not the collateral. So it becomes personal interest, which is not deductible. If you re-invest the proceeds in taxable investments, you can run it through Form 4952.

I had my broker confirm in writing that the draw on my pledged line wouldn't trigger a 1099-B, just to have something on file. They confirmed it. No sale, no 1099-B. The year I did draw I got no reportable event from them on that transaction.

Smart move getting that in writing. Good documentation habit.

Pledging shares in a margin account that also holds losing positions adds another wrinkle: any forced sale could potentially trigger wash sale issues if you rebuy within 30 days before or after. The wash sale rules disallow the loss and add it to the basis of the repurchased shares, with code W on Form 8949. Worth being aware of if you're actively trading in the same account.

Eric B.

Author

I hadn't thought about the wash sale interaction. The position I'm thinking of pledging is a long-term hold with a big gain so not relevant here, but good flag for people with more active accounts.

I looked into this for a rental property down payment — wanted to borrow against my brokerage to avoid selling and triggering gains. The loan itself worked fine, no tax event. But I want to flag: if you're using securities loan proceeds to buy real estate or other non-investment property, the interest tracing rules mentioned earlier mean that interest is likely not deductible as investment interest. It follows the use.

Just to be precise on the holding period point: even while the shares are pledged, your holding period keeps running. As long as you don't sell, the clock ticks. So if you pledged shares you've held for 10 months and hold through the pledge for another 3, you're at 13 months and long-term. Pledging alone doesn't reset the clock.

Eric B.

Author

Good clarification — my shares are well past the one-year mark so I'm definitely in long-term territory already.

I want to correct something I've seen implied in a couple places here: the wash sale rule applies to losses, not gains. If your pledged shares have a big gain and get force-sold, you don't have a wash sale problem — you have a capital gain. The wash sale concern only bites if you're selling at a loss and rebuying within the 30-day window on either side.

Fair correction. I was flagging it as a general awareness point for people who also have losing positions in the same account, not saying it applies to the original poster's gain situation. But yes, the disallowed loss rule and the W code on Form 8949 only matter when there's a loss.

ISO holders weighing whether to borrow instead of sell to fund an exercise are looking at a whole separate calculation because of the AMT. Exercising ISOs creates an AMT adjustment on Form 6251 line 2i based on the spread at exercise. The borrowing-against-stocks strategy doesn't directly touch that, but it's worth knowing if ISOs are part of your holdings.

Eric B.

Author

Not ISOs in my case, just plain brokerage shares with long-term gains. But useful for others reading.

The bottom line from my experience: borrow against stocks instead of selling to avoid capital gains tax is a legitimate strategy, the loan is not taxable, but you need to match your loan purpose to the interest deductibility rules, have a plan for a margin call, and not over-lever. I'd run the numbers with a CPA before committing, especially if the position is large enough that a forced sale would be a serious problem.

The investment interest deduction is limited to net investment income in the year, but hitting that limit doesn't mean the excess is gone. Any disallowed amount carries forward to future years on Form 4952 — it doesn't just disappear. So if this is a multi-year borrowing situation, you may be building a carryforward that becomes deductible in a future year when you have more net investment income.

Eric B.

Author

Carryforward piece is new to me — so the interest isn't necessarily lost forever if I exceed my investment income in a given year. That's actually useful.

Exactly. Form 4952 tracks it. The instructions for Form 4952 walk through the carryforward calculation — worth reading before you finalize anything.