Finances of Selling

Selling Stock to Buy a House: Can You Avoid Capital Gains Tax in 2026?

Selling Stock to Buy a House: Can You Avoid Capital Gains Tax in 2026?

Updated November 2026. Tax rates and 2026 thresholds were read on the IRS website (Topic 409 and Revenue Procedure 2025-32) and lender rules in the Fannie Mae Selling Guide on October 22, 2026. This is general information, not tax advice.

No, selling stock to buy a house doesn’t avoid capital gains tax. The profit is taxed in the year you sell, whatever you buy with it. As of November 2026, long-term gains (shares held over a year) are taxed at 0%, 15% or 20%, and short-term gains at up to 37%. You can still owe less with timing, losses and the 0% band.

Jump to: 💲 Do you owe tax? · 📊 2026 rates · 🏦 What lenders check · 🪜 Ways to owe less · ⚖️ Sell or keep? · 🏠 Cash at closing · ❓ FAQ

Key takeaways

  • Selling stock is a taxable event, even if every dollar goes into a down payment. There’s no 1031-style exchange for stocks.
  • For 2026, a single filer pays 0% on long-term gains while taxable income stays at or under $49,450. The 0% band runs to $98,900 for joint filers.
  • Lenders accept stock as a down payment source. Fannie Mae wants your latest statements, and two months of history on a purchase.
  • Selling less stock is the simplest way to owe less. A buyer credit at closing, like Beycome’s up to 2% back, can cut the cash you need.

If I sell stocks to buy a house, do I pay capital gains tax?

You do. The IRS treats stock you hold as an investment as a capital asset. When you sell it for more than you paid, the difference is a capital gain. What you do with the cash next doesn’t matter to the tax bill.

Your gain is the sale price minus your basis. Basis is usually what you paid, including fees. Say you bought shares for $40,000 and sell them for $60,000. Your gain is $20,000. That $20,000 goes on Form 8949 and Schedule D for the year you sold.

Here’s the part that trips people up. The home you buy is also a capital asset. But it only helps you later, when you sell that home. It does nothing for the stock you sold to buy it.

Can I avoid capital gains tax by buying a house?

No. A lot of people search for a way to roll stock gains into a home, the way investors swap one rental for another. That swap is a 1031 like-kind exchange. The IRS says that since January 1, 2018, Section 1031 applies only to real property. Stocks don’t qualify. And a home you live in isn’t investment property anyway.

The well-known home tax break works the other way around. When you sell your main home, you can exclude up to $250,000 of gain, or $500,000 on a joint return. You need to have owned and lived in it for at least 2 of the last 5 years. That rule covers home profits only. It never covers stock profits. You can read the full rules for both on the IRS website, or see our guide to capital gains when you sell a house.

How much tax will I owe on stock I sell in 2026?

It depends on how long you held the shares and on your total taxable income for the year. The gain itself counts toward that income.

  • Held one year or less: a short-term gain. It’s taxed at your ordinary income rate, from 10% to 37% in 2026.
  • Held more than one year: a long-term gain. It’s taxed at 0%, 15% or 20%.

The IRS counts the holding period from the day after you bought to the day you sold. Waiting a few weeks to cross the one-year line can change your rate a lot.

2026 long-term capital gains brackets

Filing status 0% rate if taxable income is up to 15% rate up to 20% rate above
Single $49,450 $545,500 $545,500
Married filing jointly $98,900 $613,700 $613,700
Head of household $66,200 $579,600 $579,600
Married filing separately $49,450 $306,850 $306,850

These are the 2026 amounts from IRS Revenue Procedure 2025-32. They apply to sales made in 2026, on returns filed in 2027. For sales in 2025, IRS Topic 409 lists lower thresholds, such as $48,350 for single filers at 0%.

A worked example

Take that $20,000 long-term gain. You’re single, and your taxable income for 2026, gain included, is $95,000. You’re above the $49,450 line, so the gain is taxed at 15%. That’s $3,000 in federal tax. If you’d held the shares under a year, the same gain would be taxed at your 22% bracket, or $4,400.

Two extras can apply. First, the 3.8% net investment income tax hits gains once your modified AGI tops $200,000 single or $250,000 joint. Second, your state may tax the gain too. Check your own state’s rules.

Can I use stock to pay for a down payment? What lenders check

Yes. Fannie Mae’s Selling Guide says vested stocks and mutual funds are acceptable sources for the down payment, closing costs and reserves, as long as their value can be verified. Conventional loans sold to Fannie Mae follow these rules.

Here’s what that means in practice:

  • The lender values your shares from your latest monthly or quarterly statement, net of any margin loan.
  • If the stock is worth at least 20% more than the cash you need, you don’t have to prove you sold it.
  • If it’s worth less than that, you’ll need to show the sale and the cash landing in your account.
  • Non-vested stock options don’t count at all.

On a purchase, your bank and brokerage statements must cover the most recent two full months. This is what people mean by “seasoned” funds. If you move a big sum into checking, expect questions. Fannie Mae calls a deposit “large” when it’s more than half your monthly qualifying income, and the lender must document where it came from. A sale confirmation from your broker usually does the job.

Don’t forget the tax bill when you plan your cash. The tax isn’t due at closing, but it is due. The IRS says a big gain may mean you need to make estimated tax payments during the year. Keep that money aside instead of putting it all into the house. A good habit is to plan your cash reserves before you pick a sale amount.

Talk to your lender before you sell anything. Our guide on what pre-approval really means explains how they look at your assets. The Consumer Financial Protection Bureau also has a free closing checklist and a Closing Disclosure explainer. The Federal Housing Finance Agency oversees Fannie Mae and Freddie Mac, whose rules shape most conventional loans.

How can I owe less tax when I sell stock to buy a home?

You can’t make the tax disappear. You can often make it smaller. Here are the common ones.

Wait for the one-year mark

If your shares are close to a year old, waiting can drop your rate from your income bracket to 15% or even 0%. Line that up with your house hunt and your rate lock.

Sell your losers too

Losses offset gains. If you have positions trading below what you paid, selling them in the same year cuts your net gain. If losses beat gains, you can deduct up to $3,000 a year ($1,500 married filing separately) and carry the rest forward.

Pick the shares you sell

Most brokers let you choose which lots to sell. Shares bought at a higher price have a smaller gain. Ask your broker how to pick specific lots before you place the order.

Spread sales across two tax years

If your closing date allows it, selling some shares in December and some in January splits the gain across two returns. That can keep more of it in the 0% or 15% band.

Use the 0% band in a low-income year

Between jobs, on leave or newly retired? Your taxable income may be low enough that some long-term gain is taxed at 0%. For 2026 that means up to $49,450 of taxable income single, or $98,900 joint.

Sell smarter

List your home on the MLS from $99

A flat fee instead of a percentage, and $0 to Beycome at closing. You stay in control of your sale.

Sell your home →

Buy smarter

Get up to 2% back at closing

On homes listed by other agents, Beycome credits you up to 2% of the price at closing (1% kept, $1,499 minimum; not on FSBO homes or homes listed by Beycome sellers).

Buy a home →

What about retirement accounts?

Selling stock inside an IRA or 401(k) isn’t a taxable sale. Taking money out is a different story. IRS Topic 557 says early IRA withdrawals usually face a 10% additional tax, but there’s an exception for up to $10,000 used for a qualified first-time home purchase. Regular income tax may still apply. Get advice before you tap retirement money.

For plain-English explainers on taxes and property, the legal guidance resources at Nolo are a good next read. For your own numbers, a CPA or enrolled agent is worth the fee on a large sale.

Should you sell stock to buy a house?

Often yes, if the shares are long-term and you’ve set the tax aside. It’s a weaker idea when the gain is short-term, when selling would push you into a higher bracket, or when a smaller down payment would do. First-time buyers usually have more choices than they think.

Your situation What usually works Why
Shares held over a year, income under the 0% line Sell what you need Some or all of the gain may be taxed at 0%
Shares a few weeks short of one year Wait, if your closing date allows The rate can drop from up to 37% to 15%
Big gain, high income Sell less and put less down Each dollar not sold avoids 15% to 23.8% federal tax
Some positions at a loss Sell losers in the same year Losses cut your net gain
Closing near year end Split sales across December and January The gain lands on two returns

The 23.8% is the 20% top rate plus the 3.8% net investment income tax. Before you pick an amount, run your numbers with a tax pro and ask your lender how much cash you really need.

How can first-time buyers need less cash at closing?

The smallest tax bill comes from the stock you don’t sell. Every dollar you don’t need at closing is a dollar of stock you can keep. So it pays to shrink your cash to close.

Start with the down payment. Many loans ask for far less than 20%. Our guide to the minimum down payment walks through the options. Then look at closing costs. Our closing cost guide shows where the money goes.

A buyer credit helps too. With the Beycome buyer program, you pay no upfront fee. When the seller offers buyer-agent compensation, Beycome keeps 1% of the price (minimum $1,499) and credits you the rest at closing. On a $400,000 home with 3% offered, that’s $8,000 back. If your lender allows it, the credit can go toward closing costs. That’s $8,000 of stock you may not need to sell.

That 3% is only an example. Commissions are not set by law or by NAR rules and are fully negotiable. Sellers choose whether to offer any buyer-agent compensation, and how much. Since August 17, 2024, those offers can’t be shown on the MLS.

Selling a home at the same time? A flat fee listing keeps more of your equity, which can mean less stock to sell. See our flat fee MLS plans, from $99 with $0 due to Beycome at closing. And if you’re new to all this, our first-time buyer tips are a good place to start.

Frequently asked questions

If I sell stocks to buy a house, do I pay capital gains tax?

Yes. The gain on the stock is taxable in the year you sell, no matter how you use the money. Long-term gains are taxed at 0%, 15% or 20%. Short-term gains are taxed at your income rate.

Can I avoid capital gains tax by selling stock to buy a house?

No. Since 2018, a 1031 exchange works only for real property held for business or investment. Stock doesn’t qualify, and a home you live in isn’t investment property.

Can I use capital gains from stock to buy a house?

Yes. Fannie Mae accepts vested stocks and mutual funds as a source for the down payment and closing costs. The lender checks your latest statements and, on a purchase, two months of account history.

How much stock can I sell without paying taxes in 2026?

Long-term gains are taxed at 0% while your taxable income, gain included, stays at or under $49,450 single, $66,200 head of household or $98,900 married filing jointly.

Should first-time home buyers sell stock for a down payment?

It can make sense, but plan for the tax first. Sell long-term shares if you can, set the tax aside and keep two months of statements ready for your lender.

Can I sell stock for a down payment without my lender asking questions?

Expect questions on any large deposit. Keep the brokerage statements and the sale confirmation, and move the cash early so two full months of statements show it.

When is the tax due on stock I sold for a house?

It’s reported on the return for the year of the sale. The IRS says a large gain may require estimated tax payments during the year to avoid a penalty.

Do I pay capital gains on stock if I sell at a loss?

No. A loss offsets other gains. If losses are bigger, you can deduct up to $3,000 a year against other income and carry the rest forward.

Want to see how market swings affect your timing? Read how stock market trends shape real estate moves.

This article is general information, not tax, legal or financial advice. Tax rules change and depend on your situation. Talk to a tax professional before you sell investments.

Tax figures are federal amounts from the IRS, read October 22, 2026: 2026 thresholds from Revenue Procedure 2025-32; 2025 thresholds and rules from Topic 409. State taxes are not included. Lender rules are from the Fannie Mae Selling Guide; your lender and loan type may differ.

Buyer program: no upfront fee; Beycome keeps 1% of the price with a $1,499 minimum and credits the rest, subject to the compensation the seller offers, state rebate rules and lender approval. Not available on homes sold by owner or on homes listed by Beycome sellers. If the compensation offered is below the minimum, the buyer covers the gap at closing.

Commissions are not set by law or by NAR rules and are fully negotiable. Sellers choose whether to offer any compensation to a buyer’s agent, and how much; since August 17, 2024, those offers can’t be shown on the MLS.

Beycome prices are as of November 2026; Basic is $99 in most states, and the state pages show the current price. “$0 at closing” means no Beycome fee at closing; other closing costs, taxes and title fees still apply.

Disclosure & Disclaimer

Beycome provides real estate services through affiliated licensed brokerages and has a commercial interest in the services and business models discussed on this blog. Content reflects Beycome’s perspective and may promote our services; it should not be treated as independent or neutral reporting.

Articles are provided for general informational and educational purposes only, not as financial, tax, legal, or investment advice or a recommendation for your particular situation. Reading this blog does not create a brokerage, advisory, or other professional relationship.

Information, opinions, pricing, service descriptions, and comparisons reflect the sources and information available when an article was published or last updated and may change. Although we aim for accuracy, we do not guarantee that all content is complete, current, or applicable to your circumstances. Laws, market conditions, and service availability vary by location. Examples and estimated savings are illustrative, depend on stated assumptions, and do not guarantee individual results.

Verify relevant information directly and consult qualified professionals before making decisions. Beycome services are subject to applicable agreements, eligibility requirements, and state-specific terms.

Artur

Artur is Beycome’s too-smart real estate guru. It learns from the real transaction data behind Beycome listings — list prices, sold prices, days on market, commissions, fees, and local market rules across the states and jurisdictions where Beycome operates — then turns that data into practical guides, comparisons, and market insights built to help people make smarter real estate decisions.

How much can you save selling and buying with Beycome?

If you sell a $400,000 home, you save up to $20,000 compared to a traditional way. And if you buy your next place with us, you also get up to 2% back at closing. Seriously.