Key takeaways
- A capital gain or loss is the difference between what you receive when you sell and your adjusted basis, usually what you paid.
- Assets held more than one year produce long-term gains or losses; one year or less, short-term.
- Net short-term gains are taxed as ordinary income; net long-term gains get lower rates of 0%, 15% or 20% depending on taxable income.
- Net capital losses can offset up to $3,000 of other income a year ($1,500 if married filing separately), with any excess carried forward.
- Thresholds change every year, and this is general information, not tax advice.
When you sell shares for more than you paid, the profit is a capital gain, and in the United States it is taxable. How much tax depends mainly on one date: how long you held the shares. This guide summarises the federal rules as the IRS describes them in Topic 409 and Publication 550. It is general information, not tax advice; thresholds change every year, state taxes vary, and individual circumstances matter.
Gain, loss and basis
IRS Topic 409 explains that stocks held as investments are capital assets, and that when you sell one, the difference between the amount you realise and your adjusted basis is a capital gain or loss. Topic 409 says an asset's basis is generally its cost to the owner, and Publication 551 adds that for stocks it is generally the purchase price plus costs of purchase, such as commissions and recording or transfer fees. Basis can be adjusted, for example by a wash sale, and gifts and inheritances follow different rules, set out in IRS Publication 551.
Example. You buy 100 shares at $40 ($4,000) plus a $5 commission, so your basis is $4,005. You later sell them at $55 ($5,500). Your capital gain is $1,495.
Selling is the event that produces a capital gain or loss; a rise in a share price you have not sold is not a gain on your return. Dividends are reported separately: Publication 550 explains that qualified dividends are taxed at the same 0%, 15% or 20% maximum rates that apply to net capital gain, while other ordinary dividends are taxed as ordinary income. How dividends work covers the payment dates.
Short-term or long-term: the one-year line
| Holding period | Classification | How net gains are taxed |
|---|---|---|
| One year or less | Short-term | As ordinary income, at your regular graduated rates |
| More than one year | Long-term | At lower capital gains rates: 0%, 15% or 20% |
Topic 409 states the rule: hold the asset more than one year and the gain or loss is generally long-term; hold it one year or less and it is short-term. Exceptions exist, for example for property acquired by gift or from someone who has died.
Counting the days. Topic 409 says you generally count from the day after you acquired the asset, up to and including the day you sold it. So for shares bought on 10 March 2025, the count starts on 11 March 2025; one full year has passed on 10 March 2026, and a sale from 11 March 2026 onwards is held more than one year. A sale on 10 March 2026 or earlier is short-term. When a sale falls close to the line, the exact date is worth checking against IRS guidance or with a tax professional.
The long-term rates
Topic 409 explains that net capital gains may be taxed at 0%, at 15% for most individuals, or at 20% at higher incomes. For tax year 2025, it lists these thresholds based on taxable income:
| Filing status | 0% rate if taxable income up to | 15% rate up to | 20% above |
|---|---|---|---|
| Single | $48,350 | $533,400 | $533,400 |
| Married filing jointly | $96,700 | $600,050 | $600,050 |
| Head of household | $64,750 | $566,700 | $566,700 |
| Married filing separately | $48,350 | $300,000 | $300,000 |
Rates apply in layers, not to your whole gain at once: Topic 409 explains that the 20% rate applies to the extent taxable income exceeds the 15% thresholds. The thresholds change every year, so check the current year's numbers. Topic 409 also lists higher maximum rates for some special categories, such as 28% for collectibles like coins or art, and notes that people with significant investment income may owe the net investment income tax.
Netting gains and losses
Gains and losses are combined within each category and then against each other. If losses exceed gains overall, Topic 409 explains you can deduct up to $3,000 of the net loss against other income each year ($1,500 if married filing separately), and carry any remainder forward to later years.
Example. In one year you have a $2,000 long-term gain and a $6,000 short-term loss. Net: a $4,000 loss. You can deduct $3,000 this year and carry $1,000 forward.
Sales are reported on Form 8949 and summarised on Schedule D of Form 1040, and a large gain may mean estimated tax payments are due, as Topic 409 notes.
Funds and frequent trading
- Fund distributions. The SEC explains that investors holding mutual fund or ETF shares in a taxable account may have to pay tax on capital gains distributions from the fund, even without selling. Because many ETFs buy and sell portfolio securities through in-kind exchanges, they typically have fewer of these distributions; see ETFs versus mutual funds.
- Tax-advantaged accounts. The same SEC bulletin notes there is no tax difference between an ETF and a mutual fund held in a tax-advantaged account such as a 401(k) or IRA. Those accounts follow their own tax rules, which this article does not cover.
- Frequent trading. Gains from shares held a year or less are short-term and taxed as ordinary income. FINRA's guidance on frequent intraday trading warns of higher costs that can erode returns "as well as potential tax implications", and suggests talking with a tax professional about them.
Records matter
Brokers report sales on Form 1099-B, and Publication 550 says that if no basis is shown there, you enter the correct basis yourself. Keeping your own records of purchase dates, prices and quantities, for example in a trading journal, makes the holding-period and basis questions easier to answer.
Simulated trades in Learn to Trade Stocks Beginner involve no real money and no taxes, but the habit of recording every trade carries over. It is one of our education apps; the investing basics hub lists the related guides.
Good to know
Frequently asked questions
How are capital gains on stocks taxed?
How long do you need to hold a stock for long-term treatment?
What are the long-term capital gains rates?
How much of a capital loss can you deduct?
Sources
- Topic no. 409, Capital gains and losses (opens in a new tab)Internal Revenue Service — accessed
- Publication 550 (2025), Investment Income and Expenses (opens in a new tab)Internal Revenue Service — accessed
- Characteristics of Mutual Funds and Exchange-Traded Funds (ETFs) – Investor Bulletin (opens in a new tab)Investor.gov, U.S. Securities and Exchange Commission — accessed
- Frequent Intraday Trading: Understanding the Basics (opens in a new tab)FINRA — accessed
- Publication 551 (12/2025), Basis of Assets (opens in a new tab)Internal Revenue Service — accessed
About the author
Reign Creative LLC — The independent app studio that builds the apps covered on this site and publishes every article here. On Google Play it publishes as Reign Collective Apps.
We use AI tools to help research, draft and edit our articles. Each article lists the sources its factual claims rely on, and details about our apps come from their live Google Play listings. No article on this site has been reviewed by an independent expert unless the reviewer is named on it.
No person at Reign Creative LLC has read this article in full. It was published after automated checks and an AI editorial review, which are described in our editorial policy and are not the same as a person reading every sentence.
Spotted an error? Tell us — how corrections are handled is set out in our editorial policy.