Savvy Nickel LogoSavvy Nickel
Ctrl+K

Capital Gains

Basic Finance Concepts

Capital Gains

Quick Definition

A capital gain is the profit realized when you sell a capital asset — such as a stock, bond, real estate, or business — for more than its purchase price (cost basis). Capital gains are subject to federal and state taxes, but at rates that depend on how long you held the asset before selling.

What It Means

Capital gains are one of the two primary ways investors build wealth from investments (the other being income from dividends and interest). Understanding how capital gains are taxed is essential for maximizing after-tax returns — the difference between short-term and long-term rates can be 20+ percentage points, which translates directly into thousands or tens of thousands of dollars.

Formula: Capital Gain = Sale Price - Cost Basis

Where cost basis is generally your purchase price plus any commissions or improvements (for real estate), adjusted for stock splits, dividends, and return-of-capital distributions.

Short-Term vs. Long-Term Capital Gains

The IRS taxes capital gains differently based on the holding period:

Holding PeriodClassificationTax Rate
1 year or lessShort-term capital gainOrdinary income rates (10-37%)
More than 1 yearLong-term capital gainPreferential rates (0%, 15%, or 20%)

This distinction is enormously valuable. Holding an investment for one day more than one year can cut your tax rate in half.

2025 Long-Term Capital Gains Tax Rates

Filing StatusTaxable IncomeLong-Term Rate
SingleUp to $47,0250%
Single$47,025 - $518,90015%
SingleOver $518,90020%
Married Filing JointlyUp to $94,0500%
Married Filing Jointly$94,050 - $583,75015%
Married Filing JointlyOver $583,75020%

Plus Net Investment Income Tax (NIIT): High earners (single over $200k, MFJ over $250k) pay an additional 3.8% NIIT on investment income, bringing the maximum effective rate to 23.8%.

The Value of Long-Term Holding: A Tax Example

Scenario: You bought 100 shares of a stock at $50/share ($5,000 total). It is now worth $150/share ($15,000). You want to sell and realize a $10,000 gain.

Holding PeriodTax ClassificationTax Rate (assuming 24% ordinary / 15% LTCG)Tax OwedNet Proceeds
11 monthsShort-term24%$2,400$12,600
13 monthsLong-term15%$1,500$13,500
Difference2 months extra$900 saved+$900

Waiting just two extra months saves $900 in taxes on a $10,000 gain — a guaranteed 9% return on patience.

Cost Basis: The Foundation of Capital Gains Calculation

Your cost basis determines the size of your taxable gain. Getting it right matters.

SituationCost Basis Rule
Purchased stockPurchase price + commissions
Inherited stockStep-up to fair market value at date of death (no capital gains on appreciation during decedent's lifetime)
Gifted stockDonor's original cost basis (carryover basis)
Stock splitAdjusted proportionally (e.g., 2-for-1 split halves cost basis per share)
Dividend reinvestmentEach reinvestment creates a new lot at that purchase price
Real estatePurchase price + improvements + closing costs

Cost Basis Methods for Multiple Lots

If you bought the same stock multiple times at different prices, you must choose how to calculate cost basis when selling:

MethodHow It WorksBest When
FIFO (First In, First Out)Oldest shares sold firstDefault IRS method
LIFO (Last In, First Out)Most recent shares sold firstRarely beneficial
Specific IdentificationYou choose exactly which shares to sellBest for tax optimization
Average CostAverage price of all sharesCommon for mutual funds

Specific identification is the most powerful tax tool: you can choose to sell your highest-cost shares first to minimize the taxable gain, or your lowest-cost shares if you want to harvest losses.

Capital Gains in Real Estate

The IRS provides a significant exclusion for primary residence sales:

  • Single filer: Exclude up to $250,000 of gain
  • Married filing jointly: Exclude up to $500,000 of gain

Requirements:

  • Owned the home for at least 2 years
  • Used it as primary residence for at least 2 of the last 5 years
  • Have not used this exclusion in the past 2 years

Example: Bought home for $300,000, sell for $850,000. Gain = $550,000.

  • Married couple exclusion: $500,000
  • Taxable gain: $50,000 (15% rate = $7,500 in taxes on a $550,000 profit)

For investment properties, depreciation recapture is taxed at 25%, and the remaining gain at capital gains rates. The 1031 exchange allows deferral of investment property gains if the proceeds are reinvested in a like-kind property within 180 days.

Tax-Loss Harvesting: Offsetting Capital Gains

Capital losses (selling an asset below cost basis) can offset capital gains dollar-for-dollar. If losses exceed gains, up to $3,000 of excess losses can offset ordinary income annually. Remaining losses carry forward indefinitely.

Example:

  • Stock A sold for $15,000 gain (long-term)
  • Stock B sold for $8,000 loss
  • Net taxable gain: $7,000 (instead of $15,000)
  • Tax saved (at 15%): $1,200

The wash-sale rule: If you sell a security at a loss and buy the "substantially identical" security within 30 days before or after the sale, the loss is disallowed. To avoid this, buy a similar but not identical fund (e.g., sell Vanguard S&P 500 ETF, buy iShares S&P 500 ETF — functionally similar but not "substantially identical").

Key Points to Remember

  • Capital gains = Sale price minus cost basis; only realized when you actually sell
  • Hold more than one year to qualify for preferential long-term capital gains rates (0-20% vs. 10-37% for short-term)
  • Inherited assets receive a step-up in basis to the date-of-death value, eliminating decades of embedded gains
  • The primary residence exclusion shields $250,000 ($500,000 MFJ) of home sale gains from tax
  • Tax-loss harvesting lets you offset gains with losses; up to $3,000 of excess losses deducts from ordinary income
  • Specific identification of which shares to sell is the most powerful way to manage capital gains timing

Common Mistakes to Avoid

  • Selling before reaching long-term status: The one-day-over-one-year threshold is worth planning around.
  • Forgetting dividend reinvestments in cost basis: Each reinvested dividend creates a new cost lot. Many investors undercount their basis, overpaying taxes.
  • Triggering large gains late in the year when income is already high: Selling investments after a high-income year pushes you into a higher bracket. Consider timing large sales to lower-income years.
  • Ignoring state capital gains taxes: Many states tax capital gains as ordinary income. California taxes all capital gains at up to 13.3%, eliminating much of the federal preferential rate advantage.

Frequently Asked Questions

Q: Do I owe capital gains tax on investments inside my 401(k) or IRA? A: No. Gains inside tax-advantaged accounts (401k, traditional IRA, Roth IRA) are not subject to capital gains tax. In a traditional 401k/IRA, you pay ordinary income tax on withdrawals. In a Roth IRA, qualified withdrawals are completely tax-free.

Q: What is unrealized vs. realized capital gains? A: An unrealized gain is when an investment has increased in value but you have not sold it yet. No tax is owed on unrealized gains. A realized gain occurs when you sell — that is when the tax liability is triggered.

Q: Do capital gains affect my tax bracket? A: Long-term capital gains are taxed separately from ordinary income and use their own rate brackets. However, capital gains can push your ordinary income into higher brackets for purposes of calculating rates on other income.

Q: What happens to capital gains if I die? A: Your heirs receive a "step-up in basis" to the asset's fair market value on the date of your death. This eliminates all capital gains tax on appreciation that occurred during your lifetime — one of the most powerful estate planning tools available.

Back to Glossary
Financial Term DefinitionBasic Finance Concepts