What You're Actually Computing
Capital gains tax is the tax you owe on profit when you sell something you own — a stock, rental property, cryptocurrency, or collectible. You don't owe tax on the sale itself; you owe it only on the gain, which is the difference between what you paid for it and what you sold it for. The calculation is straightforward: sale price minus purchase price equals your gain, and that gain is what gets taxed.
The tax rate depends on how long you held the asset. If you owned it for one year or less, it's taxed as short-term capital gains at your ordinary income tax rate — the same rate you pay on wages. If you owned it for more than one year, it's taxed as long-term capital gains at a lower rate: 0%, 15%, or 20%, depending on your income level. This difference matters enormously; long-term gains can save you thousands in tax.
Key Takeaways
- Capital gain equals the sale price minus what you originally paid, and you only owe tax on gains, not on the full sale amount.
- Short-term gains (held one year or less) are taxed at your regular income tax rate; long-term gains (held over one year) are taxed at 0%, 15%, or 20%.
- You must track your original purchase price, the date you bought it, the date you sold it, and the sale price to compute your gain correctly.
- If you sold at a loss, you can use that loss to offset other gains and up to $3,000 of ordinary income in the same year.
- Your broker or investment platform usually provides a cost basis report, but you should verify it matches your own records.
The Basic Calculation: Gain or Loss
Start with the sale price — the amount of money you received when you sold the asset. Subtract your cost basis, which is what you originally paid for it plus any fees or commissions you paid to buy it. The result is your capital gain or loss.
Example: You bought 100 shares of stock for $50 per share ($5,000 total) plus a $10 commission, so your cost basis is $5,010. You sold all 100 shares for $75 per share ($7,500) minus a $10 commission, so your net proceeds are $7,490. Your capital gain is $7,490 minus $5,010 = $2,480.
If the sale price is lower than your cost basis, you have a capital loss instead. Losses are valuable because you can use them to reduce your tax bill, so keep records of losses even if you don't report them immediately.
Holding Period: The One-Year Rule
The date you bought the asset and the date you sold it determine whether your gain is short-term or long-term. If you held it for one year or less, it's short-term. If you held it for more than one year, it's long-term. The IRS counts the holding period from the day after you bought it to the day you sold it.
Example: You bought a stock on March 15, 2023, and sold it on March 15, 2024. That's exactly one year, so it's short-term. If you sold it on March 16, 2024, it would be long-term.
This distinction is critical because short-term gains are taxed at your full income tax rate (10%, 12%, 22%, 24%, 32%, 35%, or 37%, depending on your income and filing status), while long-term gains are taxed at 0%, 15%, or 20%. For most people, holding an asset just a few weeks longer can cut the tax bill significantly.
Tax Rates for Long-Term Gains
Long-term capital gains are taxed at preferential rates based on your taxable income and filing status. The three rates are 0%, 15%, and 20%. You don't choose which rate applies; the IRS applies them in order based on your income.
| Filing Status | 0% Rate | 15% Rate | 20% Rate |
|---|---|---|---|
| Single | Up to $47,025 | $47,025 to $518,900 | Over $518,900 |
| Married Filing Jointly | Up to $94,050 | $94,050 to $583,750 | Over $583,750 |
| Head of Household | Up to $63,000 | $63,000 to $551,350 | Over $551,350 |
These income thresholds are adjusted each year for inflation, so check the current year's IRS tables. Your taxable income includes wages, interest, dividends, and other income, not just capital gains. If your total taxable income falls in the 0% bracket, your long-term gains are not taxed at all.
Example: You're single with $40,000 in wages and a $10,000 long-term capital gain. Your total taxable income is $50,000. The first $47,025 of your gain is taxed at 0%, and the remaining $2,975 is taxed at 15%, for a total tax of $446.25 on the gain.
Using Losses to Reduce Your Tax
If you sold an asset at a loss, you can use that loss to offset capital gains from other sales in the same year. If your losses exceed your gains, you can deduct up to $3,000 of the excess loss against your ordinary income (wages, salary, interest). Any remaining loss carries forward to future years.
Example: You had a $5,000 long-term gain on one stock and a $7,000 long-term loss on another. Your net loss is $2,000. You can deduct $2,000 against your ordinary income this year, reducing your taxable income by $2,000. If your loss had been $10,000, you'd deduct $3,000 this year and carry forward the remaining $7,000 to next year.
This is why tracking losses matters even when you don't report them immediately. Keep your brokerage statements and sale confirmations for at least three years, and longer if you're carrying forward losses.
Cost Basis: What You Actually Paid
Your cost basis is not just the purchase price; it includes the original price plus any fees, commissions, or costs directly tied to buying the asset. If you inherited an asset, received it as a gift, or bought it through a dividend reinvestment plan, the cost basis rules are different.
For inherited assets, your cost basis is usually the fair market value on the date the person died, not what they originally paid. This is called a "step-up in basis" and can eliminate or greatly reduce the tax on gains that occurred before you inherited it.
For gifts, your cost basis is generally the same as the person who gave it to you — you inherit their cost basis, not the current value. Your broker or investment platform should provide a cost basis report when you sell, but verify it against your own records. Errors in cost basis are common and can lead to overpaying tax or underpaying and facing penalties.
Reporting Your Gains on Your Tax Return
You report capital gains on Schedule D (Form 1040), which separates short-term gains and losses from long-term ones. Your broker sends you a Form 1099-B showing all your sales for the year, including the sale price and (usually) the cost basis. You use this form to fill out Schedule D.
If you have only a few transactions, the process is straightforward: list each sale, compute the gain or loss, and add them up. If you have many transactions or complex situations — such as inherited assets, gifts, or assets you've held for decades — consider working with a tax professional to ensure accuracy.
The IRS matches your reported gains against the 1099-B your broker sent them, so discrepancies trigger notices. If your cost basis on the return doesn't match what your broker reported, the IRS will assume the higher gain and send you a bill. This is another reason to verify your cost basis before you file.
Frequently Asked Questions
Do I owe tax if I sold at a loss?
No tax is owed on the loss itself, but you can use the loss to reduce other gains or up to $3,000 of ordinary income. Any unused loss carries forward to future years. Keep records of losses even if you don't report them immediately.
What if I don't know my original purchase price?
Contact your broker or the company that held the asset. They may have records going back years. If records are truly unavailable, you can estimate based on historical price data, but document your method. The IRS may challenge an estimate, so this is a last resort.
How do I know if my gain is short-term or long-term?
Count the days from the day after you bought it to the day you sold it. If that's one year or less, it's short-term. If it's more than one year, it's long-term. Your broker's confirmation statement usually shows both dates.
Can I reduce my capital gains tax by donating the stock instead of selling it?
Yes. If you donate appreciated stock to a may have access to charity, you avoid the capital gains tax entirely and can deduct the fair market value of the stock as a charitable contribution. This works only if the stock has appreciated and you donate it directly to the charity, not the proceeds from selling it.
What if I sold cryptocurrency or an NFT?
The same rules apply. Compute your gain as sale price minus cost basis, determine your holding period, and report it on Schedule D. The IRS treats cryptocurrency as property, not currency, so every sale is a taxable event.