Do you pay capital gains if you sell a stock and buy another?

Asked by: Reva Crist  |  Last update: March 24, 2026
Score: 4.1/5 (18 votes)

Buying additional stock shares with the proceeds from a stock sale will not eliminate or reduce capital gains taxes. However, if you reinvest the gain into a QOF (Qualified Opportunity Fund), you can defer the payment of capital gains taxes while you are invested in an eligible fund.

Do I get taxed if I sell a stock then reinvest it?

Yes, you will have to pay tax on stock gains even if you reinvest. However, how much you will have to pay can vary, depending on how long you've held the stock, and your income level. You can also participate in tax-loss harvesting by selling other stocks in your portfolio at a loss to offset your total tax burden.

How to avoid capital gains tax after selling stock?

We'll start with the easiest and work our way down to the more strategy-intensive options:
  1. Donate stock to charity.
  2. Hold stock shares for more than one year.
  3. Invest in retirement accounts.
  4. Pass it on in your estate plans.
  5. Sell stocks when you're in a lower tax bracket.

Do you pay capital gains if you sell and buy another?

You can avoid capital gains tax when you sell your primary residence by buying another house and using the 121 home sale exclusion. In addition, the 1031 like-kind exchange allows investors to defer taxes when they reinvest the proceeds from the sale of an investment property into another investment property.

How do I sell shares and avoid capital gains tax?

You could: Stagger the sale of assets over several tax years to make the most of using your CGT allowance over several years. You could sell part of a share portfolio on 3 April and the rest on 6 April to take advantage of two years' CGT allowance. Offset any losses you've made on other assets.

How to AVOID Taxes (Legally) When you SELL Stocks

39 related questions found

At what age do you not pay capital gains?

Current tax law does not allow you to take a capital gains tax break based on your age. In the past, the IRS granted people over the age of 55 a tax exemption for home sales, though this exclusion was eliminated in 1997 in favor of the expanded exemption for all homeowners.

What is a simple trick for avoiding capital gains tax?

An easy and impactful way to reduce your capital gains taxes is to use tax-advantaged accounts. Retirement accounts such as 401(k) plans, and individual retirement accounts offer tax-deferred investment. You don't pay income or capital gains taxes on assets while they remain in the account.

Can I sell stock at a gain and then rebuy it?

So, if you profit from the sale of stock or securities, you can repurchase the same stock or securities right away without any penalty. The wash sale rule also doesn't apply to: sales and trades of commodity futures contracts or foreign currencies.

What is the one-time capital gains exemption?

If it's your primary residence

You can sell your primary residence and avoid paying capital gains taxes on the first $250,000 of your profits if your tax-filing status is single, and up to $500,000 if married and filing jointly. The exemption is only available once every two years.

Does selling stock count as income?

When you sell an investment for a profit, the amount earned is likely to be taxable. The amount that you pay in taxes is based on the capital gains tax rate. Typically, you'll either pay short-term or long-term capital gains tax rates depending on your holding period for the investment.

Can you swap stocks without paying capital gains?

You and other investors who want to avoid paying tax on stocks that have appreciated, will “sell” (in actuality contribute) and reinvest, through a swap. This process involves swapping your appreciated shares for a diversified portfolio of stocks of equivalent value, effectively deferring capital gains tax.

How to pay 0 capital gains tax?

Capital gains tax rates

A capital gains rate of 0% applies if your taxable income is less than or equal to: $47,025 for single and married filing separately; $94,050 for married filing jointly and qualifying surviving spouse; and. $63,000 for head of household.

How do I avoid paying taxes when I sell stock?

How to avoid taxes or pay less when selling stocks
  1. Think long term versus short term. Holding the shares long enough for the dividends to count as qualified might reduce your tax bill. ...
  2. Look into tax-loss harvesting. ...
  3. Hold the shares inside an IRA, a 401(k) or other tax-advantaged account. ...
  4. Call in a pro.

Are capital gains taxed if they are reinvested?

Reinvesting capital gains involves using the profits from selling an asset to purchase more assets. Doing so can affect the timing and amount of taxes owed. Reinvesting capital gains doesn't eliminate tax liability but can impact the timing and amount of taxes owed.

Are you taxed twice when you sell stock?

Capital Gains Taxes

When each RSU is sold, it is taxed as capital gains. Capital gains covers the amount that you have profited on the sale of the stock above and beyond the value that it held when it first vested. It is worth noting that being taxed twice means you made money twice.

What happens if I sell a stock and buy it back?

Thus, when you sell shares that exist in your investments in 'Sell from Existing' and buy them back on the same day, there is no movement of shares that would actually happen in your demat account and thus intraday trades like such do not affect your buy average. This feature is not allowed for this platform.

What is the 30 day rule?

The 30-day savings rule is a simple strategy to cut down on overspending. It works like this: When you're tempted to make an impulse purchase, you commit to waiting 30 days before going through with it. Of course, at the end of those 30 days, you may decide that you do, in fact, want to make the purchase.

What is the 30 day rule for capital gains tax?

If you wish to repurchase an investment that you have recently sold, over 30 days must elapse between the two transactions in order for you to utilise your CGT exemption or create a loss to offset against other gains realised within the same tax year.

How do I legally not pay capital gains tax?

A few options to legally avoid paying capital gains tax on investment property include buying your property with a retirement account, converting the property from an investment property to a primary residence, utilizing tax harvesting, and using Section 1031 of the IRS code for deferring taxes.

How long do you have to hold a stock to avoid capital gains?

Selling a capital asset after owning it for one year or less results in a short-term capital gain. Selling a capital asset after owning it for more than one year results in a long-term capital gain.

Do you have to pay capital gains after age 70 if you?

Seniors must pay capital gains taxes at the same rates as everyone else—no special age-based exemption exists.

What makes you exempt from capital gains?

However, thanks to the Taxpayer Relief Act of 1997, most homeowners are exempt from needing to pay it.1 If you're single, you will pay no capital gains tax on the first $250,000 of profit (excess over cost basis). Married couples enjoy a $500,000 exemption.2 However, there are some restrictions.

How much can a 70 year old earn without paying taxes?

Taxes aren't determined by age, so you will never age out of paying taxes. People who are 65 or older at the end of 2024 have to file a return for tax year 2024 (which is due in 2025) if their gross income is $16,550 or higher.

What is the 2 out of 5 year rule?

To qualify for the principal residence exclusion, you must have owned and lived in the property as your primary residence for two out of the five years immediately preceding the sale. Some exceptions apply for those who become disabled, die, or must relocate for reasons of health or work, among other situations.