A capital gain or loss is the difference between the sale price of a capital asset and its adjusted cost basis. It arises when you sell investments like stocks, real estate, or business assets, and the proceeds exceed or fall short of your original purchase price plus eligible expenses.
Capital gains occur when you sell an asset for more than you paid. Capital losses happen when you sell for less. These figures determine your taxable income under IRS rules and affect whether you owe federal capital gains tax.
The IRS defines capital assets as property held for investment or personal use, including stocks, bonds, real estate, and collectibles. Gains or losses are realized only upon sale-not while holding the asset. This distinction separates paper profits from actual tax obligations.
To calculate a capital gain or loss, subtract your adjusted cost basis from the net sales proceeds. The adjusted cost basis includes the original purchase price plus transaction fees, improvements, and other qualifying costs. It excludes depreciation unless the asset is depreciable property.
For example, suppose you bought 100 shares of XYZ stock for $50 per share in 2020. You paid $100 in commissions. Your adjusted cost basis is $5,100 ($5,000 + $100). In 2024, you sell the shares for $75 per share, totaling $7,500. After deducting $100 in selling fees, your net proceeds are $7,400.
Your capital gain is $7,400 minus $5,100 = $2,300. This $2,300 is a long-term capital gain if you held the shares more than one year, subject to preferential tax rates under Internal Revenue Code §1222.
Capital gains and losses are classified based on how long you held the asset:
| Holding Period | Type | Tax Rate (2024) | Example |
|---|---|---|---|
| Less than 1 year | Short-term | Ordinary income rate (up to 37%) | Selling a stock bought last month |
| More than 1 year | Long-term | 0%, 15%, or 20% depending on income | Selling a house held for 3 years |
Long-term capital gains are taxed at lower rates than ordinary income. The IRS sets brackets based on your taxable income and filing status. For single filers in 2024, the 0% rate applies to income below $47,025; 15% above that up to $518,900; and 20% above $518,900.
Losses can offset gains. If you have more losses than gains, you may deduct up to $3,000 annually against ordinary income. Any excess carries forward indefinitely. This is known as capital loss carryover, governed by IRC §1211.
Many people confuse capital gains with income from employment or interest. A capital gain is not earned-it's realized. You don't pay tax on a stock's rising value until you sell it. Holding a stock that doubles in value doesn't trigger a tax bill.
Another common error is assuming all gains are taxed equally. Long-term gains are taxed at lower rates than short-term gains. A $10,000 gain held for 13 months is taxed at 15% for most middle-income earners. The same gain held for 11 months is taxed at the higher ordinary income rate-up to 37%.
Non-cash transactions also create capital gains. Selling a home to a relative at below-market value may still trigger a capital gain if the IRS determines the fair market value was higher. The IRS uses Form 8949 to report capital gains and losses, which feeds into Schedule D of Form 1040.
In 2018, I purchased a rental duplex for $280,000. Over six years, I spent $25,000 on repairs and upgrades. My adjusted cost basis is $305,000. In 2024, I sold it for $420,000. After $20,000 in selling fees, net proceeds were $400,000.
My capital gain is $400,000 - $305,000 = $95,000. Because I held the property over 12 months, it qualifies as a long-term gain. Assuming my taxable income places me in the 15% bracket, I owe $14,250 in capital gains tax ($95,000 × 15%).
If I had sold within a year, the same gain would be taxed at my marginal income rate-possibly 24% or higher. That's a $10,000 difference in tax liability.
Most errors in reporting capital gains come from miscalculating the adjusted cost basis. Many investors forget to include acquisition fees, legal costs, or improvement expenses. The IRS requires documentation for all adjustments.
According to the IRS Publication 550 (2024), "You must keep records showing the date of purchase, cost, and any improvements." Without proper records, you risk underreporting gains or losing deductions.
For instance, adding a new roof to a rental property increases your basis by the cost. If you didn't document it, you'd overpay taxes on the gain. I once reviewed a client's return where a $12,000 roof replacement wasn't included-resulting in a $1,800 overpayment in capital gains tax.
Capital gains apply to nearly all transferable assets. Common examples include:
However, not all sales generate capital gains. The IRS allows exclusions for certain events. For example, up to $250,000 of gain on the sale of a primary residence is excluded if you've lived in the home for at least two of the past five years. This rule applies to single filers; married couples filing jointly can exclude up to $500,000.
For those who don't qualify for the exclusion, the remaining gain is taxable. This is where understanding your cost basis becomes critical. If you inherited a home, your basis is stepped up to fair market value at the time of death-potentially eliminating the gain entirely.
Understanding what is a capital gain or loss ensures accurate tax reporting and better financial planning. Realized gains and losses impact your tax bill, and proper recordkeeping prevents costly mistakes. Always calculate your adjusted cost basis and consult IRS guidelines or a tax professional when needed.