Selling Investments for a Down Payment: Capital Gains, Timing and Taxes
Some links are affiliate links; we may earn a commission at no extra cost to you. As an Amazon Associate I earn from qualifying purchases.
How capital gains tax works when you sell stocks or funds to buy a home, why holding periods matter, and how to time the sale so your down payment holds up.
Some home buyers build part of their down payment in a regular brokerage account: index funds bought years ago, company stock from an employer plan, or an inheritance that was invested. When it's time to buy, that money has to be turned into cash. Selling sounds simple, but two things can quietly shrink what you have to put down: a market drop right before you sell, and a tax bill you didn't plan for. This guide explains how capital gains taxes work on a sale, why timing matters, and how to plan the move from investments to cash.
Gains, losses and cost basis
When you sell an investment in a taxable account, the IRS cares about the difference between what you sold it for and your cost basis, which is generally what you paid, including reinvested dividends. If you sell for more than your basis, you have a capital gain. If you sell for less, you have a capital loss.
Only the gain is taxed, not the whole sale amount. If you sell $40,000 of fund shares that cost you $30,000, your gain is $10,000. Your brokerage reports sales on Form 1099-B, and for shares bought in recent years it generally tracks your basis for you. For older shares or transferred accounts, check that the basis on file is correct.
Short-term vs. long-term
How long you held the investment changes the tax rate. According to the IRS's capital gains and losses topic:
- Short-term gains, on investments held one year or less, are taxed at your ordinary income tax rates, the same as wages.
- Long-term gains, on investments held more than one year, get lower rates. Depending on your taxable income, the long-term rate is generally 0%, 15% or 20%.
- Higher earners may also owe the 3.8% net investment income tax on gains when their income exceeds certain thresholds.
- If your losses exceed your gains, you can generally deduct up to $3,000 of net capital losses a year against other income ($1,500 if married filing separately), and carry the rest forward.
The income thresholds for each long-term rate are adjusted each year; check the IRS page for the current numbers.
Worked example: why the holding period matters
Say you need to sell $40,000 of an index fund, and your gain is $10,000.
- If you've held the shares more than a year and you're in the 15% long-term bracket, the federal tax on the gain is about $1,500.
- If you sell some of those shares a few weeks before they cross the one-year mark, and your ordinary rate is 22%, the tax on that same $10,000 gain would be about $2,200.
- If your taxable income is low enough for the 0% long-term rate, the federal tax could be $0, though state tax may still apply.
That's a difference of hundreds of dollars for the same sale, based only on timing. Before selling, look at your purchase dates. If some lots are close to the one-year mark and your closing date allows it, waiting can pay off. Many brokerages also let you choose which specific shares, or "lots," to sell. Selling lots with the highest cost basis, or those with losses, can reduce the taxable gain.
The bigger risk: the market moving before you sell
Taxes are predictable. Markets aren't. If your down payment is fully invested in stocks and the market falls 20% the month before closing, you either bring less money to the table, borrow more, or delay. Investor.gov's guide to mutual funds and ETFs is clear that fund values go up and down and you can lose money.
That's why many people sell gradually as their purchase gets closer, rather than all at once at the last minute. A common approach is to start shifting the money you'll need into cash or short-term, low-risk holdings one to three years before you expect to buy, so a downturn late in the process can't wreck your plan. Our guide to where to keep a down payment explains how your timeline should shape that mix, and our index funds guide covers why long-term investments and near-term goals are a tricky fit.
Spreading sales across two tax years can also help in some cases, for example selling part in December and part in January to keep more of the gain in a lower bracket each year.
Don't forget the tax bill when you budget
Capital gains taxes are usually owed with your tax return for the year of the sale, not at the moment you sell. That's convenient for your closing, but dangerous if you spend everything. If you sell investments with a sizeable gain, set aside an estimate of the tax in savings. If the gain is large, you may need to make an estimated tax payment during the year to avoid underpayment penalties. A tax professional can help you figure out whether that applies to you.
Here's what that looks like in your planning. Suppose you're aiming for a 10% down payment on a home near the national median sales price of $393,300 (Q3 2026), or $39,330. If part of that comes from a sale with a $10,000 long-term gain taxed at 15%, you'd want an extra $1,500 set aside beyond your down payment and closing costs, so the tax doesn't come out of your emergency fund next April.
What the lender will want to see
Lenders verify where your down payment comes from. If your funds are in a brokerage account, expect to provide recent statements. Some lenders also ask for proof that you sold the investments and that the cash landed in your account, particularly if the account's value only modestly exceeds what you need. Keep the trade confirmations and the transfer records. Move the money into your bank or directly to the closing agent with plenty of time, since a sale and transfer can take several business days, and verify any wiring instructions by phone, as our closing wire fraud guide explains.
A few traps to avoid
- Selling at a loss and buying right back. If you sell an investment at a loss and buy the same or a substantially identical one within 30 days before or after, the wash sale rule can disallow the loss for now.
- Mixing up account types. These rules apply to taxable brokerage accounts. Withdrawals from IRAs and 401(k)s follow different rules; see our guide to using retirement savings for a home.
- Forgetting state taxes. Most states tax capital gains as ordinary income, and a few don't have an income tax at all.
- Waiting for a rebound. Holding on after a drop in hopes the market recovers before closing turns a down payment into a bet.
Tax and investing references
Cost basis and holding periods decide more than sticker gains. A beginner investing and taxes book is a useful secondary reference next to IRS publications and your brokerage 1099s.
investing and taxes guide books on Amazon (Affiliate link. We may earn a commission.)
Practical takeaways
Only the gain is taxed, and holding more than a year usually lowers the rate. Check your lot dates and choose lots carefully. The bigger danger is market risk, so move the money you'll need toward cash well before you buy. Set aside the expected tax, keep documentation for your lender, and transfer funds early. Model your timeline in our calculators and watch your progress in the tracker.
Sources
- IRS: Topic 409, Capital gains and losses
- Investor.gov: Mutual funds and ETFs
- Investor.gov: Capital gains distribution
- CFPB: Buying a house
Tax rules and thresholds change each year and depend on your situation; talk with a tax professional before a large sale. This article is for education only and is not financial or tax advice.