You’re sitting on investment gains and wondering how to minimize your tax bill. The answer lies in something most investors overlook: your cost basis method. Choosing between FIFO, LIFO, and Specific Identification can save you thousands in capital gains taxes every year.
Quick Facts About Cost Basis Methods
| Method | Best For | Tax Impact | Complexity |
|---|---|---|---|
| FIFO | Long-term holders | Lower (long-term rates) | Simple |
| LIFO | Active traders | Higher (short-term rates) | Simple |
| Specific ID | Tax optimization | Lowest (strategic) | Moderate |
| Average Cost | Mutual funds only | Moderate | Very Simple |
What Is Cost Basis and Why It Matters
Cost basis is the original price you paid for an investment, plus any fees or commissions. When you sell, the IRS taxes the difference between your sale price and cost basis. This difference is your capital gain or loss.
Here’s where it gets interesting: if you bought the same stock multiple times at different prices, you get to choose which shares you’re selling. That choice determines your tax bill.
People also love to read this: Health Savings Account (HSA) Maximization Strategy
FIFO Method: First In, First Out
FIFO sells your oldest shares first. Your broker uses this method by default if you don’t specify otherwise.
You bought 100 shares of XYZ stock in 2020 at $50, then another 100 shares in 2023 at $80. In 2025, you sell 100 shares at $100. With FIFO, you’re selling the 2020 shares, giving you a $50 per share gain ($5,000 total). Since you held them over a year, you pay long-term capital gains rates (0%, 15%, or 20% depending on your income).
FIFO works best when:
- You hold investments long-term
- Your earliest purchases have the lowest cost basis
- You want simple, hands-off tax management
- You’re in a lower tax bracket
The downside? You can’t control which lots you sell, which might trigger larger gains than necessary.
LIFO Method: Last In, First Out
LIFO does the opposite—it sells your most recent purchases first.
Using the same example, LIFO would sell your 2023 shares bought at $80. Your gain drops to $20 per share ($2,000 total). But here’s the catch: if you held these shares less than a year, you pay ordinary income tax rates (potentially 37% for high earners).
LIFO works best when:
- Recent purchases have higher cost basis
- You’re trying to minimize current-year gains
- You’re comfortable with short-term tax rates
- You plan to hold remaining shares long-term
Most brokers don’t offer LIFO anymore because it rarely provides better outcomes than Specific ID.
Specific Identification: The Tax Optimization Powerhouse
Specific ID lets you choose exactly which shares to sell. This is where serious tax savings happen.
You own three lots of ABC stock:
- 2019: 50 shares at $30 (now worth $100 each)
- 2022: 50 shares at $70 (now worth $100 each)
- 2024: 50 shares at $95 (now worth $100 each)
You need to sell 50 shares for a down payment. With Specific ID, you sell the 2024 lot, creating only a $250 gain versus $3,500 if you used FIFO.
Specific ID shines when:
- You have multiple purchase lots at different prices
- You want to harvest tax losses while maintaining positions
- You’re rebalancing without triggering massive gains
- You’re doing year-end tax planning

How to Implement Each Method
Setting up your preferred method takes five minutes but pays dividends forever.
At Schwab: Log into your account, go to Cost Basis Information under Tax Center, and select your default method. For individual sales, use the Cost Basis Tracking Tool before placing orders.
At Vanguard: Navigate to My Accounts > Cost Basis > Cost Basis Method. Choose your preference for each holding. Vanguard lets you set different methods for different funds.
At Fidelity: Access Account Features > Brokerage & Trading > Cost Basis Information Tracking. Select SpecID for maximum control. Confirm your choice before each sale using the Lots Selection tool.
Important: You must specify your lot selection before the trade settles, not after. Most brokers require this at the time of sale.
Strategic Applications That Save Real Money
Smart investors use cost basis methods as part of broader tax strategy.
Tax-Loss Harvesting: Sell losing positions using Specific ID to offset gains elsewhere. If ABC stock has three lots—two up, one down—sell the losing lot to create a deductible loss while keeping your position.
Wash Sale Rule Navigation: If you want to buy back a stock within 30 days, Specific ID helps you track which lots trigger wash sales. Sell high-basis lots to minimize disallowed losses.
Year-End Planning: Review your positions in November. Identify lots to sell that balance your gains and losses. This beats scrambling in December with limited options.
Charitable Giving: Donate appreciated shares held over a year. Use Specific ID to transfer the highest-gain lots, getting a deduction for full market value while avoiding capital gains tax.
Common Mistakes That Cost You Money
Even experienced investors trip up on cost basis management.
Mistake 1: Defaulting to FIFO Without Thinking Your broker chooses FIFO automatically. This might cost you thousands annually if you have better options. Review your settings quarterly.
Mistake 2: Forgetting About Reinvested Dividends Each dividend reinvestment creates a new tax lot at the reinvestment price. These lots can provide loss-harvesting opportunities during market dips.
Mistake 3: Ignoring State Taxes Federal long-term gains max out at 20%, but California charges up to 13.3% state tax with no preferential rate. Your total tax hit: 33.3%. Cost basis method selection matters even more in high-tax states.
Mistake 4: Not Tracking Transfers Between Brokers When you transfer investments, your new broker might not receive complete cost basis information, especially for older positions. Maintain your own records.
Cryptocurrency and Alternative Assets
Cost basis methods apply beyond stocks. Cryptocurrency transactions require meticulous tracking.
You bought Bitcoin three times: $20,000, $35,000, and $60,000. You’re selling enough to buy a car at today’s price of $50,000. Specific ID lets you sell the $60,000 lot, creating a $10,000 loss instead of a $30,000 gain.
The IRS requires you to report every crypto transaction. Software like CoinTracker or TokenTax helps manage cost basis across multiple wallets and exchanges.
Comparing Methods: Real Tax Impact
Let’s calculate the actual difference using a realistic scenario.
You own 500 shares of a stock purchased over five years. Current price: $120 per share. You need to sell 200 shares ($24,000).
Your Purchase History:
- 2019: 100 shares at $40
- 2020: 100 shares at $55
- 2021: 100 shares at $80
- 2022: 100 shares at $95
- 2024: 100 shares at $110
Tax Comparison (assuming 24% ordinary income, 15% long-term gains):
FIFO (sells 2019-2020 lots):
- Capital gain: $13,500
- Tax: $2,025 (15% long-term rate)
Specific ID (sells 2022 and 2024 lots):
- Capital gain: $5,500
- Tax: $825 (15% long-term rate)
Savings: $1,200 from one strategic decision.
Over a lifetime of investing, this compounds into tens of thousands saved.
When to Switch Methods
You can change your cost basis method, but timing matters.
Change your default method anytime for future purchases. This affects only new acquisitions. For existing holdings, you choose the method when you sell, assuming you’re using Specific ID.
Some investors use FIFO as their default but switch to Specific ID for individual sales. This provides flexibility without constant account maintenance.
One exception: The Average Cost method for mutual funds. Once elected, you cannot switch back to Specific ID for those specific fund shares. Choose carefully.
Advanced Strategy: Basis Management for Early Retirement
People retiring early face unique challenges. Traditional retirement accounts wait until 59½, but your taxable accounts bridge the gap.
Use Specific ID to create a tax-efficient withdrawal strategy:
- Sell high-basis lots first to minimize gains during low-income years
- Convert traditional IRA funds to Roth when you’re in the 12% bracket
- Use capital losses to offset IRA conversion income
This approach can save $50,000+ over a decade compared to random sales.
Getting Professional Help
Tax software handles basic cost basis reporting, but complex situations benefit from professional guidance.
When to DIY:
- Simple portfolio with occasional trades
- One brokerage account
- Standard W-2 income
- Total gains under $50,000 annually
When to hire a CPA:
- Multiple accounts across brokers
- Cryptocurrency holdings
- Partnership K-1s or rental income
- Estate planning with gifted securities
- Business income alongside investment income
A good CPA costs $500-2,000 annually but often saves 5-10x their fee through strategic planning.
Your Action Plan
Stop leaving money on the table. Implement these steps this week.
Step 1: Log into each brokerage account. Check your default cost basis method. Switch to Specific ID if available.
Step 2: Review your current holdings. Identify positions with multiple lots at different prices. Note your highest and lowest basis lots.
Step 3: Set a calendar reminder for November 15th. This gives you six weeks to plan year-end tax moves.
Step 4: Open a spreadsheet. Track every purchase with date, quantity, price, and fees. Don’t rely solely on broker records.
Step 5: Before your next sale, spend two minutes selecting the optimal lot. The tax savings per trade justifies the minimal effort.
The Bottom Line
Cost basis methods aren’t glamorous, but they’re one of the few legal ways to directly control your tax bill. FIFO works fine for simple, long-term investors. Specific ID is better for everyone else.
The average investor with a $500,000 portfolio who trades occasionally can save $2,000-5,000 annually through strategic cost basis management. Over 30 years of investing, that’s $60,000-150,000 kept in your pocket instead of the IRS’s.
You already pay enough in taxes. Use every legal method available to reduce that burden. Cost basis selection is low-hanging fruit that most people ignore.
Start today. Your future self will thank you.
People also love to read this: Short-Term Health Insurance Alternatives to COBRA
Frequently Asked Questions
Can I use different cost basis methods for different stocks?
Yes, you can use different methods for different securities. You might use FIFO for one stock and Specific ID for another. However, you cannot use multiple methods for the same security—once you choose a method for a specific holding, it applies to all lots of that security unless you actively select lots with Specific ID.
What happens if I forget to specify which shares I’m selling?
Your broker applies your default method, usually FIFO. This might trigger higher taxes than necessary. Some brokers allow you to fix this within a limited window (typically before settlement), but after that, your choice becomes permanent for that sale. Always specify before confirming the trade.
Does cost basis method matter in retirement accounts like IRAs?
No, cost basis methods don’t apply to traditional IRAs or 401(k)s because you haven’t paid tax on contributions yet. You pay ordinary income tax on withdrawals regardless of how long you held investments. Roth IRAs also don’t need cost basis tracking since qualified withdrawals are tax-free. These methods only matter in taxable accounts.
How do stock splits affect my cost basis?
Stock splits adjust your cost basis proportionally. If you bought 100 shares at $100 ($10,000 total) and the stock splits 2-for-1, you now own 200 shares with a $50 cost basis each (still $10,000 total). Your broker handles this automatically, but verify their records match your calculations, especially for older positions.
Can I change from Average Cost back to Specific ID for mutual funds?
No, this is permanent. Once you elect Average Cost for a mutual fund, you cannot switch back to Specific ID for those shares. New purchases can use a different method, but existing shares remain under Average Cost. This is one of the few irreversible cost basis decisions, so choose carefully for mutual fund holdings.

