How to save $10,000+ in investment taxes.
You might be letting your brokerage decide how much tax you pay.
You think you’ve got investing figured out until you realize you’ve been paying thousands more in taxes for no reason. That was me three years ago.
One overlooked detail in my brokerage settings has already cost me $5,400 and counting.
The culprit? Cost basis.
The Small Default Setting that Got Me
It’s November 2022. VTSAX, my biggest investment holding, is down 20% from its high, and the S&P 500 is about the same. It’s ok. I’m not panicking. I know declines are temporary, and I see a silver lining: tax-loss harvesting (explained below).
If I sell the right shares, I can deduct $3,000 a year and save about $1,350 annually at my 45% combined California and federal tax rate.
I log in to Vanguard, grinning. Few things make me happier than figuring out a trick to save money.
Then I’m confused. None of my shares show a loss, even though the market is way down. How is that possible?

It turns out that Vanguard prices your shares based on the “Average Cost” method, which averages the cost of all shares you’ve purchased up to that point. This is a setting you choose, called the cost basis method. And you can’t change this cost basis retroactively. So I couldn’t do anything about it, except change it going forward.
Fundamental Concepts: Understanding stock market taxes
You pay capital gains taxes when you sell for more than you paid. Long-term gains (over one year) are taxed at lower rates: 0%, 15%, or 20% depending on your income.
Which specific shares you sell determines how much profit you make. Each set of shares is called a tax lot. Say you buy 10 shares of investment A in January, then 5 more in March, and dividends buy you 2 more shares in June. You now have three separate tax lots, each with its own purchase price.
The purchase price of each tax lot is the cost basis. When you eventually sell shares, your brokerage needs a method to determine which shares you’re selling and what you originally paid for them to calculate your gain or loss. There are multiple methods to calculate cost basis.
5 Strategies for saving taxes on investments
Once you understand these concepts, you can use them strategically to minimize or defer.
These strategies only apply to taxable accounts, so you don’t need to worry about them with your IRAs and 401(k)s. They are also advanced strategies. Before you do them, make sure you have taken advantage of lower-hanging fruit by maxing out your tax-advantaged accounts in this order.
1. Tax loss harvesting: When the market is down, you can sell investments at a loss to offset other gains or deduct up to $3,000 per year from your ordinary income. While the max is $3,000 per year, you can carry forward extra unused losses indefinitely. So if you harvest $30,000 in losses, you can deduct $3,000 this year, and each year for 10 years. I expect this strategy alone to save me $10,000+ in taxes over my life time.
2. Rebalancing without taxes: While rebalancing your portfolio, you can sell tax lots with a loss to avoid capital gains taxes entirely. You can also harvest a loss, as in strategy #1, or combine the loss with selling lots that have a gain, so they net to zero and avoid tax.
3. Fill up the 0% tax bracket on gains: Did you know that you can earn $126,000/year in capital gains and pay 0% federal income tax? If you ever make less than $126,000 and have long-term capital gains, consider harvesting those gains by selling investments that have an unrealized gain for free. This is perfect for sabbatical years, early retirement, or any year you’re making less. But watch out for the impact on Social Security and on ACA subsidies.
4. Charitable giving: If you plan to donate to charity, don’t donate cash; donate your shares with the highest capital gains instead. You get to deduct the full market value and never pay capital gains tax on the appreciation. If you bought a stock at $10 and it’s now worth $100, donating it gives you a $100 deduction without paying tax on the $90 gain.
5. Step-up basis for heirs: If you’re planning your estate, know that your heirs get a “step-up” in cost basis when they inherit. Shares you bought at $10 that are now worth $100 get reset to a cost of $100 for your heirs. All the taxes on those capital gains disappear, and your heir doesn’t pay any tax. It can make sense to hold your highest-gain lots until death and spend down or gift your lower-gain lots.
Beware of Wash Sale Rules
The IRS doesn’t allow you to sell a stock at a loss and immediately repurchase it. If you sell and repurchase a “substantially identical” security within 30 days before or after, the loss is disallowed. Dividend reinvestments or 401(k) auto-buys can trigger it, too.
To avoid it, buy a similar but not identical fund, like selling a total market fund (VTSAX) and purchasing an S&P 500 fund instead. After 31 days, you can switch back if you want.
Set Your Cost Basis Method. Check it now.
Your cost basis method decides which shares your brokerage sells first and how much tax you pay. If you don’t choose one, your brokerage’s default will likely cost you more in taxes.
I recommend choosing either option #1 for those who want to fully optimize or #2 for those who want to set it and forget it.
Spec ID (Specific Identification) gives you the most control. You can choose exactly which tax lots to sell. It’s the best method for strategically managing gains and losses, but it requires more effort and understanding.
Min Tax (Minimum Tax) is simpler but less flexible. Some brokerages offer a “Minimum Tax” option that automatically minimizes current-year taxes. It’s helpful for basic tax-loss harvesting but limits some other strategies.
FIFO (First In, First Out) sells your oldest shares first - usually the ones with the biggest gains - so you owe more tax. It’s often the default for ETFs and rarely ideal for long-term investors. There is also LIFO (Last in, First Out), which can lead to higher short-term capital gains tax.
Average Cost is the default for many mutual funds and the worst option. It treats every share as having the same cost basis, eliminating strategic control. Once you use it for a fund, you can’t change it retroactively, unlike other methods.
Takeaways
“Tax avoidance is a key skill to building wealth… If you’re trying to build wealth, you have an obligation to pay as little tax as possible. Do it legally.” - Scott Galloway
Tiny investing details compound. One unchecked setting can quietly drain your returns. So, spend 10 minutes today reviewing your brokerage defaults, then choose Spec ID or Min Tax.
If you want to get smarter about tax-efficient investing, subscribe and get more practical strategies and frameworks.


James has shared some incredible financial advice. I urge anyone to share his blog with their friends and family.
Thank you kind sir!
Great post!