Legal Strategies to Keep More of Your Investment Gains
The most effective ways to minimize capital gains tax are to hold investments for more than a year so gains qualify for lower long-term rates, invest through tax-advantaged accounts such as 401(k)s and IRAs, offset gains with losses through tax-loss harvesting, choose tax-efficient investments such as broad index ETFs, and time your sales for years when your income is lower. Many investors in lower tax brackets can even pay a 0% federal rate on long-term gains.
Capital gains tax is charged on the profit you make when you sell an investment for more than you paid for it. You only owe it when you sell, which means the timing, the account and the way you sell all shape how much tax you pay.
This guide explains how capital gains are taxed, the 2026 rates and thresholds, and every major legal strategy for keeping more of your returns, from simple habits every investor can use to advanced techniques for larger portfolios, with worked examples throughout.
Start Here: Learn With FRC
Financial Regulation Courses (FRC) has no stake in what you buy or sell. FRC sells no investments and earns no commission, so this guide explains how the tax rules work rather than promoting any product.
For video explainers on investing and taxes, the FRC Retail Investing video series covers these topics step by step. FRC’s ETF Investing for Beginners course explains why ETFs are among the most tax-efficient investments available, and ETF Investing Strategies covers how to build a portfolio with taxes in mind.
FRC’s programs and memberships are open to everyone. Tax rules are complex and personal, so for decisions involving large sums, a qualified tax professional can apply these strategies to your specific situation.
What Capital Gains Tax Is
A capital gain is the difference between what you receive when you sell an asset and your cost basis, which is generally what you paid for it, including commissions. If you buy shares for $10,000 and sell them for $15,000, your capital gain is $5,000.
If you sell for less than your cost basis, you have a capital loss. Losses can be used to offset gains and, within limits, ordinary income.
Capital gains tax applies to stocks, bonds, mutual funds, ETFs, real estate, collectibles and most other investments. It is triggered only when you sell or otherwise dispose of the asset, so a rising investment you continue to hold creates no tax bill.
Short-Term vs Long-Term Gains
The length of time you hold an investment determines how its gain is taxed. Gains on investments held for one year or less are short-term and are taxed at your ordinary income tax rate, which can reach 37% at the federal level.
Gains on investments held for more than one year are long-term and qualify for lower rates of 0%, 15% or 20%, depending on your taxable income. The difference can be dramatic for the same profit.
FRC’s guide to short-term vs long-term capital gains explains the distinction in detail. The holding period begins the day after you buy and includes the day you sell.
The 2026 Long-Term Capital Gains Rates
For 2026, single filers pay 0% on long-term gains when their taxable income is up to $49,450, 15% up to $545,500, and 20% above that. Married couples filing jointly pay 0% up to $98,900, 15% up to $613,700, and 20% above that.
Heads of household pay 0% up to $66,200, 15% up to $579,600, and 20% above that. These thresholds are based on total taxable income, including the gains themselves.
The IRS adjusts these thresholds for inflation each year. Checking the current figures before planning a large sale ensures you know which rate will apply.
The Net Investment Income Tax
Higher earners may also owe the 3.8% net investment income tax on capital gains, dividends and other investment income. It applies when modified adjusted gross income exceeds $200,000 for single filers, $250,000 for married couples filing jointly and $125,000 for married individuals filing separately.
These thresholds are set in law and are not adjusted for inflation. As incomes rise over time, more investors become subject to the tax.
For investors above these levels, the top federal rate on long-term gains is effectively 23.8%. State income taxes can add further, depending on where you live.
Strategy One: Hold for More Than a Year
The simplest way to cut capital gains tax is patience. Holding an investment for more than one year before selling moves the gain from ordinary income rates to the lower long-term rates.
For an investor in the 32% bracket, a $10,000 short-term gain would cost $3,200 in federal tax. The same gain held for a year and a day would typically cost $1,500 at the 15% long-term rate.
Before selling an investment close to the one-year mark, check the purchase date. Waiting a few extra days can save a significant amount.
Strategy Two: Use Tax-Advantaged Accounts
Investments held inside retirement accounts are not subject to capital gains tax when you buy and sell within them. You can rebalance, switch funds or take profits without any immediate tax.
In a traditional 401(k) or IRA, you pay ordinary income tax only when you withdraw. In a Roth IRA or Roth 401(k), qualified withdrawals, including all the gains, are tax-free.
FRC’s guides to how a 401(k) works and Roth IRA rules explain how each account works. Using these accounts fully is one of the most powerful tax strategies available to ordinary investors.
Strategy Three: Harvest Your Losses
Tax-loss harvesting means selling investments that have fallen in value to realize a capital loss, which can then offset capital gains elsewhere in your portfolio. Losses first offset gains of the same type, then the other type.
If your losses exceed your gains, you can deduct up to $3,000 of the excess against ordinary income each year, or $1,500 if married filing separately. Any remaining loss carries forward indefinitely to future years.
Many investors harvest losses during market downturns and immediately reinvest in a similar, but not identical, investment to stay invested. Done carefully, this turns a falling market into a future tax benefit.
Watch Out for the Wash Sale Rule
The wash sale rule disallows a loss if you buy the same or a substantially identical security within 30 days before or after the sale. The 61-day window covers purchases in all your accounts, including IRAs.
A disallowed loss is not lost forever in most cases. It is added to the cost basis of the replacement shares, deferring the benefit until you sell them.
The IRS has not clearly defined when two different funds tracking the same index are substantially identical. FRC’s comparison of SPY vs VOO explains why investors switching between near-identical funds should take professional advice.
Strategy Four: Choose Tax-Efficient Investments
Some investments generate far more taxable gains than others. Actively managed mutual funds that trade frequently can distribute capital gains to shareholders every year, creating a tax bill even if you never sell.
Broad index ETFs are among the most tax-efficient investments available. Their low turnover ratio and the in-kind creation and redemption process used by ETFs mean they rarely distribute capital gains.
FRC’s guide to tax-efficient ETFs for a taxable brokerage account explains how to choose them. Holding growth-oriented, low-turnover funds in taxable accounts lets most of your return build untaxed until you sell.
Strategy Five: Place Assets in the Right Accounts
Asset location means holding each type of investment in the account where it is taxed most favorably. Investments that produce heavily taxed income, such as bonds paying interest or funds paying non-qualified dividends, are often held in tax-advantaged accounts.
Tax-efficient investments, such as broad stock index ETFs, are often well suited to taxable accounts. Their gains build mostly through price growth, which is taxed only when sold and then at long-term rates.
FRC’s guide to qualified vs non-qualified dividends explains which income is taxed at lower rates. Good asset location can reduce taxes every year without changing your overall investment mix.
Strategy Six: Use the 0% Bracket
Investors with lower taxable income can pay 0% federal tax on long-term gains. For 2026, that applies to single filers with taxable income up to $49,450 and married couples up to $98,900.
Retirees, people between jobs, students and those taking a career break may fall into this range. In those years, selling appreciated investments up to the top of the 0% bracket can realize gains tax-free.
Some investors deliberately sell and immediately repurchase winning investments in these years to reset their cost basis higher. Because the wash sale rule applies only to losses, this strategy, known as tax-gain harvesting, does not trigger it.
Strategy Seven: Choose Which Shares You Sell
If you bought shares of the same investment at different times and prices, you may be able to choose which specific shares to sell. Selling shares with the highest cost basis first produces the smallest gain, or even a loss.
Brokerages typically default to first in, first out, which sells your oldest shares first. Those are often the cheapest and carry the largest gains.
Most brokerages let you choose specific lot identification or a highest-cost method in your account settings. Making that choice before you sell can significantly reduce the tax on a partial sale.
Strategy Eight: Spread Sales Over Several Years
A very large gain realized in a single year can push you into a higher capital gains bracket and above the net investment income tax threshold. Spreading the sale over two or more tax years can keep more of the gain in lower brackets.
Selling part of a position in December and the rest in January, for example, splits the gain across two tax years. The same total profit can produce a noticeably lower combined tax bill.
For businesses and property, an installment sale, where payments are received over several years, can achieve a similar result. Tax professionals can model the most efficient timing for large or complex sales.
Strategy Nine: Give Appreciated Investments to Charity
Donating appreciated investments held for more than a year directly to a qualifying charity can avoid capital gains tax entirely. If you itemize deductions, you may also deduct the full market value, within income-based limits.
Compare that with selling the shares, paying tax on the gain and donating the cash. Giving the shares directly lets the charity receive the full value while you avoid the tax.
Donor-advised funds allow investors to donate appreciated shares in one year, take the deduction, and recommend grants to charities over time. They are widely offered by major brokerage firms.
Strategy Ten: Gift Investments to Family
Gifting appreciated investments to family members in lower tax brackets can reduce the tax when they are eventually sold. The recipient takes over your cost basis and holding period.
If the recipient falls in the 0% long-term bracket, they may be able to sell with no federal tax at all. However, the kiddie tax can tax a child’s investment income at the parents’ rate, which limits this strategy for most children and young adult students.
Gifts above the annual gift tax exclusion require a gift tax return, although tax is rarely due because of the large lifetime exemption. Families considering significant gifts should take professional advice.
Strategy Eleven: Hold Until Death and the Step-Up in Basis
When you die, the cost basis of investments you leave to heirs is generally stepped up to their market value on the date of death. The gain that built up during your lifetime is never subject to capital gains tax.
For investors with large unrealized gains late in life, holding rather than selling can save their heirs a considerable amount. The heirs can then sell soon after inheriting with little or no gain.
This is one reason estate planning and investment planning work closely together. Investments held in retirement accounts follow different rules, and their beneficiaries generally pay income tax on withdrawals.
Strategy Twelve: Use Education and Health Accounts
Health savings accounts offer a triple tax benefit for those eligible: deductible contributions, tax-free growth and tax-free withdrawals for qualified medical expenses. Investments inside them can be bought and sold without capital gains tax.
A 529 plan lets money for education grow tax-free, with tax-free withdrawals for qualified education expenses. Unused funds can, under certain conditions, be rolled into a Roth IRA for the beneficiary.
Both accounts shield investment gains from tax entirely when used as intended. They are often overlooked by investors focused only on retirement accounts.
Selling Your Home
Homeowners can exclude up to $250,000 of gain on the sale of a main home, or up to $500,000 for married couples filing jointly. You generally must have owned and lived in the home for at least two of the five years before the sale.
The exclusion can be used repeatedly, but generally not more than once every two years. Gains above the exclusion are taxed as capital gains.
Keeping records of home improvements can also help, because their cost is added to your basis. A higher basis means a smaller taxable gain when you sell.
Investment Property and 1031 Exchanges
Owners of investment real estate can defer capital gains tax through a 1031 exchange, named after the section of the tax code that allows it. Selling one investment property and reinvesting the proceeds in another qualifying property within strict deadlines defers the tax.
Since 2018, 1031 exchanges apply only to real property, not to stocks, funds or other investments. The rules on timing and identifying replacement property are strict.
Investors who keep exchanging properties throughout their lives can defer gains for decades, and if they hold until death, their heirs may benefit from the step-up in basis. This is a specialist area where professional guidance is essential.
Worked Example: Waiting Past One Year
A single investor in the 24% bracket bought shares 11 months ago and is sitting on a $20,000 gain. Selling now would mean a short-term gain taxed at 24%, or $4,800 in federal tax.
Waiting just over a month until the shares have been held for more than a year would make the gain long-term. At the 15% rate, the tax would fall to $3,000, a saving of $1,800.
The investor must weigh that saving against the risk that the shares fall during the waiting period. For many investors, the guaranteed tax saving is worth a short wait.
Worked Example: Harvesting a Loss
An investor realized a $12,000 long-term gain earlier in the year by selling a winning stock. Another holding, an international ETF, has fallen and shows a $9,000 loss.
Selling the ETF realizes the $9,000 loss, which offsets most of the $12,000 gain, leaving only $3,000 to be taxed. At a 15% rate, that cuts the tax from $1,800 to $450.
The investor immediately buys a different international ETF tracking a different index, staying invested while respecting the wash sale rule. FRC’s guide to Form 1099-DIV explains how fund income is reported, while sales appear on Form 1099-B.
Common Capital Gains Mistakes
The first mistake is selling just before the one-year mark and paying short-term rates unnecessarily. Checking holding periods before every sale avoids it.
The second is triggering the wash sale rule by repurchasing the same investment, including through an IRA or automatic dividend reinvestment, within 30 days of a loss sale. The third is ignoring capital gains distributions from actively managed funds held in taxable accounts.
The fourth is letting taxes override good investment decisions. Avoiding tax can keep investors in concentrated or unsuitable positions far longer than they should be, which can cost more than the tax ever would.
Keep Learning
Capital gains tax rewards investors who plan. Small habits, such as holding for more than a year, using the right accounts and choosing efficient funds, compound into large savings over a lifetime.
The FRC dictionary is more than a dictionary. It is a library of explainer videos, written explanations and on-page quizzes, so you can open any term, such as required minimum distribution, and go deeper whenever something is unclear.
FRC’s programs and memberships are open to everyone. FRC’s Investing for Beginners guide shows how tax planning fits into a complete investment plan.
Your Next Step
You can minimize capital gains tax by holding investments for more than a year, using tax-advantaged accounts, harvesting losses, choosing tax-efficient funds, placing assets in the right accounts and timing sales for lower-income years. Charitable giving, gifting, the step-up in basis and special accounts add further options for larger portfolios.
Review your holdings, check your purchase dates and account settings, and build these strategies into how you invest every year.

