Cost Basis and Capital Gains: How to Calculate and Minimize Your Tax
Understand cost basis, short vs. long-term capital gains rates, and strategies to reduce what you owe when selling investments.
What Is Cost Basis?
Cost basis is what you paid for an investment, including any commissions or fees. It determines your gain or loss when you sell. Gain = Sale proceeds − Cost basis. You only owe capital gains tax on the gain, not on your entire sale proceeds.
Short-Term vs. Long-Term Capital Gains (2026)
Holding period matters enormously for tax rates:
- Short-term (held 1 year or less): Taxed as ordinary income (10%–37% depending on your bracket)
- Long-term (held more than 1 year): 0%, 15%, or 20% depending on income
Long-term capital gains rates for 2026: 0% up to ~$47,025 (single) / $94,050 (married). 15% up to ~$518,900 single / $583,750 married. 20% above those thresholds.
Cost Basis Methods
- FIFO (First In, First Out): Default at most brokers. Oldest shares sold first — often highest cost basis (and therefore least favorable for taxes if shares appreciated).
- Specific identification: You choose which specific shares to sell. Most tax-efficient — sell the highest-cost shares to minimize gain.
- Average cost: Common for mutual funds. Averages all purchase prices.
Tax Loss Harvesting
Sell investments at a loss to offset capital gains elsewhere in your portfolio. Capital losses offset gains dollar-for-dollar. Excess losses (beyond gains) offset up to $3,000 of ordinary income per year; remaining losses carry forward indefinitely. Wash sale rule: don't repurchase the same or substantially identical investment within 30 days before or after the sale.