Can I sell one stock and buy another without paying taxes?

Asked by: Davin Zemlak  |  Last update: February 13, 2026
Score: 4.2/5 (22 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.

How do I avoid paying taxes when I sell stock?

If you already sold the stock, then the only way to avoid tax is to sell other stocks at a loss (without wash sales). If you haven't sold it, you could instead donate the stock. This both avoids tax on the gain and also gives a charity deduction.

Do you pay taxes on stocks if you sell and immediately reinvest?

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.

Can I transfer one stock to another without paying taxes?

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 long do I need to hold a stock to avoid capital gains tax?

By investing in eligible low-income and distressed communities, you can defer taxes and potentially avoid capital gains tax on stocks altogether. To qualify, you must invest unrealized gains within 180 days of a stock sale into an eligible opportunity fund, then hold the investment for at least 10 years.

How to AVOID Taxes (Legally) When you SELL Stocks

18 related questions found

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.

How much stock can you sell without paying taxes?

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.

Do I have to pay taxes if I sell one stock to buy another?

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.

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.

How do I sell shares without paying capital gains tax?

Another easy and straightforward way of reducing capital gains tax is to give an asset to your spouse or civil partner, as this type of transfer won't be taxed. It also means you can each use your allowance, effectively doubling your annual exempt amount.

How do I reinvest capital gains without paying taxes?

To avoid paying capital gains taxes (and depreciation recapture), you can reinvest in a "like-kind" asset with a sales price of at least $500,000. The IRS allows virtually any commercial real estate property to qualify as 'like-kind” as long as you hold it for investment purposes.

Does selling stocks count as income?

Your income or loss is the difference between the amount you paid for the stock (the purchase price) and the amount you receive when you sell it. You generally treat this amount as capital gain or loss, but you may also have ordinary income to report. You must account for and report this sale on your tax return.

Does selling stock get taxed twice?

Technically, while the money is being taxed twice it is only being taxed when it is earned by a new person or entity. Without double taxation, many argue, that individuals could own large amounts of stock in corporations and live off of their dividends without ever paying taxes on what they are individually earning.

Can I sell a stock and buy it back the same day?

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.

How much stock loss can you write off?

Your maximum net capital loss in any tax year is $3,000. The IRS limits your net loss to $3,000 (for individuals and married filing jointly) or $1,500 (for married filing separately). You can reduce any amount of taxable capital gains as long as you have gross losses to offset them.

Do I have to pay capital gains tax immediately?

This tax is applied to the profit, or capital gain, made from selling assets like stocks, bonds, property and precious metals. It is generally paid when your taxes are filed for the given tax year, not immediately upon selling an asset.

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.

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.

How do seniors avoid capital gains tax?

As of 2022, for a single filer aged 65 or older, if their total income is less than $40,000 (or $80,000 for couples), they don't owe any long-term capital gains tax.

How to cash out stocks without paying taxes?

7 ways to avoid capital gains tax on stocks for any investor
  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.
  6. Offset your capital gains with losses (aka tax-loss harvesting).

How to pay 0 capital gains tax?

Starting in 2025, single filers can qualify for the 0% long-term capital gains rate with taxable income of $48,350 or less, and married couples filing jointly are eligible with $96,700 or less. However, taxable income is significantly lower than your gross earnings.

What happens if you sell a stock but reinvest?

With some investments, you can reinvest proceeds to avoid capital gains, but for stock owned in regular taxable accounts, no such provision applies, and you'll pay capital gains taxes according to how long you held your investment.

Does selling shares count as income?

Any money that you receive from your investments will be added to all your other types of income, including wages, personal pensions and rental income. Depending on all your earnings, you will then be taxed at the bracket that is applicable to you.

How to sell stock immediately?

KEVIN: A market order is your go-to when you want to get out of a trade as quickly as possible during standard market hours. Generally, they execute immediately, but remember, the trade-off here is price. You will receive the current price, which could be different from the last bid you saw.

How to rebalance portfolio without paying taxes?

You can rebalance by redirecting new contributions, adjusting dividend reinvestments, or reallocating within tax-advantaged accounts. These methods could help you keep your portfolio aligned with your goals while avoiding the costs and tax consequences of selling investments.