You pay capital gains tax in the year you sell the asset, not when you buy it or hold it

The tax is triggered by the sale itself — the moment you convert an investment into cash or trade it for something else. If you buy a stock in January and sell it in December of the same year, you owe tax on that gain in that tax year. If you buy it in December and sell it the next year, the tax is due the following year. The holding period determines whether the gain is short-term (taxed as ordinary income) or long-term (taxed at a lower rate), but the payment year is always the year of the sale.

You do not pay tax on unrealized gains — the profit that exists on paper while you still own the asset. You also do not pay tax on inherited assets at their stepped-up value, even if they have appreciated significantly. Tax is owed only when you actually sell or dispose of the asset.

Key Takeaways

  • Capital gains tax is due in the tax year when you sell the asset, regardless of how long you held it before the sale.
  • Short-term gains (assets held one year or less) are taxed as ordinary income; long-term gains (held over one year) receive preferential rates, but both are reported in the year of sale.
  • You report the sale on your tax return (Form 1040 Schedule D) and pay the tax by the standard April 15 deadline, or October 15 if you file an extension.
  • If you sell an asset at a loss, you can use that loss to offset other gains in the same year and carry unused losses forward to future years.
  • Brokers and investment platforms send you a Form 1099-B documenting all sales; you must report every transaction, even small ones.

How the tax year works for sales and trades

The tax year runs January 1 through December 31. Any asset you sell during that period — whether on January 2 or December 30 — generates a taxable event in that same year. The date you receive the proceeds does not matter; the date the sale settles does not matter; what matters is the date the transaction is executed.

If you sell a mutual fund on December 28 but the settlement does not occur until January 5 of the next year, the gain is still reported in the year you sold it, not the year it settled. Your broker's records will show the execution date, which is what you use for tax purposes.

Trades between investments — selling one stock to buy another — are also taxable events. You cannot avoid tax by immediately reinvesting the proceeds. Each sale stands on its own and generates a gain or loss in the year it occurs.

Short-term versus long-term: how holding period affects the rate, not the timing

An asset held for one year or less generates a short-term capital gain, taxed at your ordinary income tax rate (10%, 12%, 22%, 24%, 32%, 35%, or 37%, depending on your income bracket). An asset held for more than one year generates a long-term capital gain, taxed at 0%, 15%, or 20%, depending on your income bracket.

The holding period is measured from the purchase date to the sale date. If you buy on June 15 and sell on June 15 of the next year, that is exactly one year, and the gain qualifies as long-term. If you sell on June 14 of the next year, it is short-term.

Both types of gain are reported in the year of the sale. The holding period determines the tax rate you pay, not whether you pay in that year or defer it to the next. You report both on Schedule D of your Form 1040 and pay the tax by April 15 (or October 15 if you file an extension).

Reporting the sale on your tax return

You report capital gains on Schedule D (Form 1040), which lists each sale separately. For each transaction, you enter the date acquired, date sold, cost basis (what you paid), sale price, and the resulting gain or loss. The form then calculates your total short-term and long-term gains and losses.

Your broker sends you a Form 1099-B (Proceeds from Broker and Barter Exchange Transactions) by January 31 of the year following the sale. This form lists every sale you made during the previous year. You use this form to fill out Schedule D. The IRS receives a copy of the 1099-B, so the transactions you report must match what your broker reported.

If you sold assets through multiple brokers, you will receive multiple 1099-Bs. You must report all of them on a single Schedule D. If you sold assets you inherited or received as a gift, those also go on Schedule D, though the cost basis rules differ.

When you actually pay the tax

You pay capital gains tax when you file your annual income tax return, due April 15 of the year following the sale. If you owe tax on a gain from a sale in 2024, you pay it by April 15, 2025. If you file an extension (Form 4868), the deadline moves to October 15, 2025, but the tax is still for the 2024 tax year.

If you expect a large capital gain and want to avoid a big bill in April, you can make estimated tax payments throughout the year. These are quarterly payments (due April 15, June 15, September 15, and January 15) that reduce what you owe when you file. You calculate estimated tax using Form 1040-ES.

If you do not pay enough in estimated taxes or withholding, you may owe a penalty for underpayment of estimated tax, even if you ultimately owe no tax overall. The penalty is small but can be avoided by paying at least 90% of your current year tax or 100% of your prior year tax (110% if your prior year income was over $150,000).

Using losses to offset gains in the same year

If you sell some assets at a gain and others at a loss in the same year, you can net them against each other. If you have $5,000 in long-term gains and $2,000 in short-term losses, you report a net long-term gain of $3,000. This reduces your taxable gain and the tax you owe in that year.

If your losses exceed your gains in a year, you can deduct up to $3,000 of the net loss against your ordinary income (wages, salary, interest, etc.). Any loss beyond $3,000 carries forward to the next year, where it can offset gains or be deducted against ordinary income again, up to $3,000 per year, indefinitely.

This strategy, called tax-loss harvesting, is common among investors who want to reduce their tax bill. You sell a losing position to realize the loss, then can immediately buy a similar (but not substantially identical) investment to maintain your market exposure. The loss is locked in for tax purposes in the year of the sale.

Special situations: inherited assets, gifts, and like-kind exchanges

If you inherit an asset, you receive a stepped-up basis — the cost basis is reset to the asset's fair market value on the date of death. If the asset appreciated $100,000 before you inherited it, you owe no tax on that $100,000 gain. You only owe tax on gains that occur after you inherit it. This is reported in the year you sell the inherited asset, not the year you inherited it.

If you receive an asset as a gift, you inherit the donor's cost basis. If someone gives you a stock they bought for $10,000 that is now worth $50,000, your cost basis is $10,000, and you owe tax on the $40,000 gain if you sell it. The gift itself is not taxable to you, but the gain is taxable when you sell.

Prior to 2018, you could defer tax on a gain by exchanging one investment property for another similar property (a like-kind exchange). This is no longer available for stocks, bonds, or other securities — only for real property (real estate). If you do a may have access to like-kind exchange of real estate, you defer the gain until you eventually sell the replacement property without doing another exchange.

Frequently Asked Questions

Do I owe capital gains tax if I sell at a loss?

No, you do not owe tax on a loss. Instead, you can use the loss to reduce other gains or to deduct up to $3,000 against ordinary income in that year. Losses beyond $3,000 carry forward to future years indefinitely.

What if I sell an asset in December but do not receive the money until January?

The tax is due in the year you sold it, not the year you received the proceeds. The execution date of the sale is what matters for tax purposes, not the settlement date or when the cash hits your account.

Can I defer capital gains tax by holding the asset longer?

No. Holding longer changes the tax rate (long-term rates are lower than short-term), but does not defer the tax. Once you sell, the tax is due in that year. You cannot avoid it by waiting to file your return or by reinvesting the proceeds.

Do I have to report small sales or trades?

Yes. Every sale and trade must be reported on Schedule D, regardless of the amount. Your broker reports all transactions to the IRS on Form 1099-B, so the IRS will know if you omit any sale.

What happens if I do not report a capital gain?

The IRS will likely catch it when they match your tax return to the 1099-B your broker filed. You will owe the tax plus interest and may face a penalty for underreporting income. The penalty is typically 20% of the underpaid tax.