Raising Your Cost Basis: The Next Evolution of Tax Loss Harvesting
- Katrina

- Nov 3
- 5 min read
Most investors think of tax loss harvesting as something you do once a year — a bit of financial housekeeping before December 31st to trim your tax bill. You sell the losers, offset some gains, and feel productive before the year ends.
But the most sophisticated investors — and increasingly, AI-driven tax platforms — are taking it a step further. They’re not just harvesting losses to save on this year’s taxes; they’re using unrealized gains and unrealized losses together, in a dynamic strategy that slowly raises their cost basis over time.
And that simple concept — systematically raising your cost basis — can quietly save you thousands, or even hundreds of thousands, in future taxes.
The Power of a Higher Cost Basis
To understand why this matters, let’s start with the basics. Your cost basis is what you originally paid for an investment. When you sell, your capital gain is the difference between the sale price and your cost basis.
For example, if you bought 100 shares of Johnson & Johnson (JNJ) at $130 and they’re now worth $160, you have a $3,000 unrealized gain. You don’t owe any taxes until you sell, but that $3,000 is “embedded” — a future liability waiting to be triggered.
Now imagine that you can slowly raise your cost basis from $130 to $150 over a few years, without changing your exposure to J&J’s stock. When you eventually sell, your taxable gain shrinks from $3,000 to just $1,000.
That’s the magic of cost basis management — and it’s the natural next phase of what tax loss harvesting can do when it’s applied continuously and intelligently.
Traditional Tax Loss Harvesting: A Recap
In traditional tax loss harvesting, you sell an investment that has dropped below your purchase price to realize the loss. That realized loss can offset capital gains elsewhere — both short- and long-term — or even up to $3,000 of ordinary income per year.
The key rule is to avoid a wash sale, meaning you can’t buy back the same or “substantially identical” security within 30 days of selling it. So, investors often sell one investment and immediately buy a similar one.
For example, you might sell Coca-Cola (KO) after a dip and replace it with PepsiCo (PEP). You maintain roughly the same exposure to the consumer staples sector, but you’ve harvested a tax loss that reduces your taxable income for the year.
That’s the classic move. But what happens once your portfolio becomes mature — when you’ve already harvested the obvious losses, and your holdings are mostly long-term winners?
That’s where unrealized gain offsetting comes in.
Step Further: Using Unrealized Gains to Offset Unrealized Losses
Here’s where advanced tax optimization gets interesting.
Imagine you hold Procter & Gamble (PG) with a $10,000 unrealized gain and Nike (NKE) with a $10,000 unrealized loss. Neither position has been sold — they’re both unrealized.
Most investors would simply let both ride, assuming it’s “a wash.” But that ignores the opportunity hiding in plain sight.
If you sell both positions, the realized loss from Nike completely offsets the realized gain from Procter & Gamble. Your total taxable gain for the year is zero, but your cost basis in both stocks gets reset to today’s market value.
Let’s say both stocks are trading at $150 per share. After selling and immediately repurchasing them (without triggering a wash sale, since they’re unrelated securities), your basis in each stock is now $150.
You’ve effectively “stepped up” your basis without paying any taxes. When those stocks appreciate again in the future, you’ll owe less when you eventually sell.
Why Advisors Rarely Do This
Most traditional financial advisors and brokerages overlook this strategy for a few reasons:
It requires granular tracking of every lot, gain, and loss — something humans and most brokerage software aren’t built to do continuously.
It’s counterintuitive. Selling winners goes against the psychological grain of “don’t touch what’s working.”
It requires perfect timing to avoid wash sale overlaps and to ensure offsetting positions line up cleanly.
But for AI-driven systems that continuously scan your portfolio, this is trivial. The software can spot matching unrealized gains and losses across dozens of holdings, execute offsetting trades in seconds, and track wash sale windows automatically.
This is the kind of strategy that was once only available to ultra-high-net-worth clients with in-house tax teams — and it’s now within reach for everyday investors.
A Real Example: Raising Basis Over Time
Let’s walk through a multi-year example to see the effect.
Year 1: You buy 100 shares of McDonald’s (MCD) at $250. The stock rises to $280.
Year 2: Your Starbucks (SBUX) shares, purchased at $100, fall to $80.
You sell both. The $2,000 gain in MCD offsets the $2,000 loss in SBUX — no taxes owed. Then, you repurchase both stocks immediately (since they’re not “substantially identical”).
Now your cost basis in both is reset to their current market price — $280 for MCD and $80 for SBUX.
If MCD rises to $350 and you sell in a few years, your taxable gain is only $70 per share instead of $100. You’ve effectively erased part of your future tax bill without reducing your exposure or paying anything today.
Repeat that kind of optimization a few times a year across your portfolio, and your future capital gains shrink dramatically — all while you stay fully invested.
Why This Matters for Long-Term Holders
Many investors pride themselves on being “buy-and-hold” types — and rightly so. Long-term compounding is the surest way to build wealth.
But never selling can create a massive deferred tax bomb. If your portfolio has appreciated significantly, your embedded gains may represent a large portion of your net worth — and a large future tax liability.
By strategically realizing and offsetting small chunks of those gains along the way, you can gradually defuse that liability while preserving your investment exposure. Over time, your average cost basis rises, and the taxes owed on eventual sales decline.
It’s quiet, steady, tax-efficient compounding — the kind of discipline that professional portfolio managers use to maximize after-tax performance.
The Future: Automated Cost Basis Optimization
As tax optimization software evolves, this approach — pairing unrealized gains and losses to raise basis — is becoming the next frontier of tax-efficient investing.
Modern AI systems can continuously analyze every tax lot in your portfolio, simulate the impact of thousands of potential trades, and execute those that reduce your total tax exposure while keeping your portfolio aligned with your goals.
It’s not about gaming the system — it’s about managing it intelligently.
The Bottom Line
Tax loss harvesting isn’t just about saving money this year. It’s about building tax flexibility for the next decade.
By pairing realized gains and losses strategically — even from positions you weren’t planning to sell — you can raise your cost basis, smooth your future tax burden, and preserve more of your compounding returns.
For investors who rarely sell, this approach turns a static portfolio into a dynamic, tax-smart engine — one that grows not only through market gains, but through the quiet power of minimizing what you owe along the way.




Comments