“Michael, I just sold my company stock to fund a down payment… my accountant says I owe a fortune in taxes. How is that possible?”
This was the panicked call I got from a client, Marcus a few years ago. He sold about $100,000 in stock he’d held for years and was blindsided by a tax bill that felt punishingly high. The culprit wasn’t just one tax; it was a combination of long-term capital gains tax and the sneaky Net Investment Income Tax (NIIT).
Marcus’s story is incredibly common. In 2026, with many investors sitting on significant gains from the last decade, knowing how to legally maximize their returns while minimizing their tax burden became a priority. As Marcus navigated his options, he quickly realized the importance of understanding how state capital gains taxes vary.
This isn’t about shady loopholes; it’s about understanding the rules the IRS has in place and using them to your advantage.
In this guide, I’ll use my 25+ years of experience to give you the planner’s playbook on tax-efficient investing. We’ll cover the core strategies every investor should know and the advanced moves that can save you thousands.
Key Takeaways
- Time is Your Greatest Ally: Holding a stock for more than one year is the single easiest way to cut your tax rate nearly in half.
- Harvest Your Losses: Tax-loss harvesting is a powerful, legal strategy to use losing investments to offset the taxes on your winners.
- Use the Right Accounts: You pay zero capital gains tax on investments held within tax-advantaged accounts like a Roth IRA or 401(k).
Myth Buster:
You don’t have to sell to access your portfolio’s value. Advanced strategies can provide liquidity without triggering a taxable event.
On This Page
- Quick Links How To Avoid Paying Taxes on Stocks
- First, What Are the Capital Gains Tax Rules You Need to Know?
- The Hidden 3.8% Surtax: Are You Subject to the Net Investment Income Tax (NIIT)?
- The Planner’s Playbook: 4 Core Strategies Every Investor Must Know
- You know the sale price.What do you keep?
- Advanced Moves: 3 Strategies for Specific Financial Goals
- Conclusion: Your Final Takeaway on Capital Gains
- ❓ Frequently Asked Questions
Quick Links How To Avoid Paying Taxes on Stocks
First, What Are the Capital Gains Tax Rules You Need to Know?
Before you can reduce your tax bill, you need to understand how gains are taxed. The IRS separates them into two categories.
Short-Term Capital Gains
This applies to any stock you sell after holding it for one year or less. The profit is taxed at your ordinary income tax rate—the same as your salary. For many, this can be as high as 24%, 32%, or even 37%.
Long-Term Capital Gains
This applies to stock you sell after holding it for more than one year. The tax rates are much more favorable: 0%, 15%, or 20%, depending on your total taxable income.
💡 Advisor Tip
The “one year and one day” holding period is the simplest and most effective tax-saving strategy in the book. Before you sell a winner, always check the purchase date. Waiting a few more days or weeks could save you a significant amount of money.
Press pay below to watch a quick slideshow to help explain your capital gains avoidance ideas:
The Hidden 3.8% Surtax: Are You Subject to the Net Investment Income Tax (NIIT)?
This is the tax that shocked my client, Marcus. The Net Investment Income Tax (NIIT) is an additional 3.8% surtax that applies to investment income (including capital gains) for individuals with a Modified Adjusted Gross Income (MAGI) above certain thresholds.
For 2025, those thresholds are:
- $200,000 for Single or Head of Household filers
- $250,000 for Married Filing Jointly couples
This tax is stacked on top of your regular capital gains tax, which is how a 15% rate can suddenly feel like 18.8%. For authoritative details, you can refer to the IRS explanation of the NIIT.
The Planner’s Playbook: 4 Core Strategies Every Investor Must Know
These are the foundational, must-know strategies for managing taxes in a standard taxable brokerage account.
1. Hold for the Long Term
As we covered, holding an investment for at least a year and a day is your first and best line of defense, ensuring you qualify for the lower long-term rates.
2. Harvest Your Losses to Offset Gains
This is the most powerful tool in your tax-planning arsenal. Tax-loss harvesting is the practice of selling losing investments to realize a capital loss. That loss can then be used to cancel out, or “offset,” capital gains you’ve realized from selling winners.
📘 A Planner’s War Story: The Power of a “Loser”
I had a client, “David,” who needed to sell $50,000 of appreciated Apple stock for a kitchen remodel, facing a big tax bill. We dug into his portfolio and found a mutual fund he’d bought years ago that was down $15,000. By selling the losing fund first, he “harvested” that loss, which completely offset his gain from the Apple stock. His tax bill on the sale went to zero.
According to IRS Topic No. 409, you can use losses to offset all of your gains, plus up to $3,000 of your ordinary income each year.
3. Beware the “Wash Sale Rule”
The IRS won’t let you sell a stock to claim a loss and then immediately buy it back. The Wash Sale Rule disallows a tax loss if you buy the same or a “substantially identical” security within 30 days before or after the sale.
4. Use the Right Accounts (Tax-Advantaged Investing)
The easiest way to avoid capital gains tax is to invest within accounts that are designed to be tax-free or tax-deferred. You don’t pay any capital gains tax for trades made inside:
- Roth and Traditional IRAs
- 401(k)s, 403(b)s, and other employer-sponsored plans
- Health Savings Accounts (HSAs)
You know the sale price.
What do you keep?
Estimate the federal tax on your capital gain, see how the brackets stack, and compare short-term with long-term treatment.
See what drives the estimate
The holding-period difference
Both include additional NIIT. Price, income, and 2026 rules stay the same in this comparison. It is not a forecast of the benefit of waiting to sell.
- 0% long-term room before this sale
- —
How this sale is taxed
| Tax layer | Gain | Tax |
|---|
The adjustment accounts for changes in tax on existing preferential income and the ordinary-income tax ceiling. It can increase or decrease the layer subtotal.
Each amount is rounded for display; row totals may differ by a cent.
Show the NIIT calculation
- Filing-status MAGI threshold
- —
- NIIT before this sale
- —
- NIIT with this sale
- —
For a positive gain, we add the gain to both MAGI and net investment income, calculate NIIT each way, and take the difference. Loss effects are not estimated.
How to enter income without double counting
Ordinary income is the taxable portion after deductions, with this sale and preferential income removed. Enter qualified dividends and other eligible long-term gains separately. Their total plus ordinary income should represent your taxable income before this sale.
MAGI and net investment income are separate inputs used for NIIT. Include applicable investment income in those totals even when you also entered it in the preferential-income field. The calculator does not add that field to MAGI automatically. It assumes deductions are already used or allocated and stay unchanged.
What this estimator covers—and where it stops
Designed for a fully taxable sale of standard investments, such as stocks, funds, and many digital assets. It models the difference in federal regular tax and NIIT with and without a positive gain. It does not calculate tax benefits from losses or perform capital-loss netting.
Not modeled: state/local tax, AMT, credits, deduction phaseouts, unused deductions, loss carryovers, wash sales, home-sale exclusions, collectibles, depreciation recapture, qualified small business stock, installment sales, gifted/inherited basis rules, employee equity compensation, foreign-income rules, business property, or kiddie tax. Enter an independently determined adjusted basis when appropriate.
The model uses rate brackets, not the IRS $50 tax-table bands. It is a planning estimate, not a tax return, a payment recommendation, or a safe-harbor calculation. Use a full return calculation for those decisions.
2026 rates, method & sources
Ordinary-income and long-term gain thresholds: IRS Revenue Procedure 2025-32, §§4.01 and 4.03. NIIT method and thresholds: IRS Topic 559.
The regular-tax model follows the preferential-income stacking and ordinary-tax ceiling described in the Form 1040 instructions, using 2026 brackets. The linked worksheet currently describes tax year 2025; its dollar thresholds are not used here. Sources checked September 22, 2026.
Advanced Moves: 3 Strategies for Specific Financial Goals
For investors with specific objectives, these advanced strategies can provide even greater tax benefits.
5. Be Strategic About Which Shares You Sell
When you sell a portion of a stock you’ve bought at different times and prices, your brokerage defaults to selling the “First-In, First-Out” (FIFO) shares.
However, you can instruct them to use “Specific Share Identification,” allowing you to sell the shares with the highest cost basis, which minimizes your taxable gain.
6. Gift Appreciated Stock
You can gift stock to a friend or family member. While this doesn’t eliminate the tax, it can shift the liability. The recipient inherits your original cost basis and holding period.
If they are in a lower tax bracket (e.g., the 0% long-term capital gains bracket), they can sell the stock and pay significantly less tax than you would have.
7. Donate Appreciated Stock to Charity
This is one of the most powerful tax-saving strategies. If you donate appreciated stock you’ve held for more than a year directly to a qualified charity or a Donor-Advised Fund, you can typically deduct the full fair market value of the stock, and you pay zero capital gains tax on the appreciation.
It’s a win-win.
Conclusion: Your Final Takeaway on Capital Gains
After 25 years of practice, the most costly mistake I’ve seen isn’t picking the wrong stock; it’s failing to have a tax plan for the winners. An investment strategy isn’t complete until you have a tax-efficient exit strategy. The difference between a smart sale and an uninformed one can be tens of thousands of dollars in your pocket versus the IRS’s.
Your goal isn’t to never sell; it’s to sell smart. Use the strategies in this playbook to build a plan that lets you enjoy your hard-earned gains.
❓ Frequently Asked Questions
How does state capital gains tax work in 2026?
State taxes are a critical, often overlooked layer. Some states, like Florida, have no state capital gains tax, offering a significant advantage. Others, like California, tax capital gains at high ordinary income rates. Always factor in your state’s specific rules.
Can TurboTax or other software handle tax-loss harvesting?
Yes, tax software like TurboTax can handle the reporting of capital losses on IRS Form 8949 and Schedule D. However, the software does not tell you which assets to sell or when. The strategy of tax-loss harvesting must be executed by you or your advisor first.
What is the holding period for Qualified Small Business Stock (QSBS)?
The QSBS exclusion is a powerful but complex rule. To potentially exclude up to 100% of the capital gains, you must have held the stock for more than five years, among other strict requirements defined by IRS Section 1202.
Does gifting stock to my children trigger any gift tax limits?
Yes. For 2025, you can gift up to $18,000 per person per year without having to file a gift tax return. Gifting stock above this annual exclusion amount may require filing a gift tax return, though it typically won’t result in paying taxes unless you exceed your lifetime gift tax exemption.
