How Capital Gains Tax Works and What You Pay
Capital gains tax is a tax on the profit you make when you sell an asset for more than you paid for it
When you buy a stock, bond, real estate, or other investment and later sell it at a higher price, the difference between what you paid and what you received is your capital gain. The IRS taxes that profit. The amount you owe depends on how long you held the asset, your total income for the year, and your filing status. Short-term gains (assets held one year or less) are taxed as ordinary income. Long-term gains (assets held more than one year) get lower tax rates.
You do not owe capital gains tax on assets you still own, only on ones you have sold. If an asset loses value and you sell it for less than you paid, that loss can offset other capital gains or reduce your ordinary income by up to $3,000 per year.
Key Takeaways
- Capital gains tax applies only to profits from selling investments, not to the investments themselves or to unrealized gains.
- Long-term capital gains (held over one year) are taxed at 0%, 15%, or 20% depending on your income and filing status; short-term gains are taxed at your ordinary income tax rate.
- The tax rate you pay is determined by your total taxable income for the year, not by the size of the gain alone.
- Capital losses can reduce your capital gains dollar-for-dollar, and excess losses can reduce ordinary income by up to $3,000 per year.
Short-term vs. long-term capital gains rates
The holding period determines which tax rate applies. If you sell an asset you have owned for one year or less, the gain is short-term and taxed as ordinary income. That means it is added to your wages, interest, and other income and taxed at your regular tax bracket — which can be 10%, 12%, 22%, 24%, 32%, 35%, or 37% depending on your filing status and total income.
If you sell an asset you have owned for more than one year, the gain is long-term and gets preferential rates. Long-term capital gains are taxed at 0%, 15%, or 20%. Which rate you pay depends on your taxable income and filing status, not on the size of the gain. The IRS publishes new income thresholds each year. For example, in 2024, a single filer with taxable income up to $47,025 pays 0% on long-term gains; income from $47,026 to $518,900 is taxed at 15%; and income above that is taxed at 20%.
Because long-term rates are lower, many investors plan the timing of sales to cross the one-year mark before selling.
How your total income affects the tax rate you pay
Your capital gains tax rate is not set by the gain itself — it is set by where your total taxable income falls for the year. If you have a $50,000 long-term capital gain but your wages and other income total $30,000, your combined taxable income is $80,000. That $80,000 determines which tax bracket applies to the gain.
This matters because capital gains are "stacked" on top of your other income. If you are near the top of the 15% long-term bracket and realize a large gain, part of that gain may be taxed at 20%. Similarly, if you have a year with very low ordinary income, you may be able to realize long-term gains at the 0% rate.
Some people use this to their advantage by timing large sales in years when their other income is lower, or by pairing a large gain with a large loss to keep their total taxable income in a lower bracket.
What counts as a capital asset and what does not
Capital gains tax applies to the sale of capital assets — things you own for investment or personal use. This includes stocks, bonds, mutual funds, real estate, artwork, collectibles, and cryptocurrency. When you sell any of these at a profit, you owe capital gains tax on the difference between your purchase price (called your basis) and your sale price.
Some items are not treated as capital assets. If you are a dealer in securities or real estate — meaning you buy and sell as a business — your gains are taxed as ordinary income, not capital gains. Inventory held for sale in a business is also ordinary income. Certain collectibles like art and precious metals may be taxed at a higher rate (28%) even if held long-term.
Inherited assets receive special treatment. When you inherit an asset, your basis is "stepped up" to its value on the date of death, not the original purchase price. If you sell it shortly after inheriting it, you typically owe little or no capital gains tax.
How to calculate your capital gain or loss
Your capital gain is the sale price minus your basis. Your basis is usually what you paid for the asset, plus any costs directly tied to the purchase (such as broker fees or closing costs on real estate). If you received the asset as a gift, your basis is generally the giver's basis, not the gift value.
If you own shares acquired at different times and prices, you must specify which shares you are selling. The most common method is first-in, first-out (FIFO), which assumes you sell the oldest shares first. Other methods include average cost and specific identification. Your choice affects the size of your gain and the tax you owe, so it is worth understanding the options if you have a large or complex position.
If you sell at a loss, you have a capital loss. You can use capital losses to offset capital gains dollar-for-dollar. If your losses exceed your gains, you can deduct up to $3,000 of the excess against ordinary income (such as wages). Any remaining loss carries forward to future years.
State and local capital gains taxes
Federal capital gains tax is only part of the picture. Most states tax capital gains as ordinary income, meaning you pay your state income tax rate on the gain. A few states have no income tax at all (Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming).
Three states — California, Hawaii, and New Jersey — have enacted their own capital gains taxes separate from ordinary income tax. These explore only to long-term gains and only above a certain threshold. California taxes long-term gains over $250,000 at 13.3%. Hawaii taxes gains over $100,000 at rates up to 11%. New Jersey taxes gains over $1 million at 3.876%. These are in addition to federal tax and ordinary state income tax.
Local taxes vary by city and county. Some municipalities impose a small tax on investment income or capital gains. Check your state and local tax authority websites for the rules in your area.
Frequently Asked Questions
Do I owe capital gains tax if I have not sold the investment yet?
No. Capital gains tax applies only to gains you have realized by selling. If you own a stock that has doubled in value but you still hold it, you owe no tax on that unrealized gain. You will owe tax only when you sell and lock in the profit.
Can I avoid capital gains tax by holding an investment forever?
Yes, during your lifetime. Unrealized gains are never taxed while you own the asset. However, when you die, your heirs receive a stepped-up basis, meaning the tax is forgiven. If they sell when ready, they typically owe no capital gains tax, even though the asset may have appreciated significantly during your life.
What if I sell an investment at a loss?
Capital losses offset capital gains first. If you have $10,000 in gains and $6,000 in losses, you report a net gain of $4,000. If losses exceed gains, you can deduct up to $3,000 against other income. Any remaining loss carries forward to future years indefinitely.
How do I report capital gains on my tax return?
You report capital gains on Schedule D (Form 1040). Your broker sends you a Form 1099-B listing all sales during the year. You enter each transaction, calculate your gain or loss, and report the totals. Long-term and short-term gains are reported separately because they are taxed differently.
Do I owe capital gains tax on dividends?
Dividends are separate from capital gains. may have access to dividends (from U.S. corporations held for a set period) are taxed at long-term capital gains rates. Non-may have access to dividends are taxed as ordinary income. You report dividends on Schedule B and Form 1040, not on Schedule D.
This guide is for general information only and is not medical, financial, legal, or other professional advice. For decisions specific to your situation, consult a qualified professional. See our Editorial Policy.