Finance 8 min read·By NexTool Team

Understanding Capital Gains Tax: Rates, Rules & Strategies

Learn how capital gains tax works on investments, real estate, and other assets. Understand short-term vs long-term rates and strategies to minimize taxes.

ShareY

Try the free calculator

Use our Income Tax Calculator to run the numbers yourself.

What Are Capital Gains

A capital gain occurs when you sell an asset for more than you paid for it. The difference between your purchase price (cost basis) and sale price is your capital gain. For example, if you bought 100 shares of stock at $50 per share ($5,000 total) and sold them for $75 per share ($7,500), your capital gain is $2,500. Capital gains can come from selling stocks, bonds, real estate, cryptocurrency, collectibles, or any other asset that has appreciated in value. The gain is only realized — and taxed — when you sell. Unrealized gains (the increase in value of assets you still hold) are not taxed.

Short-Term vs. Long-Term Rates

The IRS distinguishes between short-term and long-term capital gains based on your holding period. Short-term gains — from assets held one year or less — are taxed at your ordinary income tax rates, which can be as high as 37 percent at the federal level. Long-term gains — from assets held longer than one year — receive preferential tax rates: 0 percent for taxable income up to $47,025 (single) or $94,050 (married filing jointly), 15 percent for income up to $518,900 (single) or $583,750 (married), and 20 percent above those thresholds. High earners may also owe an additional 3.8 percent Net Investment Income Tax.

Real Estate Capital Gains Exemptions

The primary residence exclusion allows homeowners to exclude up to $250,000 of capital gains ($500,000 for married couples filing jointly) from the sale of their primary home, provided they have owned and lived in the home for at least two of the last five years. This is one of the most valuable tax breaks available. For example, if you bought your home for $300,000 and sold it for $700,000, your $400,000 gain would be fully excluded if married filing jointly. Investment properties do not qualify for this exclusion, but you can defer gains using a 1031 like-kind exchange into another investment property.

Strategies to Minimize Capital Gains Tax

Hold investments for more than one year to qualify for the lower long-term rate. Use tax-loss harvesting — sell losing investments to offset gains, reducing your taxable amount. Contribute appreciated stock directly to charity to avoid capital gains entirely while receiving a tax deduction. Place high-growth investments in tax-advantaged accounts like Roth IRAs where gains are never taxed. Time your sales strategically — if you expect to be in a lower tax bracket next year (retirement, sabbatical), defer selling until then. Consider installment sales for large gains to spread the tax liability over multiple years.

Related Free Tools

Related Articles

Frequently Asked Questions

Do I pay capital gains tax on my 401(k)?

No. Investments inside tax-advantaged retirement accounts like 401(k)s and traditional IRAs grow tax-deferred. You do not pay capital gains tax when you buy and sell within these accounts. However, when you withdraw money from a traditional 401(k) or IRA in retirement, the entire withdrawal is taxed as ordinary income. Roth accounts are even better — qualified withdrawals, including all gains, are completely tax-free.

How are cryptocurrency gains taxed?

Cryptocurrency is treated as property by the IRS, so the same capital gains rules apply. Selling crypto for cash, trading one cryptocurrency for another, or using crypto to buy goods or services are all taxable events. Holding for more than one year qualifies for long-term rates. The IRS requires reporting all crypto transactions, and exchanges issue Form 1099 to both you and the IRS.

What is a wash sale?

A wash sale occurs when you sell a security at a loss and repurchase the same or a substantially identical security within 30 days before or after the sale. The IRS disallows the loss deduction in this case. To avoid wash sales while tax-loss harvesting, wait at least 31 days before repurchasing, or buy a similar but not identical investment (such as a different index fund tracking a different benchmark).