How to raise cash for a home purchase without a large capital gains tax from selling brokerage

Trying to figure out how to raise cash for home purchase without large capital gains tax from selling brokerage accounts. We found a house and need a significant down payment within 60 days. Most of our savings are in a taxable brokerage — a mix of ETFs and individual stocks, some held for years with very low cost basis. I pulled up the unrealized gains and nearly fell over. If I sell enough to cover the down payment, the long-term capital gain alone would be huge, and I know it stacks on top of our ordinary income, which puts us in a worse bracket. I've been reading about margin loans, pledged asset lines, and harvesting losses to offset, but I don't know which of these actually makes sense here or whether there's a way to report it that softens the blow. Has anyone navigated this?

35 comments

Faced almost this exact crunch two years ago. The first thing I did was map out which lots had the smallest gain per dollar of proceeds — lot-level selection (specific identification) means you sell the highest-basis shares first. Your broker has to let you designate the lot before settlement. That alone shrank my taxable gain meaningfully without reducing the cash I raised.

Dana C.

Author

Specific ID step noted — does the broker confirm the designation in writing? I want a paper trail.

Paper trail step: yes, most brokers email a confirmation of the lot you designated. Save it. The 1099-B they send in January will reflect whichever lot they used, and that has to match what you designated.

Before I sold anything I uploaded my brokerage statements and a spreadsheet of all my lots to taxr.ai and had Taxr sort every position by gain-to-proceeds ratio, then flag which sales would trigger a wash sale if I bought back within 30 days. That list made the decision much cleaner. On the tax side: long-term gains (held more than one year — count from the day after trade date you bought to the trade date you sell) are reported on Form 8949 and flow to Schedule D. The rate depends on your taxable income that year, so running a projection before you sell matters a lot.

Dana C.

Author

That gain-to-proceeds sort is exactly what I need. I didn't think about the wash sale angle — if I sell a losing position to harvest and then rebuy within 30 days, that loss is disallowed?

Wash sale step: correct. Under Publication 550, if you sell at a loss and buy substantially identical shares within 30 days before or after, the loss is disallowed. The disallowed amount gets added to the cost basis of the new shares. Code W on Form 8949, column (f), and the amount goes in column (g) as a positive number.

Pledged asset line (PAL) is worth looking at seriously. You borrow against the portfolio without selling, so no taxable event at all. The catch is the interest rate and the margin call risk if the market drops. It's not a tax solution, it's a timing solution — eventually you either sell to repay or use other income. But for a 60-day crunch while you close, some people use it to close first and then sell more strategically over time, spreading gains across two tax years.

Two-tax-year step: I did this. Sold enough to repay the PAL in December and January — first chunk one tax year, second the next. It cut the gain in each year significantly.

Dana C.

Author

Two-year spread step: this is clever. Does the interest on the PAL count as investment interest expense?

Investment interest step: it can, but it's limited to your net investment income for the year. You'd deduct it on Schedule A (Form 4952 feeds into it). Worth running the numbers, but it's not a simple dollar-for-dollar offset.

Don't forget losses you're already sitting on. I went through my whole account before a big sale last year and found positions I'd been ignoring that had real losses. Sold those in the same tax year, reported them on Form 8949 and Schedule D, and they offset dollar for dollar against my gains. What's left after gains and losses — if it's a net loss — you can only deduct a limited amount against ordinary income per year, with the rest carrying forward. The IRS caps that; check Topic 409 for the number.

Dana C.

Author

Carryforward step: so the excess loss doesn't disappear, it just waits until next year?

Carryforward step: exactly. The Capital Loss Carryover Worksheet in Publication 550 or the Schedule D instructions tells you what carries. It keeps its character — long-term loss carries as long-term.

My situation last year was similar and I had Taxr read through my Schedule D draft and my 1099-B side by side to flag where the cost basis my broker reported didn't match what I calculated for specific-identified lots. It caught two mismatches I would have missed. Separately on strategy: if any of your positions have an unrealized loss, selling them before year-end and waiting 31 days before rebuying avoids the wash sale rule. The 31-day wait is the clean way to harvest the loss and still report it on Form 8949.

Dana C.

Author

1099-B mismatch step: how common is that? I assumed the broker's basis was always right.

Broker basis step: brokers only track basis for "covered" securities — generally those bought after certain dates when reporting rules kicked in. Older positions or anything transferred between brokers can have wrong or missing basis. If the basis isn't right and was reported to the IRS (box A or D on Form 8949), you correct it with an adjustment in column (g) and note code B in column (f).

Something people miss with the pledged asset line path: lenders treat the monthly interest payment as a liability when underwriting the mortgage. So depending on how large the line is, it can affect your debt-to-income ratio and change what mortgage you qualify for. Might be worth confirming with the lender before you lean on that strategy.

DTI step: good catch. The underwriter will ask for statements showing the outstanding balance.

I pulled from a Roth IRA contributions (not earnings) for a down payment once — contributions come out tax and penalty free at any time since they were already taxed. That's not from the brokerage, but if you have a Roth it's worth checking how much of the balance is contributions vs. growth. The IRS ordering rules treat contributions as coming out first.

Dana C.

Author

Roth step: I do have a Roth but it's small. Good to know contributions are always accessible.

The rate on long-term gains isn't fixed — it depends on your total taxable income that year. So if you're selling in a year with a lot of other income (bonus, freelance, whatever), the gains get taxed at a higher rate than if you sell in a quieter year. Run a projection with your tax software before you finalize which lots to sell and when.

Dana C.

Author

Projection step: working on it now. This is why the two-tax-year strategy from earlier makes sense.

Installment sales are sometimes mentioned in this context but they don't apply here — that's for seller-financed deals where the buyer pays you over time. When you're the one selling stock in the market, you get cash immediately and owe tax in the year of sale. Just wanted to close that door since I see it confused a lot.

For inherited positions: if any of the low-basis stock came to you through an estate, the basis is stepped up to fair market value at the date of death (or the alternate valuation date if the estate chose it). That changes your gain calculation entirely. Check Publication 551 for the inherited property rules.

Dana C.

Author

Inherited step: none of mine are inherited, but useful context for others in this thread.

If you're carrying forward a loss from a prior year, don't forget it on this year's Schedule D. I nearly forgot mine — it flows in through the Capital Loss Carryover Worksheet and directly offsets this year's gains before you get to any net result.

One path I took: sold only long-term positions with the smallest unrealized gains, used specific identification to pick those exact lots, and left the big-gain positions alone. The down payment was smaller than I wanted but I negotiated with the seller to cover the gap with a slight price adjustment. Not always possible but worth asking.

Dana C.

Author

Negotiation step: creative. We might have some flexibility on the down payment amount too.

For the Form 8949 mechanics: each sale goes on its own line. Columns are description, date acquired, date sold, proceeds, basis, any adjustment codes in (f) and the adjustment amount in (g), then the gain or loss in (h). Long-term lots (held more than one year) go in Part II; short-term in Part I. The totals flow to Schedule D.

8949 step: and if all your sales have basis reported to the IRS and no adjustments, you can skip Form 8949 entirely for those and put the totals straight on Schedule D line 1a or 8a — Exception 1 in the Form 8949 instructions.

Dana C.

Author

Exception 1 step: I didn't know that shortcut existed. Will check the instructions.

The holding period counts from the day after the trade date you bought to the trade date you sell — settlement date doesn't matter for securities on an established market. So if you're close to the one-year mark on a position, waiting a day or two can flip it from short-term to long-term. That's worth checking on anything you're considering selling.

Holding period step: I almost sold a position two days before it turned long-term. Caught it last minute.

If the gains are large enough to be life-changing — say you're liquidating a heavily concentrated position — it may be worth an hour with a CPA or enrolled agent before you execute. The strategy of which lots, which year, and whether a PAL makes sense is exactly what they're for. The tax cost of a bad sequence of sales can exceed the cost of advice.

Dana C.

Author

Professional step: agreed, I'm going to book a session before I pull the trigger on anything.