Should I sell stocks with capital gains to pay off credit card debt?

Trying to figure out if selling stocks with capital gains to pay off credit card debt actually makes sense financially and tax-wise. I've got a brokerage account with some positions that are up pretty significantly — mix of short-term and long-term gains depending on the lot. Credit card balance is sitting at a high APR and it's bothering me. I know selling triggers a taxable event and I'll get a 1099-B, then have to report everything on Form 8949 and Schedule D. But I can't figure out whether the tax hit makes this a bad trade. I've been trying to run the numbers myself but I keep second-guessing whether I'm accounting for the tax cost correctly. Is there a clean way to think through this, and does the short-term vs. long-term distinction actually change the decision that much?

36 comments

The short-term vs. long-term distinction changes the answer a lot. Short-term gains are taxed as ordinary income, same rate as your wages. Long-term gains (held more than one year — counting from the day after you bought to the trade date you sell) get the preferential capital gains rates. So the first thing to do is separate your lots: which positions cross that one-year mark and which don't. That alone can flip whether the math works.

Megan V.

Author

Yeah that's what I suspected. I've got some lots I bought about 14 months ago that would be long-term and some from earlier this year that would definitely be short-term. The short-term ones have bigger gains which is the annoying part.

Sell the long-term lots first if you can. Same credit card payoff, lower tax rate on the gain. Your broker lets you pick specific lots when you sell — usually called "specific identification" — so you're not forced to sell the highest-tax shares.

Ran through this myself last year. The break-even math is basically: after-tax proceeds from the sale need to exceed what you'd pay in interest keeping the debt. If your credit card APR is high and the gain is long-term, it often works. If the gain is short-term and you're in a higher income bracket, the tax hit can eat enough of the proceeds that it's closer than you'd think.

Megan V.

Author

That framing helps. So I need to estimate my marginal rate on the short-term gains (since those just stack on top of my other income) and then compare the after-tax sale proceeds to the interest I'd actually pay carrying the debt. Is that the right structure?

Exactly right. And don't forget your state income tax on the gains if your state taxes capital gains — some states don't distinguish between short and long-term at all, they just treat it as regular income.

One thing worth flagging: if you sell and immediately rebuy the same stock, that's not an issue for gains (wash sale rules only apply to losses), but I see people mix this up all the time. Wash sales disallow a loss when you sell at a loss and buy substantially identical stock within 30 days before or after. Gains don't trigger that rule. So if you're selling winners, no wash sale concern.

Came here to say this. People panic about wash sales on their winning positions and it's not relevant. Wash sale is a loss rule only.

I was in almost this exact situation — long-term positions with big gains and high-interest debt. I uploaded my brokerage statements to taxr.ai and asked Taxr to estimate the after-tax proceeds lot by lot. It went through each position, applied the holding period rule, and gave me a side-by-side of what I'd net after federal tax on each lot. Made it really easy to see which lots to sell first. For the actual tax reporting, whatever you sell shows up on your 1099-B and you report it on Form 8949 — proceeds in column (d), basis in column (e), and the gain flows to Schedule D.

Megan V.

Author

That lot-by-lot breakdown is exactly what I was trying to build in a spreadsheet. Good to know there's a faster way to see it.

Something people skip: check whether selling pushes you into a higher bracket for other income. Short-term gains stack on top of your ordinary income, so if you're near the top of a bracket already, a large short-term gain could push some of your income into a higher rate. Worth mapping out your full income picture before you decide how much to sell at once.

Megan V.

Author

I hadn't thought about that cascading effect. I'm going to look at my projected total income for the year before I pull the trigger on the short-term lots.

Also worth noting: if you have any capital loss carryovers from prior years, those offset gains dollar for dollar on Schedule D before you get to any taxable amount. Check your prior year Schedule D or the carryover worksheet.

Honestly the psychological side matters too. High-APR debt compounds every month whether you feel it or not. Even if the tax cost reduces your net proceeds, eliminating the debt removes a guaranteed ongoing cost. Stocks going up is not guaranteed. Paying 20%+ APR is a guaranteed loss.

Felt that. Paid off a card with long-term gains two years ago and even after taxes I came out ahead because I had stopped a compounding interest charge I was never really going to pay off at the minimum.

Worth actually modeling this before you decide. I had Taxr read through my 1099-B from last year and check how the gains would have landed on Form 8949 and Schedule D — it flagged that two of my lots were just barely short-term and I could have waited a few more weeks to get long-term treatment. For your situation, knowing the exact dates on your lots matters a lot. The holding period for securities traded on an established market starts the day after your trade date and ends on the trade date you sell.

Megan V.

Author

The "just barely short-term" thing is really useful to check. Some of my lots from earlier this year might be close to that one-year line. If I can wait a few weeks on those it might be worth it.

Exactly. Pull your trade confirmations or look at the acquisition dates your broker shows per lot. If a lot flips to long-term in 3 weeks, waiting usually makes more sense than selling it short-term today.

Don't overlook the net investment income tax if your modified AGI is above a certain threshold — adding a large capital gain can push you over. The instructions for Schedule D point to Form 8960 for that calculation. It applies to investment income including capital gains for higher-income filers.

Good catch. The threshold and rate are in the Form 8960 instructions — I won't throw out numbers here because they depend on filing status and the year, but it's real and it can affect the net proceeds calculation.

If your positions are in a taxable brokerage account, the 1099-B your broker sends will show covered vs. noncovered securities. For covered securities, the broker reports your basis to the IRS. For noncovered ones (older shares, some transfers), they may not. Either way you report every sale on Form 8949 — Part I for short-term, Part II for long-term — and check box A, B, or C (or D, E, F for long-term) depending on whether basis was reported to the IRS.

Megan V.

Author

Good reminder. My broker shows all my recent purchases as covered so I think they'll all be on a 1099-B with basis reported, which means box A or D on Form 8949 depending on the holding period.

Are you considering selling everything at once or in stages? Spreading the sales across two tax years is a real option if the gains are large — you'd recognize part this year and part next year, which can keep you out of a higher bracket or below certain thresholds each year. Doesn't help if the credit card interest in the meantime costs more than the tax savings, but it's worth running both scenarios.

Megan V.

Author

I hadn't seriously thought about splitting across years. The card has a high enough rate that carrying it another few months has real cost, but for the really large lots it might still make sense. Good angle.

Run the actual interest cost of waiting vs. the marginal tax difference. Sometimes it's close enough that the simplicity of doing it all now wins. Sometimes waiting is clearly better. It's worth the 20 minutes to actually calculate it.

If any of your positions have unrealized losses too, you could harvest those losses in the same year to offset the gains on Schedule D. Net the losses against the gains before you end up with a taxable amount. That's the whole point of tax-loss harvesting — you're not stuck only looking at the winning positions.

Megan V.

Author

I do have a couple positions that are down. So I could sell those in the same transaction window and offset some of the gain. Just need to make sure I don't rebuy those losers within 30 days or I'd trigger the wash sale rule and lose the deduction.

Right, and the wash sale window is 30 days before AND after the sale, so if you bought more of that position in the 30 days before you sell at a loss, that counts too. The disallowed loss gets added to the basis of the new shares rather than being gone forever, but you can't use it in the current year.

Has your income been pretty consistent year to year? If you had a lower-income year coming up — say you're between jobs or retiring — it might be worth waiting to realize gains then. The rate on long-term gains depends on your total taxable income for the year, so a year with less other income can mean a meaningfully lower rate on the same gain.

Megan V.

Author

My income is pretty stable so probably not a big factor for me, but good thing to flag for others reading this.

The practical steps once you decide: pick the specific lots to sell using specific identification at your broker before you place the order, confirm the trade dates, then when the 1099-B arrives next January you'll have proceeds and basis per lot. Report each sale on Form 8949 with the correct box checked for whether basis was reported, carry the totals to Schedule D, and the net gain or loss hits your Form 1040.

If you want to verify your lot dates yourself, the holding period section of Publication 550 on the IRS site walks through exactly how to count them. The rule is the day after your trade date starts the count, and your sell trade date is the last day — not the settlement date.

Megan V.

Author

Going to read that before I finalize anything. I want to double-check the exact dates on my near-the-line lots before I sell them short-term by accident.

One scenario where selling gains to pay debt gets complicated: if you have an installment agreement or any tax debt with the IRS, a large capital gain can affect that situation. Not saying that applies to you, but if it does, an enrolled agent would be worth talking to before you trigger a big gain.

To actually answer the original question directly: yes, it can make sense to sell stocks with capital gains to pay off credit card debt, but only after you've figured out your after-tax net from each lot. The tax cost on long-term gains is usually low enough that high-APR debt payoff still wins. Short-term gains are the ones that need careful math because the rate is your ordinary income rate. Run the numbers with your actual bracket, your state tax, and your exact lot holding periods before you sell.

Megan V.

Author

This is basically the conclusion I'm landing on too. Sell the long-term lots first, check my near-the-line short-term lots to see if waiting a few weeks makes sense, offset with any loss positions I have, and then do the full Form 8949 and Schedule D reporting when the 1099-B comes in. Thanks everyone.