What Is Capital Gains Tax on Stocks? A Plain-English Overview
Capital gains tax on stocks explained simply: when you sell a stock for more than you paid, the profit is called a capital gain, and the IRS expects a cut. Understanding how this works is one of the most important financial skills a new investor can develop, because getting it wrong can quietly destroy returns you worked hard to build.
This guide breaks down exactly how capital gains tax works, the crucial difference between short-term and long-term rates, how to calculate what you owe, and a handful of legal strategies to keep more of your money. Before we dive into tax treatment, if you are still learning what stocks actually are, read our beginner guide on what a stock is and how it works first.
The Two Types of Capital Gains: Short-Term vs Long-Term
The single most important factor that determines how much tax you pay on a profitable stock sale is how long you held the shares before selling. The IRS draws a clear line at one year.
Short-Term Capital Gains (Held 1 Year or Less)
If you buy a stock and sell it within 12 months at a profit, that gain is classified as short-term. Short-term gains are taxed at your ordinary income tax rate โ the same rate applied to your salary or wages. Depending on your total income, that rate can range from 10% to 37%. For most working people, this is a painfully high rate on investment profits.
Example (illustration only, not tax advice): Suppose you buy 10 shares at $50 each ($500 total) and sell them 8 months later at $80 each ($800 total). Your short-term gain is $300. If your income tax bracket is 22%, you owe approximately $66 in federal tax on that trade.
Long-Term Capital Gains (Held More Than 1 Year)
If you hold shares for more than one year before selling, the gain qualifies as long-term. Long-term capital gains are taxed at preferential rates: currently 0%, 15%, or 20%, depending on your taxable income. Most middle-income investors fall into the 15% bracket. This is one of the biggest legal tax advantages available to ordinary investors.
Using the same example above โ a $300 profit โ if you had waited just a few more months so the holding period exceeded one year, your tax at a 15% long-term rate would drop to $45 instead of $66. Small amounts, but the gap multiplies dramatically with larger sums.
The IRS publishes the exact income thresholds for each long-term rate, and these figures are adjusted periodically. Always check the IRS Topic 409 page for the most current numbers rather than relying on any figure you read in an article, including this one.
How to Calculate Your Capital Gains Tax
Calculating what you owe follows a straightforward formula:
- Find your cost basis โ the total amount you paid for the shares, including any commissions.
- Subtract the cost basis from your sale proceeds โ the result is your capital gain (or loss).
- Identify whether it is short-term or long-term โ check your purchase date versus your sale date.
- Apply the appropriate rate โ your ordinary income rate (short-term) or the preferential long-term rate.
Your broker will send you a Form 1099-B each year summarising all your sales. You then report these on IRS Schedule D. Even if your broker calculates your gains automatically, you remain legally responsible for accuracy on your return.
Capital Gains Tax on Stocks: Key Rules Beginners Miss
The Wash-Sale Rule
If you sell a stock at a loss and buy the same or a substantially identical security within 30 days before or after the sale, the IRS disallows the loss under the wash-sale rule. You cannot use it to offset gains that year. This catches many beginners who try to harvest losses while staying invested. See the Investor.gov stocks page for further background on how stocks are regulated.
Dividends Are Taxed Separately
Capital gains tax applies to profits from selling shares. Dividends you receive while holding shares are taxed differently โ either as ordinary income or as qualified dividends (which receive the same preferential rates as long-term capital gains, provided certain holding-period requirements are met).
Tax-Advantaged Accounts Change Everything
Inside a Roth IRA or Traditional IRA, you generally do not pay capital gains tax when you sell stocks, because these accounts are tax-sheltered. This is one of the most powerful reasons to maximise retirement account contributions before trading in a taxable brokerage account. The IRS sets annual contribution limits for these accounts, which are adjusted over time โ always verify the current limits at IRS.gov retirement contribution limits.
Practical Strategies to Reduce Your Capital Gains Tax
- Hold for more than one year whenever your investment thesis supports it. The rate reduction from short-term to long-term is the simplest legal tax cut available.
- Use tax-loss harvesting โ sell positions sitting at a loss to offset gains elsewhere in your portfolio. Be mindful of the wash-sale rule.
- Prioritise tax-advantaged accounts โ keep your highest-growth assets inside a Roth IRA or 401(k) where gains compound without annual tax drag.
- Be strategic about timing โ if you are close to the one-year mark, waiting a few more weeks before selling can shift your gain from short-term to long-term rates.
- Keep clean records โ track every purchase price, date, and commission. Cost basis errors can artificially inflate your reported gain.
Choosing the Right Brokerage to Track Your Gains
Modern brokerage platforms do a lot of the heavy lifting. Brokers like Fidelity, Charles Schwab, and Robinhood offer built-in gain/loss tracking, automatically calculate your cost basis, and generate your 1099-B at year-end. Many now offer commission-free stock trading, which also simplifies cost-basis calculations since there are no commissions to factor in. Always verify current fees and features directly with the provider, as these change.
If you are still choosing where to open an account, our guide to the best brokerage accounts for beginners compares the top platforms side by side to help you pick the right fit.
Actionable Takeaway
The single highest-impact habit you can build right now: before you sell any stock at a profit, check your purchase date. If you are within days or weeks of the one-year mark, waiting can shift you from short-term to long-term rates and potentially save you hundreds of dollars per trade with zero additional risk or effort. Tax efficiency is free alpha.
Frequently Asked Questions
Do I owe capital gains tax if I never sell my stocks?
No. Capital gains tax is only triggered when you sell or otherwise dispose of a stock at a profit. Unrealised gains โ increases in value while you still hold the shares โ are not taxed until you sell.
What is the difference between short-term and long-term capital gains tax?
Short-term capital gains apply when you sell a stock held for one year or less, and the profit is taxed at your ordinary income tax rate. Long-term capital gains apply when you hold for more than one year, and the rate is generally 0%, 15%, or 20% depending on your total income โ usually significantly lower than your regular income tax rate.
What is tax-loss harvesting?
Tax-loss harvesting means intentionally selling investments that are worth less than you paid for them. The resulting loss can offset capital gains you made elsewhere, reducing your overall tax bill. Be aware of the IRS wash-sale rule, which disallows the loss if you buy back a substantially identical security within 30 days before or after the sale.
Do I have to report stock gains on my tax return even if my broker sends a form?
Yes. Your broker will send a Form 1099-B summarising your sales, but you are still responsible for reporting every transaction accurately on your tax return using IRS Schedule D. Errors or omissions are your legal responsibility, not your brokerโs.
This article is for educational purposes only and does not constitute financial or investment advice. Investing involves risk, including the possible loss of principal. Past performance does not guarantee future results. Always do your own research, and consider speaking with a licensed financial professional before making investment decisions.
Izhaq Shah is the founder of GetIntoMarkets. He holds a Master’s in Finance and Commerce, with over 10 years in the financial industry and 15 years of writing experience. He makes investing in stocks, ETFs and crypto simple and practical for everyday people building wealth with confidence.

