Closing a Position: Tax Rules, Wash Sales, and Reporting

Closing a position means ending your exposure to an investment by making the opposite trade: selling shares you bought, or buying back shares you sold short. That single act converts a paper gain or loss into a real one, hands the IRS a taxable event, and starts a one-business-day settlement clock before the cash is fully yours. What you pay in tax depends almost entirely on how long you held the position. Short-term profits are taxed as ordinary income at rates up to 37%, while positions held longer than a year qualify for long-term capital gains rates of 0%, 15%, or 20%.

What It Actually Means to Close

Every investment starts as an open position: money at risk in the market. The closing trade is whatever transaction reverses that exposure. If you bought 100 shares, you sell 100 shares of the same security. If you shorted 100 shares (borrowed and sold them), you buy 100 back to return to the lender. Partial sales work too, and leave a smaller open position behind.

Options follow the same logic with a twist. A long option (one you bought) closes when you sell the same contract. A written option (one you sold) closes when you buy it back. Options can also close by expiring worthless or by being exercised, and each path has its own tax treatment.

Your financial result is simple arithmetic: what you received to get out, minus what you paid to get in, minus fees.

How the Gain or Loss Is Taxed

Selling triggers what the IRS calls a realization event. The rate you pay hinges on your holding period.

Held One Year or Less

Profits on positions held a year or less are short-term capital gains, taxed at your ordinary income rate. For 2026, that range runs from 10% to 37% depending on taxable income and filing status.1Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 A $5,000 short-term gain is taxed the same as $5,000 of wages.

Held More Than One Year

Cross the one-year line and the rates drop. Long-term capital gains for 2026 are taxed at 0%, 15%, or 20%.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses Single filers with taxable income up to roughly $49,450 pay 0%. The 15% rate covers a broad middle band. The 20% rate starts around $545,500 for single filers and $613,700 for married couples filing jointly. Most investors never reach the top bracket.

The Extra 3.8% for High Earners

If your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly), an additional 3.8% net investment income tax applies to capital gains.3Internal Revenue Service. Topic No. 559, Net Investment Income Tax It stacks on top of the regular rate, so a high-income seller in the 20% long-term bracket effectively pays 23.8% federally. Most states also tax capital gains, usually as ordinary income.

When You Close at a Loss

Losses have real tax value. They offset capital gains dollar for dollar. If your losses for the year exceed your gains, you can deduct up to $3,000 of the excess against ordinary income ($1,500 if married filing separately).4Office 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.

Selling deliberately to lock in a deduction is called tax-loss harvesting. It works, but only if you respect the wash sale rule.

The Wash Sale Rule

You cannot claim the loss if you buy the same or a substantially identical security within a 61-day window: 30 days before the sale through 30 days after.5Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities Note that the window extends backward too. Buying shares 15 days before selling other shares of the same stock at a loss already triggers the rule.

A disallowed loss isn’t lost forever. It gets added to the cost basis of the replacement shares, so the loss surfaces later when you sell those. The rule reaches stocks, bonds, options on the same security, and mutual funds or ETFs tracking the same index. “Substantially identical” is broader than an exact ticker match.

You Can Be Taxed Without Actually Selling

Section 1259 of the tax code treats certain hedges as if you had sold the underlying asset, forcing you to recognize gain even though you still own it.6Office of the Law Revision Counsel. 26 USC 1259 – Constructive Sales Treatment for Appreciated Financial Positions The common triggers are a short sale against an appreciated long position (a “short against the box”), a forward contract to deliver the same property, and certain swaps that eliminate your economic risk. The reasoning: if you’ve stripped out all exposure to price changes, you’ve functionally sold. A narrow exception exists for hedges unwound shortly after year-end, but investors trip over these rules more often than they expect, particularly with layered options strategies.

Which Shares Are You Selling?

If you bought the same security at different prices over time, closing part of the position raises a real question: which lot are you selling? The answer changes the tax bill. Your broker will apply a default method unless you tell it otherwise.

  • First-in, first-out (FIFO) sells the oldest shares first. It’s the standard default and usually pulls from lots most likely to qualify for long-term rates.
  • Specific identification lets you name the exact lot at the time of the trade. You get written confirmation from the broker and full control over the gain or loss you recognize.
  • Average cost, available for mutual fund shares, uses the average purchase price across all your shares.

Specific identification gives you the most flexibility. If you own shares bought at $50 and shares bought at $90 and the stock is at $80, selling the $90 lot generates a deductible loss while selling the $50 lot generates a taxable gain. Picking the lot at trade time takes a minute and can be worth real money.7Internal Revenue Service. Publication 550 – Investment Income and Expenses

Placing the Trade

The mechanics are straightforward. Open your holdings, select the position, and choose sell or close. On the trade ticket you’ll enter the quantity, pick an order type, and, if you’re using specific identification, choose the lot.

Order type matters more than most sellers appreciate:

  • A market order fills immediately at the best available price. Fast, but the fill price is unpredictable in volatile or thinly traded names.
  • A limit order fills only at your specified price or better. You get price certainty and accept the risk that the order never fills.
  • A stop-loss order converts to a market order once the price drops to your trigger. Useful as a safety net, but the actual fill can be well below the stop in a fast market.

You’ll see a confirmation screen with estimated proceeds before you submit. Market orders during trading hours fill right away; other order types sit open until conditions are met or the order expires. Most major brokerages no longer charge stock and ETF commissions, but the SEC collects a small transaction fee on sales, currently $20.60 per million dollars of proceeds as of April 2026 — roughly two cents on a $10,000 sale.8U.S. Securities and Exchange Commission. Section 31 Transaction Fee Rate Advisory for Fiscal Year 2026 Options and mutual fund trades may still carry commissions.

Settlement and Access to the Cash

Execution and settlement are separate events. Execution is when your order fills. Settlement is when cash and ownership actually change hands through the clearinghouse. Most securities settle on T+1, one business day after the trade.9eCFR. 17 CFR 240.15c6-1 – Settlement Cycle Sell Monday, settle Tuesday.

Until settlement, the proceeds show as unsettled cash. In a margin account you can generally use unsettled funds to buy other securities. In a cash account, spending unsettled proceeds and then selling the new purchase before the original sale settles is a free-riding violation. The consequence is a 90-day account restriction that forces you to fully pay for purchases on the trade date.10Investor.gov. Freeriding

Reporting the Sale at Tax Time

Your brokerage reports every closed position to you and to the IRS on Form 1099-B, which typically arrives by mid-February.11Internal Revenue Service. Instructions for Form 1099-B It shows proceeds, cost basis (when reported), and whether the gain or loss is short-term or long-term.

You transfer those transactions to Form 8949, listing each one individually.12Internal Revenue Service. Instructions for Form 8949 The totals flow to Schedule D, which calculates your capital gain or loss for the year. When the 1099-B shows basis already reported to the IRS and no adjustments are needed, some transactions can go straight to Schedule D.

Watch out for wash sale adjustments. Brokerages track wash sales within a single account, but they don’t track sales that wash across your other accounts or between spouses. Catching those and adjusting Form 8949 is on you. Keep your trade confirmations with your 1099-B, particularly if you used specific identification or need to reconcile wash sales yourself.