You don't pay capital gains tax the moment you sell — you pay it when you file your tax return for the year the sale happened
Capital gains tax is not due on a schedule tied to the sale itself. Instead, the IRS expects payment when you file your annual tax return, which is typically April 15 of the year following the sale. If you sold stock in March 2024, you report that gain on your 2024 tax return, filed in April 2025. The tax is calculated based on your total income for that year and your filing status.
However, your broker or the person who bought the asset from you may have already withheld money on your behalf. If you sold a mutual fund or stock through a brokerage account, the firm reports the sale to the IRS on Form 1099-B. If you sold real estate, the title company or closing agent may have withheld a percentage under state law — this varies by state and depends on whether you are a resident.
The amount you owe depends on how long you held the asset. Long-term capital gains (held more than one year) are taxed at lower rates — 0%, 15%, or 20% depending on your income. Short-term capital gains (held one year or less) are taxed as ordinary income, at your regular tax bracket rate, which can be much higher.
Key Takeaways
- Capital gains tax is due when you file your tax return for the year you sold the asset, not when ready after the sale.
- Your broker or title company may withhold money at the time of sale, which counts toward what you owe but does not eliminate the tax.
- Long-term gains (held over one year) are taxed at 0%, 15%, or 20%; short-term gains are taxed at your ordinary income rate.
- If you owe more than what was withheld, you pay the difference when you file; if too much was withheld, you receive a refund.
- Installment sales and certain real estate transactions may allow you to spread the gain across multiple years, changing when tax is due.
How withholding at the time of sale works
When you sell an asset through a brokerage, the firm does not automatically withhold capital gains tax — that only happens in specific situations. If you sold a mutual fund and did not specify how to handle the proceeds, the brokerage may withhold 10% of the gain if you did not provide a tax ID or if you are subject to backup withholding. This is rare for most investors.
For real estate sales, withholding is more common. Many states require the buyer's title company or closing agent to withhold a percentage of the sale price — typically 3% to 7% — if you are a non-resident of that state. California, for example, withholds 3.333% of the sale price for non-residents. This withholding is sent to the state tax authority, not the federal IRS. You report this on your state return when you file.
Withholding is not a tax payment — it is money held in escrow that counts toward your total tax bill. If you owe $50,000 in capital gains tax and $15,000 was withheld, you owe $35,000 when you file. If only $5,000 was withheld, you owe $45,000.
Short-term versus long-term gains and tax rates
The holding period determines your tax rate. If you bought a stock on June 1, 2023, and sold it on June 2, 2024, you held it for just over one year — that is a long-term gain. If you sold it on May 31, 2024, you held it for less than one year — that is a short-term gain. The difference in tax rate can be substantial.
Short-term capital gains are taxed as ordinary income. If you are in the 24% federal tax bracket, your short-term gains are taxed at 24%. If you are in the 12% bracket, they are taxed at 12%. This applies to gains from selling stocks, bonds, real estate, or any other asset held for one year or less.
Long-term capital gains have preferential rates: 0%, 15%, or 20% at the federal level, depending on your taxable income and filing status. For 2024, the 0% rate applies to single filers with taxable income up to $47,025 and married filing jointly filers up to $94,050. The 15% rate applies to higher incomes, and the 20% rate applies to the highest earners. These income thresholds change each year.
State taxes also explore in most states. Some states tax capital gains as ordinary income; others have separate capital gains tax rates. California taxes long-term and short-term gains the same as ordinary income. Washington State has a 7% capital gains tax on long-term gains above $250,000. New Hampshire and Tennessee tax only dividend and interest income, not capital gains.
Installment sales and spreading gains across years
In some cases, you can report capital gains over multiple years instead of all in the year of sale. An installment sale is when the buyer pays you in two or more payments over time rather than all at once. If you sold rental property for $500,000 and the buyer pays you $100,000 per year for five years, you can report the gain proportionally across those five years.
To use installment sale treatment, you must receive at least one payment in a tax year after the year of sale. If you receive all payments in the same year, it is not an installment sale. You report installment sales on Form 6252, and the gain is calculated based on the gross profit percentage of the sale price.
This method does not eliminate the tax — it spreads it out. If your total gain is $100,000 and you receive payments over five years, you report $20,000 of gain each year. This can be useful if spreading the gain across years keeps you in a lower tax bracket or helps you stay below income thresholds for other tax benefits.
Real estate professionals and those selling business assets sometimes use installment sales. Stocks and bonds sold through a broker cannot use installment sale treatment — the entire gain is reported in the year of sale.
What happens if you don't have the money to pay
If you owe capital gains tax but do not have the cash, you still owe it when you file your return. The IRS does not give you an automatic extension to pay. However, you have options.
You can set up a payment plan with the IRS. If you owe less than $25,000, you can request a short-term extension (up to 180 days) with no setup fee. For larger amounts, you can request an installment agreement, which allows you to pay over time. The IRS charges a setup fee (currently $31 to $225 depending on the method) and interest on the unpaid balance.
You can also request an extension to file your return itself — Form 4868 gives you until October 15 to file — but this does not extend the time to pay. Taxes are still due on April 15, and interest accrues on any unpaid amount from that date.
If you sold an asset at a loss in the same year, you can use that loss to offset the gain. Capital losses can reduce capital gains dollar-for-dollar. If you had a $50,000 gain and a $20,000 loss, you report a net gain of $30,000.
Estimated tax payments if you expect a large gain
If you know you will have a large capital gain in the current year — from selling a business, real estate, or a concentrated stock position — you may need to make estimated tax payments. Estimated taxes are quarterly payments made to the IRS in advance of filing your return.
Estimated payments are required if you expect to owe $1,000 or more in federal income tax after accounting for withholding. If you have a $200,000 capital gain and no other income, and nothing was withheld, you likely owe estimated taxes.
Estimated tax payments are due on April 15, June 15, September 15, and January 15. You calculate them using Form 1040-ES. If you do not make estimated payments and owe a large amount, the IRS charges a penalty on the underpayment, even if you pay the full amount when you file.
Some people use the "safe harbor" rule: if you pay 100% of your prior year's tax liability in estimated payments (or 110% if your prior year income was over $150,000), you avoid the underpayment penalty, even if you owe more this year.
State capital gains taxes and timing
Most states that have an income tax also tax capital gains, and the timing rules are the same as federal — you report the gain in the year you sold the asset. However, a few states have separate capital gains taxes with different rules.
Washington State taxes long-term capital gains at 7% on gains above $250,000 per person per year. The tax is due when you file your state return. Illinois taxes capital gains at a flat 4.75% rate. Colorado taxes long-term gains at 4.63% and short-term gains as ordinary income.
If you sold an asset in one state but live in another, you may owe tax to both. If you lived in California when you sold the asset, you owe California tax. If you moved to Nevada (which has no income tax) after the sale, you still owe California tax on the gain because the sale occurred while you were a resident.
Frequently Asked Questions
Do I have to pay capital gains tax if I reinvest the money?
Yes. The tax is based on the gain itself, not on what you do with the proceeds. If you sold stock for $100,000 and bought it back for $100,000, you still owe tax on the gain. Reinvesting does not defer or eliminate the tax.
What if I sold an asset at a loss — do I still owe tax?
No. A loss means you sold for less than you paid, so there is no gain to tax. You can use capital losses to offset capital gains from other sales in the same year. If losses exceed gains, you can deduct up to $3,000 of the net loss against ordinary income, and carry forward unused losses to future years.
Can I defer capital gains tax by not cashing out the proceeds?
No. The tax is due based on the sale date, not when you spend or deposit the money. If you sold stock on March 15 and the money sits in your brokerage account, the gain is still reported on your 2024 tax return and tax is due April 15, 2025.
What if I inherited an asset — do I owe capital gains tax on it?
Not on the inheritance itself. Inherited assets receive a "step-up in basis," meaning the tax basis is reset to the fair market value on the date of death. If you inherit stock worth $100,000 and it was worth $60,000 when the person died, your basis is $100,000. If you sell it when ready for $100,000, there is no gain. You only owe tax on gains that occur after you inherit it.
Do I owe capital gains tax on cryptocurrency or NFTs?
Yes. The IRS treats cryptocurrency and NFTs as property, not currency. If you bought Bitcoin for $30,000 and sold it for $50,000, you have a $20,000 capital gain. The gain is long-term if you held it over one year, short-term if less. You report it on Schedule D of your tax return, the same form used for stocks and real estate.