What Is a Capital Gains Tax and How Does It Work?

The capital gains tax is a federal tax on the profit you make when you sell something for more than you paid for it. It only applies when you actually sell the asset — watching your investments rise on paper doesn’t trigger anything. The rate depends on two things: how long you owned the asset before selling, and how much you earn overall. For long-term holdings in 2026, federal rates run from 0% to 20%, with a few special categories taxed higher.

What Assets and Sales Are Covered

Federal law treats almost everything you own as a capital asset, whether you hold it for personal use or investment.1Office of the Law Revision Counsel. 26 U.S. Code 1221 – Capital Asset Defined Stocks, bonds, mutual fund shares, real estate, vehicles, jewelry, art, furniture, and cryptocurrency all qualify. The exclusions are narrow and mainly affect business owners: inventory, depreciable business equipment, accounts receivable, and consumable supplies.

The tax is triggered by a sale or other disposition, not by appreciation. If a stock you own doubles in value and you keep holding it, you owe nothing. Sell it, and the profit becomes reportable that tax year.

How to Calculate Your Gain

Your gain is the difference between what you got for the asset and your basis in it. Basis usually starts with what you paid. Add the cost of improvements — a new roof on a rental, for example. Subtract any depreciation you claimed or insurance reimbursements you received. That gives you your adjusted basis.

Then figure your amount realized: the sale price minus direct selling costs like broker commissions, legal fees, or advertising. Sell stock for $10,000 with $200 in trading fees, and your amount realized is $9,800. Subtract your adjusted basis from that number, and you have your gain.

The math is simple. Recordkeeping is where people struggle. You need documentation of the purchase price, the acquisition date, receipts for improvements, and depreciation records. The IRS says to keep property records until the statute of limitations expires for the tax year you sell — not just three years from when you bought it.2Internal Revenue Service. How Long Should I Keep Records Without proof of basis, the IRS can assume you paid less than you did, and you’ll owe more.

Gifted and Inherited Property

When someone gives you an asset, your basis is generally the same as the donor’s.3Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust If a parent bought stock for $5,000 and gifted it to you when it was worth $20,000, your basis stays at $5,000. Sell it for $25,000 and you owe tax on the full $20,000 gain.

Inherited property is treated much more favorably. The basis resets to the asset’s fair market value on the date the previous owner died.4Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent If a grandmother bought a house for $50,000 in 1980 and it was worth $400,000 when she died, your basis is $400,000. Sell it for $420,000, and only $20,000 is taxable. Inherited assets are automatically treated as long-term holdings regardless of how long the deceased actually owned them.

Short-Term vs. Long-Term

Holding period is what makes the difference between paying regular income rates and paying the lower capital gains rates. Assets you owned for one year or less produce short-term gains, taxed at ordinary income rates. Assets held for more than one year produce long-term gains, which qualify for preferential rates.5Office of the Law Revision Counsel. 26 USC 1222 – Other Terms Relating to Capital Gains and Losses

The clock starts the day after you acquire the asset and runs through the day you sell. A single day matters. Buy stock on March 1, 2025, and you need to wait until at least March 2, 2026, before selling to get long-term treatment. Waiting an extra week to cross the one-year line can save thousands.

2026 Federal Rates

Short-Term Gains

Short-term gains get no discount. They’re added to your other income and taxed at the regular federal brackets, which run from 10% to 37% in 2026.6Internal Revenue Service. Federal Income Tax Rates and Brackets A single filer earning $80,000 who nets $5,000 on a quick stock trade pays the 22% rate on that gain, the same as on wages.

Long-Term Gains

Long-term gains are taxed at 0%, 15%, or 20%, depending on your taxable income. The 2026 IRS thresholds are:7Internal Revenue Service. Rev. Proc. 2025-32

  • 0% rate: taxable income up to $49,450 for single filers, $98,900 for married filing jointly, or $66,200 for heads of household.
  • 15% rate: income from $49,451 to $545,500 single, $98,901 to $613,700 joint, or $66,201 to $579,600 head of household.
  • 20% rate: income above those upper thresholds.

The 0% bracket is worth planning around. In a low-income year — a sabbatical, an early retirement, a stretch living on savings — you can sell appreciated investments and owe nothing in federal capital gains tax, as long as your total taxable income stays under the threshold.

Collectibles and Depreciated Real Estate

Some assets don’t get the standard 0/15/20 treatment. Collectibles such as art, coins, antiques, and precious metals are taxed at a maximum long-term rate of 28%, even if your income would otherwise place you in the 15% bracket.8Internal Revenue Service. Topic No. 409, Capital Gains and Losses Gains from depreciated real estate can be taxed at a maximum 25% rate to the extent of any depreciation you previously claimed.

Net Investment Income Tax

Higher earners face an extra 3.8% tax on net investment income, including capital gains, when modified adjusted gross income exceeds $200,000 single, $250,000 married filing jointly, or $125,000 married filing separately.9Internal Revenue Service. Topic No. 559, Net Investment Income Tax These thresholds aren’t indexed for inflation, so more people cross them each year. At the top end, a single filer selling collectibles could face a combined 31.8% federal rate.

How Losses Work

Not every sale is a winner. When you sell for less than your basis, you have a capital loss, and losses offset gains dollar for dollar. Short-term losses offset short-term gains first, and long-term losses offset long-term gains first, before any cross-netting.

If losses exceed gains for the year, you can deduct up to $3,000 of the excess against ordinary income, or $1,500 if married filing separately.10Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses Anything left over carries forward to future years indefinitely. You keep applying $3,000 a year against ordinary income and offsetting future gains until the loss is used up. You track the carryover yourself using the Capital Loss Carryover Worksheet in the Schedule D instructions.

Selling Your Home

A home sale is technically a capital gains event, but most homeowners owe nothing. You can exclude up to $250,000 in profit from the sale of your primary residence, or $500,000 if you’re married filing jointly, provided you owned and lived in the home for at least two of the five years before the sale.11Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence The two years don’t have to be consecutive.

For the $500,000 joint exclusion, either spouse must meet the ownership test, both must meet the use test, and neither can have used the exclusion in the prior two years. If you sell early because of a job move, a health issue, or certain unforeseen circumstances, a partial exclusion may still apply.

Anything above the exclusion is taxed at long-term rates. A couple who bought at $200,000 and sold at $850,000 has a $650,000 gain, with $150,000 exceeding the $500,000 exclusion.

The Wash Sale Rule

You can’t sell an investment at a loss and immediately buy it back to keep the deduction. The wash sale rule disallows the loss if you purchase a substantially identical security within 30 days before or after the sale, a 61-day window overall.12Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The disallowed loss isn’t lost forever; it’s added to the basis of the replacement shares. But you lose the immediate deduction. The rule applies to stocks, bonds, and mutual funds, and currently does not apply to cryptocurrency.

Estimated Payments and Reporting

If you realize a large gain and nothing is withheld from the proceeds, you may need to make estimated tax payments during the year rather than waiting until April.13Internal Revenue Service. Pay As You Go, So You Won’t Owe: A Guide to Withholding, Estimated Taxes, and Ways to Avoid the Estimated Tax Penalty Estimated payments are due April 15, June 15, September 15, and January 15 of the following year. Pay less than 90% of what you owe across the year and you’ll face an underpayment penalty on top of the tax.

After year-end, brokerages send Form 1099-B reporting proceeds and, for most securities, cost basis.14Internal Revenue Service. Instructions for Form 1099-B Check the reported basis carefully; it may not reflect adjustments you’ve made, especially on older shares or gifted assets.

You report each transaction on Form 8949, listing the asset, acquisition and sale dates, proceeds, and adjusted basis.15Internal Revenue Service. About Form 8949, Sales and Other Dispositions of Capital Assets Totals flow onto Schedule D of your Form 1040, where short-term and long-term results combine into a net figure. Both forms attach to your return.

The filing deadline is April 15, 2026, for the 2025 tax year, and you can request an automatic six-month filing extension.16Internal Revenue Service. When to File An extension gives you more time to file, not more time to pay. Tax owed is still due April 15, and unpaid amounts accrue 0.5% per month up to 25%, plus interest.17Internal Revenue Service. Failure to Pay Penalty

State Taxes Add Another Layer

Federal isn’t the whole bill. Most states tax capital gains as ordinary income, which can add a meaningful percentage on top of the federal rate. A handful of states have no income tax; others impose rates above 10%. Rules for calculating gains, allowing deductions, and honoring exclusions vary, so before selling a major asset it’s worth checking with your state tax authority or a local tax professional.