Capital Gains
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 Period | Classification | Tax Rate |
|---|---|---|
| 1 year or less | Short-term capital gain | Ordinary income rates (10-37%) |
| More than 1 year | Long-term capital gain | Preferential 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 Status | Taxable Income | Long-Term Rate |
|---|---|---|
| Single | Up to $47,025 | 0% |
| Single | $47,025 - $518,900 | 15% |
| Single | Over $518,900 | 20% |
| Married Filing Jointly | Up to $94,050 | 0% |
| Married Filing Jointly | $94,050 - $583,750 | 15% |
| Married Filing Jointly | Over $583,750 | 20% |
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 Period | Tax Classification | Tax Rate (assuming 24% ordinary / 15% LTCG) | Tax Owed | Net Proceeds |
|---|---|---|---|---|
| 11 months | Short-term | 24% | $2,400 | $12,600 |
| 13 months | Long-term | 15% | $1,500 | $13,500 |
| Difference | 2 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.
| Situation | Cost Basis Rule |
|---|---|
| Purchased stock | Purchase price + commissions |
| Inherited stock | Step-up to fair market value at date of death (no capital gains on appreciation during decedent's lifetime) |
| Gifted stock | Donor's original cost basis (carryover basis) |
| Stock split | Adjusted proportionally (e.g., 2-for-1 split halves cost basis per share) |
| Dividend reinvestment | Each reinvestment creates a new lot at that purchase price |
| Real estate | Purchase 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:
| Method | How It Works | Best When |
|---|---|---|
| FIFO (First In, First Out) | Oldest shares sold first | Default IRS method |
| LIFO (Last In, First Out) | Most recent shares sold first | Rarely beneficial |
| Specific Identification | You choose exactly which shares to sell | Best for tax optimization |
| Average Cost | Average price of all shares | Common 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.
Related Terms
83(b) Election
An 83(b) election is a tax strategy that allows recipients of restricted stock to pay income tax on the grant date value instead of the vesting date value, potentially saving substantial taxes if the stock appreciates significantly.
Capital Gains Tax
Capital gains tax is the tax owed on profits from selling assets like stocks, bonds, or real estate — with rates depending on how long you held the asset and your income level, ranging from 0% to 37%.
Capital
Capital is money or assets that are deployed to generate more wealth — distinguishing itself from income spent on consumption by being invested or used productively to create future economic value.
Stock
A stock is a share of ownership in a company, entitling holders to a proportional claim on the company's assets, earnings, and voting rights in exchange for capital provided to the business.
REIT
A REIT is a company that owns income-producing real estate and is required to distribute at least 90% of taxable income as dividends, giving investors real estate exposure without buying property.
Asset Allocation
Asset allocation is the strategy of dividing a portfolio among different asset classes like stocks, bonds, and cash based on your goals, time horizon, and risk tolerance to optimize the risk-return trade-off.
Related Articles
ETF vs Mutual Fund: What's the Difference?
ETFs and mutual funds both let you own hundreds of stocks at once — but they differ in ways that matter for taxes, costs, and how you invest. Here's the clear breakdown.
How to Open a Brokerage Account Step by Step
Opening a brokerage account is easier than most people expect. Here's a complete walkthrough — what to choose, what you'll need, and exactly what to do once it's open.
Can Teenagers Invest in Stocks? The Complete Guide
Yes, teenagers can invest in stocks — but not exactly the same way adults do. Here's how it works, what accounts to use, and what to actually buy.
How to Rebalance Your Portfolio (And When to Bother)
Rebalancing keeps your portfolio aligned with your target allocation — but doing it wrong, or too often, costs you money. Here's the right approach, how often to do it, and the tax-smart way to execute it.
Dividend Investing for Beginners: Is Passive Income From Stocks Real?
Dividend stocks promise regular cash payments without selling anything. Here is what dividends actually are, what they pay realistically, and whether chasing yield is a smart strategy or a trap.
