HELOC vs selling stocks to pay for home repairs and credit card debt — trying to figure out the tax angle

Sitting on about 3 years of deferred maintenance and a credit card balance that's gotten uncomfortable. I have two options on the table: open a HELOC against the house, or sell some taxable brokerage positions to cover it. The stock side is a mix — some positions I've held over 2 years with big gains, a couple I bought last year that are slightly underwater. I already tried sketching out the capital gains math myself but got lost when I started thinking about whether selling the losers first would trigger wash sale issues if I want to buy back in. The HELOC side I understand less from a tax perspective. I keep hearing the interest deductibility depends on what you use the money for, which is part of why I'm here. Is there a clean way to think through the tax cost of each option side by side? Specifically trying to understand the capital gains exposure on the stock side and what, if any, deduction I'd get on the HELOC side.

34 comments

Schedule A is the starting point for the HELOC question. Interest on a home equity loan or line of credit is only deductible if the proceeds are used to buy, build, or substantially improve the home securing the debt. Using HELOC funds for credit card payoff would not be deductible — that interest goes on Schedule A as home mortgage interest only if the use-of-proceeds test is met. Home repairs that qualify as improvements might pass, but routine maintenance generally doesn't. Publication 550 and Publication 936 both touch this. Worth nailing down what portion of your repairs are improvements vs. maintenance before you assume any interest deduction.

Victor F.

Author

That use-of-proceeds distinction is exactly what I was fuzzy on. So even if the HELOC is secured by the house, using it to pay off a Visa gets me nothing on Schedule A. That changes the comparison a lot.

Correct, and lenders don't report the purpose to the IRS — it's on you to track it. If you mix uses (some for improvement, some for debt payoff) you'd have to allocate the interest, which gets messy fast.

On the stock side, the holding period is what drives the rate. Positions held more than one year get long-term treatment; one year or less are short-term. The count starts the day after your trade date and ends on the day you sell — settlement date doesn't count for securities on an established market. Your two-plus-year positions will be long-term. The ones you bought last year — check the actual trade dates carefully, because a day matters.

Victor F.

Author

Trade date noted. A couple of those "last year" buys might actually be right on the edge so I'll pull the confirms.

Every stock sale you make ends up as a line on Form 8949 at filing time, so plan with that in mind. I uploaded my brokerage 1099-B to taxr.ai last spring and it flagged that two of my positions had the same CUSIP as ones I'd bought within 30 days after selling at a loss — those triggered the wash sale rules and the losses were disallowed. It listed each transaction and showed me which column (f) code to enter and what adjustment to put in column (g). Saved me from just copying the 1099-B numbers straight onto the form without thinking about it. If you have underwater positions you plan to sell AND repurchase, run the dates on a 61-day window — 30 days before and 30 days after the sale date.

Victor F.

Author

61-day window is the number I needed. I was vaguely thinking 30 days but didn't realize it's 30 on each side of the sale.

The wash sale rule also catches purchases in an IRA or Roth IRA of substantially identical securities, not just your taxable account. A lot of people don't know that one. The disallowed loss does NOT get added to the IRA basis though — it's just gone.

One angle worth modeling: if you sell the losers without triggering wash sales, those losses offset your gains on Schedule D. Net long-term losses offset long-term gains first, then can offset short-term gains. If your net capital loss exceeds your gains, you can deduct up to the annual limit against ordinary income on Form 1040 line 7a, with any excess carrying forward. The carryover worksheet is in the Schedule D instructions. So the "cost" of selling winners might be lower than the headline gain number if you have harvestable losses to pair with them.

HELOC rates right now aren't trivial either, and if the deductibility is limited to the improvement portion, the after-tax cost of the HELOC might be closer to the cost of liquidating stock than it looks at first. Run both scenarios with actual numbers before deciding.

This. People assume the HELOC is automatically cheaper but once you strip out the non-deductible portion the gap narrows.

Cost basis question for the stock side: does your broker report basis as covered or noncovered? On Form 1099-B, box 12 tells you whether basis was reported to the IRS. Covered securities go in Part I box A or Part II box D on Form 8949. Noncovered go in box B or E. That affects whether you enter the 1099-B basis in column (e) even if it's wrong (box A/D) versus entering the correct basis directly (box B/E). If you have old lots with no reported basis you'll need to reconstruct it from your trade confirms.

Victor F.

Author

Most of my positions are post-2011 purchases so they should be covered, but I do have one inherited lot that I need to look at separately.

Inherited lot: basis is generally the fair market value at the decedent's date of death, not what they paid. And it's automatically long-term regardless of how long you've actually held it. If the estate had to file Form 706 there's a Form 8971 / Schedule A angle to check.

For the inherited shares specifically — when I had a similar situation I pasted the estate paperwork and brokerage statement into Taxr and it walked through the stepped-up basis rules and flagged whether I needed to check for a Form 8971. Helped me figure out the right number to put in column (e) of Form 8949 before I handed anything to my preparer. The Form 706 / 8971 piece is real: if the estate was required to file, the value reported on Schedule A of Form 8971 is what you have to use as basis, not an independent appraisal.

Victor F.

Author

Form 8971 is new to me — I'll check whether the estate was above the filing threshold. My preparer mentioned stepped-up basis but never said anything about 8971.

Going back to the HELOC interest: if any part of your repairs genuinely qualify as capital improvements, keep every receipt and contractor invoice. The improvement has to add value, prolong the life of the home, or adapt it to a new use. That documentation matters both for the Schedule A interest deduction and because qualifying improvement costs get added to your home's basis under Publication 523, which reduces your gain if you ever sell.

Victor F.

Author

Basis angle hadn't even crossed my mind. So improvements now reduce taxable gain on the eventual sale. That shifts the math further toward the HELOC for the improvement portion.

Don't forget state taxes. Long-term federal rates are one thing but depending on your state you could owe state capital gains tax on top. Some states don't have a preferential rate for long-term gains. That changes the true cost of liquidating.

Specific identification is worth knowing about if you haven't set it up with your broker. If you have multiple lots of the same stock bought at different prices, you can tell your broker which specific lot to sell before the sale settles. That lets you pick the highest-basis or oldest lots to minimize gains. If you don't specify, most brokers default to FIFO. Check your broker's method before you place the order — you generally can't change the lot designation after the trade settles.

Victor F.

Author

I think my broker defaults to average cost for mutual funds but specific ID for individual stocks. I'll double-check before I do anything.

Average cost is only an IRS-allowed method for mutual fund shares and certain dividend reinvestment plans, not for individual stocks. For individual stock positions the allowed methods are specific identification, FIFO, or in some cases the highest-in-first-out method your broker may offer. Worth confirming exactly what method is recorded.

The net investment income tax may apply depending on your overall income level — it applies on top of regular capital gains rates for taxpayers above certain thresholds. The Form 8960 instructions and Publication 550 describe it. Another reason to run actual numbers rather than just the Schedule D rate.

NIIT is real and people planning a large liquidation often miss it. The threshold and rate are in the Form 8960 instructions.

Form 6251 is worth a look if you hold any ISOs and are considering a large stock sale or borrowing event. I had a situation last year where I ran my numbers past Taxr — showed it my W-2, the 1099-B, and the ISO exercise records — and it spotted that my AMT exposure from the Form 6251 line 2i adjustment was going to interact with the capital gain side in a way I hadn't modeled. That was before I'd made any moves. Helped me figure out the right questions to bring to my CPA before anything was finalized.

Victor F.

Author

No ISOs in this situation, all RSUs, so I don't think AMT is on the table here. But good flag for anyone else reading.

RSUs vest as ordinary income and your basis in the shares is the FMV on the vest date — that's what shows up on your W-2. After that it's straight capital gain or loss on Form 8949 from vest price to sale price, short or long depending on your holding period from vest date.

On the credit card debt side: there is no tax deduction for personal credit card interest. That's just a straight cost. So the HELOC for that portion is a non-deductible loan replacing non-deductible interest — you might get a lower rate but you're putting your home on the line for what was unsecured debt. Worth factoring in the risk side, not just the tax side.

To summarize where this thread has landed on the stock side: sell positions held over one year for long-term treatment; watch the 30-days-before and 30-days-after window on any position you sell at a loss and want to rebuy (wash sale); check Form 1099-B box 1g for any wash sale amounts already flagged by your broker; report everything on Form 8949 with the right box checked and right column (f) code; net losses carry forward if they exceed gains and the annual deduction limit. That's the checklist I'd run through.

Victor F.

Author

This is a solid checklist. My plan is to pull all the trade confirms, sort by date, map the lots, then decide which to sell. Will bring the full picture to my preparer before executing.

One scenario people overlook: selling stock to pay off the credit card first, then opening the HELOC only for the qualifying home improvements. That way the HELOC balance is 100% improvement-related, the interest deduction holds up, and you've eliminated the ambiguity from mixing uses. Cleaner documentation too.

That's the structure I'd think through too. Mixed-use HELOC allocation is a headache nobody needs. Keeping them separate makes the Schedule A line 8 interest much easier to defend.

If the total capital gain exposure ends up being significant, a CPA or enrolled agent is worth talking to before you sell anything. Especially with the inherited lot basis question still open and the NIIT angle — those aren't hard problems but they interact, and a preparer can run the actual numbers against your full return rather than just the Schedule D piece in isolation.

Schedule D line 16 is where the net capital gain or loss lands after everything flows up from Form 8949. If it's a loss, the deductible amount against ordinary income goes to Form 1040 line 7a subject to the annual limit, with the rest on the carryover worksheet. If it's a gain, it flows through the Qualified Dividends and Capital Gain Tax Worksheet to figure the actual tax. That worksheet is in the Form 1040 instructions and is where the long-term rate actually gets applied.