Capital gains tax on stocks is the levy owed when you sell shares for more than your purchase price. The exact tax rate you pay depends primarily on your holding period: shares held for one year or less generate short-term capital gains taxed as ordinary income, while shares held for more than one year qualify for lower long-term capital gains rates of 0%, 15%, or 20%.
For investors navigating equity markets, understanding the mechanics of capital gains taxation is essential to preserving net portfolio returns. Every realized sale triggers a taxable event reported to the Internal Revenue Service (IRS), where trading gains and losses are aggregated through a structured netting sequence before reaching your final tax return.
Key Takeaways
- The One-Year Rule: Shares sold after being held for one year or less trigger short-term capital gains, while positions held for more than one year qualify as long-term capital gains.
- Tax Rate Divergence: Short-term gains face ordinary federal income tax rates ranging from 10% up to 37%, whereas long-term gains receive preferential federal rates of 0%, 15%, or 20%.
- Schedule D Netting Order: Gains and losses are netted within their respective holding categories first (short-term against short-term; long-term against long-term) before any cross-category offsetting occurs.
- Annual Loss Offset Limit: If total capital losses exceed total capital gains, investors can deduct up to $3,000 of net losses against ordinary income per tax year ($1,500 if married filing separately), carrying forward any unused balance indefinitely.
Core Concepts: Realized Gains vs. Paper Profits
An investor does not incur a tax liability simply because the market price of an owned stock increases. Price appreciation represents an unrealized gain (often called a “paper profit”). A taxable event occurs only when you dispose of the security—typically through a market sale, exchange, or taxable corporate liquidation.
To determine the exact gain or loss on a transaction, you subtract your adjusted cost basis from the gross proceeds of the sale. The cost basis includes the purchase price of the shares plus any brokerage transaction commissions. As noted by the Financial Industry Regulatory Authority (FINRA), when the price of a stock increases sufficiently to recoup transaction costs, selling those shares generates a capital gain; conversely, selling at a price below your purchase basis generates a capital loss.
Under official guidance from the Internal Revenue Service (IRS Topic no. 409), the duration you own the asset dictates whether the result is classified as short-term or long-term:
“Generally, if you hold the asset for more than one year before you dispose of it, your capital gain or loss is long-term.”
According to FINRA, “if you sell a stock that you haven’t held for a year or more, any profits you make are taxed at the same rate as your regular income, not at your lower tax rate for long-term capital gains.” Calculating this holding period begins on the day after you acquire the stock and concludes on the exact date you execute the sale.
Tax Rate Comparison: Ordinary Brackets vs. Preferential Rates
The financial distinction between short-term and long-term tax treatment is substantial. Short-term capital gains receive no preferential status under the federal tax code. Instead, they are lumped together with your wages, interest income, and non-qualified dividends, subject to standard marginal income tax brackets (10%, 12%, 22%, 24%, 32%, 35%, or 37%).
In contrast, long-term capital gains benefit from statutory preferential brackets. Depending on overall taxable income and filing status, long-term capital gains are taxed at 0%, 15%, or 20% at the federal level. Additionally, high-income taxpayers may be subject to the 3.8% Net Investment Income Tax (NIIT) on net investment gains above statutory modified adjusted gross income thresholds.
| Holding Category | Holding Period | Federal Tax Treatment | Statutory Tax Rates |
|---|---|---|---|
| Short-Term Capital Gain | 1 year or less (365 days or fewer) | Taxed as ordinary income | 10%, 12%, 22%, 24%, 32%, 35%, or 37% |
| Long-Term Capital Gain | More than 1 year (366 days or more) | Preferential capital gains brackets | 0%, 15%, or 20% (plus 3.8% NIIT if applicable) |
| Net Capital Loss | N/A (excess losses over gains) | Ordinary income deduction offset | Up to $3,000 per year ($1,500 if married filing separately) |
How Schedule D Netting Works: The Four-Step Waterfall
When you file federal taxes, stock trades are reported on Form 8949 and aggregated on Schedule D (Form 1040). The IRS applies a rigid mathematical sequence to reconcile multiple winning and losing positions:
- Step 1: Net Short-Term Results. All short-term gains are offset against all short-term losses realized during the tax year. This yields either a net short-term capital gain or a net short-term capital loss.
- Step 2: Net Long-Term Results. All long-term gains are offset against all long-term losses realized during the tax year. This produces either a net long-term capital gain or a net long-term capital loss.
- Step 3: Combine Categories. If you show a gain in one category and a loss in the other, they offset each other:
- If long-term gains exceed short-term losses, the remaining balance is a net capital gain taxed at preferential long-term rates.
- If short-term gains exceed long-term losses, the remaining balance is taxed at ordinary income rates.
- If both categories produce gains, each category is taxed at its respective rate.
- Step 4: Deduct Net Losses Against Ordinary Income. If total capital losses exceed total capital gains across both categories, you experience an overall net capital loss. You can deduct up to $3,000 of this excess loss ($1,500 if married filing separately) against your ordinary taxable income. Any remaining unabsorbed loss rolls forward into future tax years.
Worked Example: Annual Stock Netting in Practice
To see how Schedule D works in practice, consider an illustrative investor who realized four separate stock transactions during a single tax year:
- Trade A (Tech Stock): Bought in February, sold in August for a $6,000 gain (Held 6 months → Short-Term).
- Trade B (Biotech Stock): Bought in March, sold in October for a $4,000 loss (Held 7 months → Short-Term).
- Trade C (Industrial Stock): Bought three years ago, sold in May for a $5,000 gain (Held 36 months → Long-Term).
- Trade D (Consumer Stock): Bought eighteen months ago, sold in November for a $9,000 loss (Held 18 months → Long-Term).
Here is how the IRS netting sequence resolves this portfolio:
- Step 1 (Short-Term Net): $6,000 gain − $4,000 loss = +$2,000 Net Short-Term Gain.
- Step 2 (Long-Term Net): $5,000 gain − $9,000 loss = −$4,000 Net Long-Term Loss.
- Step 3 (Cross-Category Netting): +$2,000 (short-term) + (−$4,000 long-term) = −$2,000 Overall Net Capital Loss.
- Step 4 (Ordinary Income Deduction): Because the total net loss of $2,000 is less than the statutory $3,000 ceiling, the entire $2,000 can be deducted directly against the investor’s ordinary wage income for the year. No loss amount remains to roll over into the subsequent tax year.
Notice how the long-term loss absorbed the short-term gain dollar-for-dollar. Without Trade D’s long-term loss, the investor would have owed ordinary federal income taxes on the full $2,000 short-term profit.
Common Investor Pitfalls to Avoid
Several nuances in tax regulations frequently trip up stock investors:
1. The Wash-Sale Rule
If you sell a stock at a loss and purchase a “substantially identical” stock or option within a 61-day window (30 days before through 30 days after the sale date), the IRS disallows the loss deduction for that tax year. Instead, the disallowed loss is added to the cost basis of the newly acquired shares, postponing the tax benefit until the replacement position is eventually sold. For detailed mechanics on tax-loss planning, see our guide on Tax-Loss Harvesting and the Wash Sale Rule Explained.
2. Specific Share Identification vs. FIFO
When selling part of a larger holding acquired over time at varying prices, brokerages default to “First In, First Out” (FIFO). Under FIFO, the oldest shares purchased are deemed sold first. If your earliest purchases carry the lowest cost basis, FIFO could trigger higher realized capital gains. Investors can instruct their broker to use Specific Identification, selecting higher-cost lots or long-term lots to minimize current tax exposure.
3. Reinvested Dividends
If you participate in a Dividend Reinvestment Plan (DRIP), each reinvested dividend represents a separate purchase lot with its own cost basis and acquisition date. Failing to add reinvested dividends to your cumulative cost basis leads to double taxation upon sale. To review dividend classifications, consult our explainer on Qualified vs. Ordinary Dividends: Tax Rules Explained.
For additional foundational resources on trading mechanics, visit the ECMSource Start Here learning hub.
Sources
- Internal Revenue Service — Topic no. 409, Capital Gains and Losses
- Financial Industry Regulatory Authority (FINRA) — Stocks: Capital Gains and Dividends
Disclosure: This article is for informational purposes only and is not investment advice.