A change in market value is the difference between what you paid for an asset and what it is worth today, measured two ways: the dollar difference (current price minus your cost) and the percentage difference (that dollar figure divided by your cost). A share bought at $50 and now trading at $75 shows a $25 absolute gain and a 50% gain. Those numbers describe your position on paper. The tax consequences only arrive when you sell, and the size of the bill depends on your cost basis, how long you held the asset, and your income.
Getting the Starting Number Right
Every gain or loss calculation rests on your cost basis, and cost basis is rarely just the sticker price. For stocks and bonds, it includes the purchase price plus commissions and transfer fees. For real estate, it includes closing costs, title insurance, and transfer taxes.1Internal Revenue Service. Topic No. 703, Basis of Assets
Basis also shifts over time. The IRS calls the updated figure your adjusted basis. Improvements that add value push it up. Depreciation you claimed on a rental or business asset pulls it down.1Internal Revenue Service. Topic No. 703, Basis of Assets A rental bought for $300,000, improved with a $40,000 roof, and depreciated by $50,000 has an adjusted basis of $290,000. That is the number you compare against the sale price. Get it wrong and every downstream number is wrong too.
Inherited Assets Reset; Gifted Assets Do Not
If you inherit an asset, your basis is not what the deceased paid. It resets to the fair market value on the date of death.2Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent A parent’s $80,000 house worth $450,000 at death gives you a $450,000 basis, and the appreciation during their lifetime is never taxed.
Gifts work the other way. If someone hands you an asset while they are alive, you take their original basis. Stock your uncle bought for $10,000 and gave you when it was worth $50,000 still has a $10,000 basis in your hands. You also inherit his holding period.3Office of the Law Revision Counsel. 26 USC 1223 – Holding Period of Property The same asset can produce a very different tax bill depending on which path it took to reach you.
Paper Gains vs. Realized Gains
A change in market value lives in one of two states. An unrealized change is a paper figure. Your account shows you are up $20,000, but nothing has been sold, no cash has moved, and no tax is due. The number can also disappear if the market reverses.
The change becomes realized the moment you sell, exchange, or otherwise dispose of the asset.4Office of the Law Revision Counsel. 26 USC 1001 – Determination of Amount of and Recognition of Gain or Loss At that point the gain or loss is locked in and reportable. The advantage of waiting is control: you choose the tax year, which lets you time sales around lower-income years or pair gains against losses elsewhere in your portfolio.
Not every realization is voluntary. If property is destroyed in a disaster, stolen, or taken through eminent domain, the IRS treats the insurance payout or condemnation award as a realization event. Reinvesting the proceeds in similar property can defer the gain by carrying the old basis over to the replacement.5Internal Revenue Service. Involuntary Conversions: Real Estate Tax Tips
How Realized Gains Are Taxed
Once a gain is realized, the rate turns on how long you held the asset.
Short-Term vs. Long-Term
Assets held one year or less produce short-term gains, taxed at your ordinary income rate.6Office of the Law Revision Counsel. 26 USC 1222 – Definitions For 2026, that rate reaches 37% for single filers earning above $640,600.7Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026
Assets held more than one year qualify for long-term capital gains treatment at preferential rates of 0%, 15%, or 20% depending on taxable income.8Office of the Law Revision Counsel. 26 USC 1(h) – Maximum Capital Gains Rate For 2026 single filers, 0% applies below roughly $49,450 of taxable income, 15% up to about $545,500, and 20% above that. Joint filer thresholds are higher. Selling a day before the one-year mark can nearly double the tax on the same gain.
The 3.8% Investment Surtax
High earners owe an additional 3.8% net investment income tax on capital gains and other investment income once modified adjusted gross income passes $200,000 single or $250,000 joint.9Internal Revenue Service. Net Investment Income Tax Those thresholds are not indexed for inflation, so more filers cross them each year. Stack the surtax on the 20% rate and the top federal rate on long-term gains reaches 23.8%.
When You Lose Money
Realized losses offset realized gains dollar for dollar. If losses exceed gains, you can deduct up to $3,000 of the excess against ordinary income ($1,500 if married filing separately).10Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses Anything left over carries forward indefinitely, keeping its short-term or long-term character.11Office of the Law Revision Counsel. 26 USC 1212 – Capital Loss Carrybacks and Carryovers A large loss from a bad year can shelter gains for many years afterward.
Selling Your Home
The biggest change in market value most people ever see is the appreciation on their home, and much of it is often shielded. If you owned and lived in the home for at least two of the five years before the sale, you can exclude up to $250,000 of gain from your income, or $500,000 for married couples filing jointly.12Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence For the joint exclusion, only one spouse needs to meet the ownership test, but both must meet the two-year residence test.13Internal Revenue Service. Publication 523, Selling Your Home
The two years don’t have to be consecutive; any 24 months of use inside the five-year window counts. The exclusion is reusable, provided you haven’t claimed it on another sale in the prior two years. Gain above the cap is taxable at capital gains rates.
The Wash Sale Trap
Selling a losing position to bank the deduction and then buying it right back is a reflex the IRS blocked long ago. The wash sale rule disallows the loss if you buy a substantially identical security within 30 days before or after the sale.14Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities That’s a 61-day window around the sale date.
The disallowed loss isn’t gone forever in most cases. It attaches to the basis of the replacement shares, so you recover it when you eventually sell those.15Internal Revenue Service. Publication 550, Investment Income and Expenses The rule reaches across your accounts, so buying the replacement in your IRA still triggers it, and in that case the loss can be permanently lost because it has nowhere useful to attach. Tax-loss harvesting still works if you avoid substantially identical securities during the window; switching to a fund tracking a different index is the common workaround.
Reporting the Sale
Realized gains and losses go on Schedule D of your Form 1040, and most sales are itemized first on Form 8949.16Internal Revenue Service. Instructions for Form 8949 You can skip Form 8949 and enter totals directly on Schedule D when your broker already reported the cost basis to the IRS and no adjustments are needed.17Internal Revenue Service. Form 8949 – Sales and Other Dispositions of Capital Assets
Form 8949 is required when the basis wasn’t reported to the IRS, when a wash sale is involved (code “W” in column f), and any time you need to correct the basis your broker reported. The IRS receives the same 1099-B your broker sent you, and mismatches get flagged automatically, so it pays to reconcile the numbers before filing.