Selling Stocks for a House Down Payment: Timing and Tax Traps

Short answer

Money you need for a home within about a year usually should not stay in stocks, because a normal market drop can shrink the down payment before closing. Selling creates capital gains tax: in 2026, shares held over one year are taxed at 0%, 15% or 20% federally, while shares held a year or less are taxed at ordinary income rates up to 37%.

Key takeaways

  • Money needed on a fixed date, like a closing day, has no time to recover from a market drop, so it usually belongs in cash-like holdings once the purchase is within about a year.
  • For 2026, a single filer pays 0% federal tax on long-term gains up to $49,450 of taxable income, 15% up to $545,500, and 20% above that. Married couples filing jointly use $98,900 and $613,700.
  • Shares held one year or less are taxed as ordinary income (10% to 37% federal), so a few extra weeks of holding can cut the tax on a gain.
  • Your brokerage balance is not your spendable amount: subtract the estimated tax on the gain before you make an offer.
  • Pulling from a 401(k) or traditional IRA before age 59 and a half usually adds a 10% additional tax, with a few exceptions, so a regular brokerage account is normally the first source.

Should you sell stocks before buying a house?

If you expect to close on a home within about a year, selling the stocks earmarked for the down payment and holding the cash is the usual approach. Stocks suit goals that are a decade or more away. Over a few months, prices can fall sharply for reasons that have nothing to do with your closing date.

The tradeoff is simple. You give up possible further gains in exchange for knowing the money will be there on closing day. For a fixed deadline, a missed gain is an annoyance, while a shortfall can cost you the house or force you to borrow more.

How big is the timing risk?

A market drop in the final months can erase a meaningful part of a down payment, and you cannot wait for a recovery because the closing date is fixed. Here is the arithmetic on a $60,000 down payment:

  • A 15% decline leaves $60,000 x 0.85 = $51,000, a $9,000 shortfall.
  • A 10% decline leaves $54,000, a $6,000 shortfall.

Over ten or twenty years, stock prices have tended to rise. Over three to twelve months, the direction is close to a coin flip, which is why this money is a poor fit for stocks. For more on protecting money you cannot afford to lose, see How to Preserve Capital When Markets Get Scary.

Common places to hold near-term cash are a high-yield savings account, a money market fund, or short-term Treasury bills. Each has different safety features, so check how your bank or fund is protected before you move a large sum.

How are gains taxed when you sell?

Your gain is the sale price minus your cost basis (what you originally paid), and the tax rate depends on how long you held the shares. Using the IRS 2026 inflation adjustments:

Holding period Tax treatment 2026 federal rate, single filer
One year or less Short-term capital gain Ordinary income rates, 10% to 37%
More than one year Long-term capital gain 0% up to $49,450; 15% up to $545,500; 20% above

For married couples filing jointly in 2026, the long-term thresholds are 0% up to $98,900, 15% up to $613,700, and 20% above that. The thresholds apply to taxable income, which is your income after deductions, not your salary.

Two extras can apply. Higher earners may owe a 3.8% net investment income tax when modified adjusted gross income passes $200,000 (single) or $250,000 (joint). Most states also tax gains separately.

There is no exemption for spending the proceeds on a home. The tax is the same whatever you do with the cash.

Does waiting a few weeks change the tax?

Yes, if a lot of shares is close to its one-year anniversary. The holding period counts from the day after you bought the shares to the day you sell them, and you need to hold for more than one year to get long-term rates.

Suppose you have a $20,000 gain and your marginal ordinary rate is 24%. Sold early, the tax is about $4,800. Sold after the one-year mark at 15%, it is $3,000. That is a $1,800 difference from waiting a few weeks, which may be worth it if your closing date allows and you are comfortable with the market risk over that short stretch.

How to choose which shares to sell

If you bought the same stock at different times and prices, each purchase is a tax lot. Most brokerages let you pick specific lots instead of the default method.

A lot with a small gain or a loss creates less tax than a lot with a large gain. Holding periods matter too: a long-term lot is usually taxed more lightly than a short-term one. Set the lot selection before you place the sale, because it is often hard to change afterward.

If you hold a large amount of a single stock, see Concentrated Stock Positions for why selling it may reduce risk as well as raise cash.

Can losses offset the tax?

Yes. Capital losses first offset capital gains of the same kind, and then the other kind. If losses exceed gains, up to $3,000 a year ($1,500 if married filing separately) can reduce other income, and the rest carries forward to future years, according to the IRS.

Selling a losing holding in the same year is called tax-loss harvesting, and Tax-Loss Harvesting Explained covers the mechanics. Watch the wash sale rule: if you buy the same or a substantially identical security within 30 days before or after the sale, the loss is disallowed for now.

What about using a retirement account?

Treat retirement accounts as a last resort. Withdrawals from a 401(k) or traditional IRA are generally taxed as ordinary income, and withdrawals before age 59 and a half usually add a 10% additional tax unless an exception applies.

One exception is a first-time homebuyer withdrawal from an IRA, which avoids the 10% additional tax up to $10,000 over your lifetime, but the income tax still applies on traditional money. Rules differ for 401(k) plans, so check your plan and a tax professional before taking money out. Beyond the tax, you also lose years of compounding on that money.

Worked example: $60,000 position, two paths

You hold $60,000 of stock that cost $40,000, a $20,000 gain, all held more than one year. You expect to close in five months. You are a single filer with $90,000 of other taxable income, so the gain falls in the 15% bracket.

Path 1, sell now and hold cash. Federal tax is $20,000 x 15% = $3,000. You keep $57,000 for the down payment, before any state tax and ignoring any interest earned.

Path 2, stay invested and sell at closing. If the market falls 12% in the meantime, the position is worth $52,800. The gain is now $12,800 and the tax is $12,800 x 15% = $1,920, leaving $50,880.

The gap is $57,000 minus $50,880 = $6,120. If the market had risen, Path 2 would have come out ahead, but the plan would have depended on luck for money with a fixed deadline.

When this advice does not apply

The one-year rule of thumb is not a law. A few situations change it:

  • Flexible timeline. If you can delay the purchase for years, you may reasonably keep some money invested.
  • Large cushion. If your down payment is far more than you need, only the required amount must be protected.
  • Very low-income year. If your taxable income puts the gain in the 0% bracket, selling may cost nothing in federal tax.
  • Cash rates. Interest on savings is taxed as ordinary income, which is a small cost of holding cash.

What this means for you

If you have a regular job and a brokerage account, a short checklist handles most of it.

  1. Write down your expected closing date and the exact amount you need.
  2. Once the purchase is within about a year, decide how much of that amount to move to cash.
  3. Open your brokerage's tax lot view and note each lot's purchase date, cost basis and gain.
  4. Check which lots cross the one-year mark before closing, and weigh waiting against market risk.
  5. Estimate the federal and state tax and subtract it from the proceeds before making offers.
  6. Keep retirement accounts out of the plan unless nothing else works, and talk to a tax professional first.

This is general education, not tax or investment advice, and your own situation may differ.

Questions people ask

How far in advance should I sell stocks for a down payment?

A common rule of thumb is to move the money out of stocks once the purchase is within about a year. The closer the closing date, the less time there is to recover from a decline, so the final weeks are the riskiest time to be fully invested.

Do I have to pay capital gains tax if I use the money for a house?

Yes. There is no federal exemption for using investment proceeds toward a home purchase. The gain is taxed based on how long you held the shares and your taxable income.

What is the difference between short-term and long-term capital gains?

Short-term gains come from assets held one year or less and are taxed as ordinary income, up to 37% federally. Long-term gains come from assets held more than one year and are taxed at 0%, 15% or 20% federally in 2026, depending on taxable income.

Can I offset the tax with a loss on another investment?

Yes. Realized losses offset realized gains, and up to $3,000 of extra loss a year can reduce other income, with the rest carried forward. Avoid buying the same security within 30 days of the sale, or the wash sale rule disallows the loss for now.

Should I use my 401(k) or IRA for a down payment instead?

Usually not. Early withdrawals typically bring income tax plus a 10% additional tax unless an exception applies, and you lose the future growth on that money. A first-time homebuyer exception exists for IRAs up to $10,000, but income tax can still apply.

What if the market rises after I move my down payment to cash?

You miss that extra gain, which is the cost of certainty. For money needed on a fixed date, many people accept that tradeoff because a missed gain is easier to live with than a shortfall at closing.

Sources

  1. Topic No. 409, Capital Gains and Losses, Internal Revenue Service
  2. Revenue Procedure 2025-32 (2026 inflation adjustments), Internal Revenue Service
  3. Topic No. 559, Net Investment Income Tax, Internal Revenue Service
  4. Topic No. 557, Additional Tax on Early Distributions from Traditional and Roth IRAs, Internal Revenue Service
  5. Wash Sales, U.S. Securities and Exchange Commission (Investor.gov)
What changed on this page
  • : Rewritten and fact-checked: clearer short answer, primary sources added, outdated details removed.
  • : Imported from learn.cluenex.com
Use it on a real stock

See this for any of 1,000 US stocks

Cluenex explains every number on a stock page in plain words, with the price that would change our view and a sealed record of past calls.

Start free

Education, not investment advice. Examples are illustrations, not recommendations to buy or sell.