What capital gains tax actually means and how it works
Capital gains tax is the tax you owe on profit when you sell something you own — a house, stock, cryptocurrency, or other asset — for more than you paid for it. The difference between what you paid (your cost basis) and what you sold it for (your sale price) is your gain. You only owe tax on that gain, not on the full sale price.
The IRS taxes capital gains differently depending on how long you held the asset. If you held it for one year or less, it's a short-term capital gain and taxed like ordinary income at your regular tax rate. If you held it for more than one year, it's a long-term capital gain and taxed at a lower rate — usually 0%, 15%, or 20%, depending on your income level.
You report capital gains on your federal tax return using Form 8949 (Sales of Capital Assets) and Schedule D. State taxes on capital gains vary — some states don't tax them at all, others tax them like income, and a few have special capital gains taxes.
Key Takeaways
- Capital gains tax is calculated as the sale price minus what you originally paid, and you only owe tax on that profit, not the full amount you received.
- Short-term gains (held one year or less) are taxed at your ordinary income tax rate, while long-term gains (held over one year) are taxed at 0%, 15%, or 20% depending on your total income.
- You need your original purchase price, the sale price, and the date you bought and sold the asset to calculate what you owe.
- State capital gains taxes range from zero to over 13%, so your total tax bill depends on where you live and where the asset was located.
- Losses on asset sales can offset gains dollar-for-dollar, and unused losses can carry forward to future years.
The basic math: cost basis, sale price, and your gain
Start with three numbers: what you paid for the asset (your cost basis, including any fees or commissions), what you sold it for (your sale price
Example: You bought a stock for $5,000 in January 2022 and sold it for $7,200 in March 2024. Your gain is $2,200. Because you held it for more than one year, it's a long-term gain. Cost basis is not always straightforward. If you inherited an asset, your basis is usually its value on the date the person died, not what they originally paid. If you received stock as compensation, your basis is typically the fair market value on the day you received it. If you bought a house and made improvements (a new roof, foundation work), those costs add to your basis. Keep receipts and records for anything that increases your basis. The IRS draws a hard line at one year. If you sell an asset you've held for 365 days or less, the gain is short-term and taxed at your ordinary income tax rate — the same rate you pay on wages or salary. If you've held it for more than one year, it's long-term and taxed at a preferential rate. Long-term capital gains rates are 0%, 15%, or 20%. Which rate you pay depends on your total taxable income for the year, not on the size of the gain itself. The IRS publishes income brackets each year. For 2024, for example, single filers with taxable income up to $47,025 pay 0% on long-term gains; those earning $47,026 to $518,900 pay 15%; those over $518,900 pay 20%. Married filing jointly brackets are higher. These brackets change annually. Short-term gains can cost you significantly more. If you're in the 24% tax bracket and sell a stock for a $10,000 short-term gain, you owe $2,400 in federal tax. The same gain held long-term might cost you $1,500 (at 15%) or nothing (at 0%), depending on your income. If you bought an asset years ago and can't find the original receipt, you have options. For stocks and mutual funds, your broker or the fund company keeps records going back years — contact them and request a cost basis report. Many brokers now provide this automatically on your year-end statement. For real estate, your county assessor's office has records of the purchase price, though not always the exact closing costs. Your original mortgage paperwork or closing statement from the title company shows what you paid and what fees you included. If you're selling a house, your real estate agent can often help reconstruct this information. If you genuinely cannot find records, the IRS allows you to use a reasonable estimate based on what you can document — a bank statement showing a withdrawal, a cancelled check, or even a written statement of what you remember. This is not ideal and invites scrutiny if you're audited, but it's better than guessing. Keep whatever documentation you do have. Once you know your gain and whether it's short-term or long-term, you can estimate your federal tax. For short-term gains, multiply the gain by your tax bracket. If you're unsure of your bracket, the IRS website publishes current brackets, or you can look at your last tax return. For long-term gains, use the 0%, 15%, or 20% rate that corresponds to your income level. Add the long-term gain to your other taxable income for the year to find which bracket you fall into. This matters because the preferential rates apply only to gains that fall within certain income ranges. 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 $7,025 of your gain ($47,025 minus $40,000) is taxed at 0%. The remaining $2,975 is taxed at 15%, which is $446.25. Your total federal tax on the gain is $446.25, not $1,500. This is why the order matters: gains are stacked on top of your other income. If you're close to a bracket threshold, a large gain can push you into a higher rate for part of it. Nine states have no income tax at all and therefore no capital gains tax: Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming, and New Hampshire (which taxes only dividends and interest, not capital gains). If you live in one of these states, you owe only federal tax. Most other states tax capital gains as ordinary income at their regular income tax rates, which range from under 1% to over 13%. A few states have separate capital gains taxes: California has a 1% tax on gains over $1 million; Washington has a 7% tax on long-term gains over $250,000; and Illinois taxes gains at 4.95% regardless of holding period. You owe state tax in the state where you live when you sell the asset, not necessarily where the asset is located. If you sell a rental property in another state, you may owe tax in both states, though you can usually claim a credit for taxes paid to the other state to avoid double taxation. If you sell an asset for less than you paid, you have a capital loss. You can use losses to offset gains dollar-for-dollar. If you have $5,000 in gains and $3,000 in losses, you report a net gain of $2,000 and owe tax only on that amount. If your losses exceed your gains in a year, you can deduct up to $3,000 of the excess loss against ordinary income (wages, salary, interest). Any losses beyond that carry forward to future years with no time limit. You can use them to offset future gains or to deduct another $3,000 against ordinary income each year until the loss is exhausted. Example: In 2024, you have $2,000 in capital gains and $8,000 in capital losses. You offset the $2,000 gain completely, then deduct $3,000 of the remaining loss against your wages. You carry forward $3,000 in losses to 2025. This strategy, called tax-loss harvesting, is common among investors. If you sell a losing investment late in the year, you can use that loss to reduce your tax bill on other gains. However, the IRS has a "wash sale" rule: if you sell a security at a loss and buy the same or a substantially identical security within 30 days before or after the sale, the loss is disallowed and added to the cost basis of the new purchase instead. No. Capital gains tax is owed only when you actually sell the asset and realize the gain. If you own a stock that has doubled in value but you haven't sold it, you owe no tax on the unrealized gain. You owe tax only in the year you sell it. Not on the inheritance itself. Your cost basis is the asset's value on the date the person died, not what they originally paid. If you inherit a house worth $500,000 and sell it a month later for $500,000, you have no gain and owe no tax. If you sell it later for $550,000, you owe tax only on the $50,000 gain. You report each sale on Form 8949 (Sales of Capital Assets), listing the asset, date bought, date sold, cost basis, and sale price. Then you transfer the totals to Schedule D (Capital Gains and Losses), which summarizes your short-term and long-term gains and losses. Schedule D attaches to your Form 1040. If you use tax software, it usually walks you through this automatically. Yes, up to $3,000 per year against ordinary income. Any losses beyond that carry forward indefinitely. You don't need gains to use losses — you can use them to reduce your taxable wages or other income, as long as you don't exceed the $3,000 annual limit. The IRS allows you to exclude up to $250,000 of gain if you're single, or $500,000 if you're married filing jointly, as long as you owned and lived in the house for at least two of the last five years. This exclusion applies only to your primary residence, not investment properties or vacation homes. Gains beyond the exclusion amount are taxed as long-term capital gains.Short-term versus long-term: why the holding period matters
How to find your cost basis when records are missing
Calculating federal tax on your gain
State capital gains taxes and where you owe them
Using losses to reduce what you owe
Frequently Asked Questions
Do I owe capital gains tax if I haven't sold yet?
What if I inherited an asset — do I owe capital gains tax on it?
How do I report capital gains on my tax return?
Can I deduct investment losses if I don't have any gains?
What happens if I sell a house I lived in?