Capital gains tax on stocks is a federal tax on profits earned from selling shares at a higher price than their original purchase cost. The rate applied depends on how long the stock was held and the taxpayer's annual income. This tax applies only when a sale results in a profit, not during ownership.
When you sell a stock for more than you paid, the difference is a capital gain. The IRS classifies these gains as either short-term or long-term based on the holding period. Short-term gains apply to stocks held one year or less, while long-term gains apply to those held longer than one year. These categories face different tax rates, with long-term gains generally taxed at lower rates.
The tax rate increases with income level. For example, in 2024, single filers earning under $47,025 pay 0% on long-term capital gains. Those earning between $47,026 and $518,900 pay 15%, and those above $518,900 pay 20%. Short-term gains are taxed at ordinary income tax rates, which can reach 37% for high earners.
To calculate capital gains tax on stocks, subtract your adjusted basis-the original purchase price plus any associated fees-from the net proceeds of the sale. Net proceeds are the sale amount minus transaction costs like commissions.
For example, if you bought 100 shares of XYZ Corp at $50 per share ($5,000 total), paid $50 in commission, and later sold them for $75 per share ($7,500 total), your adjusted basis is $5,050. Your capital gain is $7,500 − $5,050 = $2,450. If you held the stock for more than a year, this qualifies as a long-term gain.
If your income places you in the 15% long-term capital gains bracket, your tax liability is $2,450 × 15% = $367.50. If you held the stock less than a year, the gain would be taxed at your marginal income tax rate-possibly 22% or higher-resulting in a larger tax bill.
Capital gains on stocks fall into two categories: short-term and long-term. The IRS defines short-term as holdings of one year or less. Long-term gains apply to stocks held beyond 365 days. This distinction affects tax rates and planning strategies.
| Holding Period | Gain Type | Tax Rate Range (2024) | Income Thresholds |
|---|---|---|---|
| ≤ 1 year | Short-term | 10%-37% | Varies by income bracket |
| > 1 year | Long-term | 0%-20% | 0%: under $47,025 (single); 15%: $47,026-$518,900; 20%: over $518,900 |
Long-term capital gains benefit from preferential rates because Congress intended to encourage long-term investing. Short-term gains are taxed as ordinary income because they reflect speculative or trading activity rather than patient wealth building.
A common misconception is that capital gains tax applies annually even if no sale occurs. That's false. Taxes are triggered only upon disposition-the actual sale or exchange of the asset. Holding a stock that rises in value doesn't create a tax obligation until you sell it.
Many investors mistake capital gains tax on stocks for dividend taxation. Dividends are payments made by companies to shareholders and are taxed separately. Qualified dividends are taxed at long-term capital gains rates, but non-qualified dividends are taxed as ordinary income.
Another confusion arises around wash sales. The IRS disallows claiming a loss on a stock if you buy a "substantially identical" stock within 30 days before or after the sale. This rule prevents taxpayers from selling a losing stock to claim a loss and repurchasing it immediately to maintain exposure.
For example, if you sell 100 shares of Apple at a $1,000 loss and buy them back within 30 days, the loss cannot be claimed. Instead, the loss is added to the new stock's basis, deferring the tax benefit. This rule applies only to losses, not gains.
In 2023, Sarah purchased 200 shares of Tesla at $200 per share, totaling $40,000. She paid $100 in brokerage fees. In 2024, she sold the shares at $300 per share, receiving $59,900 after $100 in commissions.
Her adjusted basis is $40,100 ($40,000 + $100). Her net proceeds are $59,900. Her capital gain is $59,900 − $40,100 = $19,800. Since she held the stock for 18 months, this is a long-term gain.
Assuming Sarah is a single filer earning $120,000 in 2024, her long-term capital gains rate is 15%. Her tax liability is $19,800 × 15% = $2,970. If she had sold the stock after six months, the gain would have been taxed at her marginal rate-likely 22%-raising her tax to $4,356.
While the federal government sets capital gains rates, states may impose additional taxes. California, New York, and Connecticut charge state-level capital gains taxes, often aligning with federal brackets. Some states, like Texas and Florida, do not tax capital gains.
Washington State introduced a capital gains tax effective January 1, 2024, under Initiative 2017. It applies a 7% rate to gains exceeding $250,000 annually. The tax targets high-net-worth individuals and funds public education and housing programs. The law includes a $250,000 exemption and phased-in rates for gains above that threshold.
For example, if an investor earns $500,000 in capital gains, the first $250,000 is exempt. The remaining $250,000 is taxed at 7%, resulting in $17,500 in state capital gains tax. This makes Washington one of the few states with a dedicated capital gains tax.
I personally filed my 2023 return using TurboTax and noticed the capital gains section required detailed input on dates, basis, and sale proceeds. The software flagged a potential wash sale when I sold shares of Amazon and rebought them three weeks later. I confirmed the rule applied and adjusted my records accordingly.
Capital gains tax on stocks is due only when shares are sold at a profit. The rate depends on the holding period and income level. Long-term gains are taxed at lower rates than short-term gains. Investors should track basis and avoid wash sales to preserve tax benefits.