Capital Gains and Losses: Definition, Types, and Tax Rules
Capital gains and losses are at the heart of investment taxation. Every time you sell an asset such as a stock, bond, mutual fund, or real estate, you create a taxable event that must be reported to the IRS. The gain or loss is the difference between your selling price and your adjusted cost basis. Knowing how these amounts are classified, taxed, and netted against each other can significantly affect your annual tax bill.
Many investors focus only on returns, but the tax treatment of gains and losses can turn a profitable year into a disappointing one if you are not careful. The rules around short-term and long-term holding periods, preferential rates, and the mechanics of offsetting gains with losses are deliberately designed. Understanding them gives you a powerful tool for after-tax portfolio management.
This article explains what capital gains and losses are, how short-term and long-term classifications differ, the current tax rates that apply, and the netting rules the IRS requires when you have both gains and losses in the same year. We will also briefly mention where tax-loss harvesting fits into the picture without duplicating a separate in-depth guide on that topic.
Quick Answer
![]()
A capital gain is the profit from selling a capital asset for more than its cost basis; a capital loss is the loss when you sell for less. Short-term gains (assets held one year or less) are taxed as ordinary income, while long-term gains enjoy lower rates. Netting rules require offsetting gains and losses in a specific order, and up to $3,000 of net capital loss can be deducted against other income each year.
What Are Capital Gains and Losses?
![]()
A capital gain arises when you sell or exchange a capital asset for more than your adjusted basis. Your basis is generally what you paid for the asset plus any transaction costs and adjustments such as reinvested dividends or improvements to real estate. When the selling price minus the basis is positive, you have a capital gain; when it is negative, you have a capital loss. The Internal Revenue Code defines capital assets broadly: stocks, bonds, mutual funds, ETFs, cryptocurrency treated as property, collectibles, and your home all fall into this category.
Capital gains and losses are not recognized for tax purposes until you actually sell the asset. This is the realization principle. Paper gains that build up while you continue to hold an investment do not trigger any tax. The moment you sell, though, the transaction creates a reportable event. Even swaps between cryptocurrencies are considered taxable dispositions under current IRS guidance. The exact timing and how proceeds and basis are calculated are critical for accurate reporting.
Losses may also occur when an asset becomes completely worthless or is abandoned. In those cases, you may be able to claim a capital loss even without a sale, but special documentation is required. For most individual taxpayers, however, capital gains and losses come from selling investments through brokerage accounts.
Short-Term vs. Long-Term Capital Gains and Losses
![]()
The tax code divides gains and losses into two categories based on how long you held the asset before selling. The dividing line is exactly one year. If you hold an asset for one year or less, any gain or loss is short-term. If you hold it for more than one year, it is long-term. The holding period begins the day after you acquire the asset and ends on the day you sell it. Even one extra day can shift a transaction from short-term to the more favorably taxed long-term category.
This distinction matters enormously because short-term capital gains are taxed at the same rates as ordinary income, which can go as high as 37% at the federal level, while long-term capital gains enjoy significantly reduced tax rates of 0%, 15%, or 20% depending on your income. There is no lower rate for short-term gains, so proper tax planning often tries to avoid realizing large short-term gains whenever possible.
Short-term losses, however, can be extremely valuable because they offset short-term gains first, which are taxed at the highest rates. The classification also affects the netting process, which we will cover later. Many tax-loss harvesting strategies deliberately target short-term losses for this reason. Understanding whether your realized gains and losses are short-term or long-term is the first step in any tax-efficient investment plan.
How Capital Gains Are Taxed
![]()
Short-term capital gains are simply added to your total ordinary income and taxed according to your marginal tax bracket. In 2025, the highest marginal rate on ordinary income remains 37%, so a large short-term gain could easily push you into a higher bracket. State income taxes also apply and typically do not offer preferential rates for capital gains, though a few states have lower rates or exemptions.
Long-term capital gains are taxed based on your taxable income level. For most taxpayers, the rates are 0% for those in the 10% and 12% ordinary income brackets, 15% for those in the 22% through 35% brackets, and 20% for those in the 37% bracket. However, there are nuances: high-income taxpayers may also face a 3.8% Net Investment Income Tax (NIIT) on investment income, including capital gains, which effectively makes the top federal rate 23.8%. Certain assets like collectibles and qualified small business stock can have different rates, but for standard stocks and bonds the three-tier structure applies.
It is essential to understand that long-term gains are not taxed in isolation. Your total taxable income, including all other income sources, determines which long-term capital gains bracket applies to your net long-term gains. This is why managing how gains interact with other income is a central focus of year-end tax planning.
Netting Rules: Offsetting Gains with Losses
![]()
When you have both capital gains and capital losses in the same tax year, the IRS requires you to follow a precise netting process. You cannot simply pick which gains to cancel with which losses; the calculation is mechanical. The process ensures that short-term losses are applied against short-term gains first, and long-term losses against long-term gains first, before any cross-application occurs. This ordering is designed to maximize the tax benefit by using losses that offset the highest-taxed gains first.
The netting steps are as follows:
- Offset all short-term gains against all short-term losses to produce a net short-term gain or loss.
- Offset all long-term gains against all long-term losses to produce a net long-term gain or loss.
- If you end up with a net short-term loss and a net long-term gain, the short-term loss is used to offset the long-term gain. Conversely, if you have a net long-term loss and a net short-term gain, the long-term loss offsets the short-term gain.
- After these steps, you will arrive at either a net capital gain (short-term or long-term) or a net capital loss for the year.
If the final result is a net capital loss, individual taxpayers can deduct up to $3,000 ($1,500 if married filing separately) of that loss against other income such as wages or interest. Any remaining loss is carried forward to the next tax year and retains its character—short-term loss carries forward as short-term, long-term loss as long-term. The carryforward can be used in future years to offset future capital gains and up to $3,000 of ordinary income each year indefinitely until the loss is fully used up.
For example, suppose you have $10,000 in short-term capital gains, $4,000 in short-term losses, $2,000 in long-term gains, and $5,000 in long-term losses. First, net short-term: $10,000 – $4,000 = $6,000 net short-term gain. Net long-term: $2,000 – $5,000 = $3,000 net long-term loss. Then cross-offset: apply the $3,000 net long-term loss against the $6,000 net short-term gain, leaving $3,000 net short-term gain. You would report $3,000 in short-term capital gain on your return, taxed at ordinary rates.
If the numbers had resulted in a net capital loss of, say, $8,000, you could deduct $3,000 against ordinary income that year and carry forward $5,000 to the next year. In the following year, that $5,000 carryforward would be treated as a capital loss in the netting process alongside any new gains and losses.
Special Situations and Wash Sale Rules
![]()
The netting rules work hand in hand with the wash sale rule, which disallows a loss if you buy the same or a substantially identical security within 30 days before or after the sale. If a loss is disallowed because of a wash sale, you cannot use it in the current netting process. Instead, the disallowed loss is added to the basis of the replacement shares, effectively deferring the loss until you eventually sell those shares in a non-wash sale transaction. This rule prevents investors from artificially generating losses while maintaining their position, and it directly reduces the available losses for netting in the current year.
Another nuance concerns carryover loss character. If you have a net short-term loss and a net long-term loss in the same year, the $3,000 deduction against ordinary income first comes from the short-term loss pool. This ordering is beneficial because short-term losses offset ordinary income dollar for dollar, while long-term losses would otherwise only offset long-term capital gains that are taxed at lower rates. Keeping this in mind can influence which lots you choose to sell when harvesting losses.
Also noteworthy is the interaction with the Net Investment Income Tax. Capital losses, whether current year or carried forward, can reduce the amount of net investment income subject to the 3.8% surtax, but only after the netting process is complete and only to the extent that the losses are applied against capital gains included in net investment income. The deduction of up to $3,000 against non-investment ordinary income does not reduce the NIIT base.
Reporting Capital Gains and Losses on Your Tax Return
![]()
All capital asset sales are reported on Form 8949 and then summarized on Schedule D. Your brokerage will issue Form 1099-B listing proceeds and, for covered securities, cost basis information and holding period. You must carefully categorize each transaction as short-term or long-term and indicate whether the basis was reported to the IRS. Any adjustments to basis, such as wash sale deferrals or inherited asset step-ups, must be noted in the appropriate column.
Schedule D walks through the netting process automatically. Part I covers short-term transactions, Part II covers long-term transactions, and Part III computes the overall net capital gain or loss and the deductible amount. If you have capital loss carryovers from prior years, those are entered on the appropriate lines and integrated into the current-year netting. The resulting net capital gain flows to Form 1040, while a deductible capital loss is entered as a reduction of income.
Accuracy is crucial because the IRS matches the totals from your 1099-B forms against your return. Discrepancies often trigger notices. If you have many transactions, tax software or a professional can manage the calculations, but knowing how the netting rules function helps you spot errors and plan future trades intelligently.
Tax-Loss Harvesting and Capital Gains
![]()
While a detailed tax-loss harvesting guide exists elsewhere, it is important to understand how the concept ties directly to capital gains and losses. Tax-loss harvesting is the intentional sale of securities at a loss to realize a capital loss that can offset capital gains or ordinary income according to the netting rules described above. Without a solid grasp of the netting order and the distinction between short-term and long-term losses, harvesting can produce unexpected results.
Investors should remember that harvested losses first offset gains of the same character. A short-term loss you deliberately realize will first reduce any short-term gains on your books before attempting to shelter long-term gains or ordinary income. The wash sale rule must be respected, or the benefit is lost. After the end of the year, any leftover loss becomes a carryforward, available to offset future gains.
Sophisticated taxpayers combine harvesting with the ability to carry losses forward indefinitely. This transforms a particularly bad market year into a multi-year tax shield, all while staying consistent with the netting framework. Even if you do not need losses in the current year, carrying them forward preserves flexibility.
Conclusion
![]()
Capital gains and losses form the foundation of tax treatment for nearly every investment you make. Recognizing the difference between short-term and long-term gains, knowing the applicable tax rates, and mastering the IRS netting rules allow you to make informed decisions that keep more of your returns. Whether you are offsetting gains with carefully timed losses or simply trying to understand your year-end brokerage statement, these rules are not optional—but they can work in your favor with the right knowledge.
FAQ
![]()
How does the IRS define a capital asset?
A capital asset is almost anything you own and use for personal or investment purposes, including stocks, bonds, mutual funds, real estate, and cryptocurrency. Business inventory and certain other items are excluded from capital asset treatment.
Can I use capital losses to reduce my ordinary income if I have no gains?
Yes. If your net capital loss exceeds any capital gains for the year, you can deduct up to $3,000 ($1,500 married filing separately) of the excess against wages, interest, or other ordinary income. The remainder carries forward to future tax years.
Do long-term capital gains ever push me into a higher ordinary income tax bracket?
No. Long-term capital gains are stacked on top of ordinary income for rate-determination purposes but are not taxed at ordinary income rates. They can, however, shift the bracket that applies to other long-term gains and may increase your adjusted gross income enough to affect phaseouts of deductions or credits.
What happens if I have both short-term and long-term capital losses this year?
The netting rules compute a net short-term loss and a net long-term loss separately. When both are losses, the $3,000 deduction against ordinary income is applied first from the short-term loss pool. The remaining short-term loss and the entire long-term loss are carried forward, maintaining their respective character for future years.
Are wash sale adjustments applied before or after netting?
Wash sale rules prevent you from including a disallowed loss in the current year’s capital loss figures at all. You simply exclude the wash sale loss from your totals when computing short-term and long-term gain and loss amounts that enter the netting process. The disallowed amount gets added to the replacement shares’ basis.
Can state tax rules for capital gains differ from federal rules?
Yes. Many states tax all capital gains as ordinary income without preferential long-term rates. Some states offer a deduction or exemption for certain gains. You should refer to your specific state’s tax agency for current rules, as they can diverge significantly from the federal system.