If you sold a stock for less than you paid, you do not pay taxes on stocks if you lose money on the sale. The IRS taxes net profits, not losses. Better still, a realized stock loss works in your favor at tax time: it cancels out capital gains you took during the year, and if your losses exceed your gains, you can deduct up to $3,000 of the remainder against ordinary income like wages or interest.1Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses Anything beyond that carries forward to future years with no expiration.
The Loss Only Counts Once You Sell
A stock trading below what you paid is an unrealized loss while you still hold it. It has no tax consequence at all. The IRS pays attention only when you actually sell and the proceeds come in below your cost basis. At that point the loss becomes realized and reportable.
This trips up investors who hold losing positions for years assuming the loss will eventually “count” somehow. It won’t, not until the sale happens. The reverse is also true: deliberately selling a losing position to lock in the tax benefit is a legitimate strategy, often called tax-loss harvesting, and many investors review their portfolios near year-end specifically to find those opportunities.
Losses Offset Your Capital Gains First
The most immediate benefit of a realized loss is wiping out capital gains you took the same year. The IRS requires you to net short-term losses against short-term gains first, and long-term losses against long-term gains first. If one category still shows a net loss after that internal netting, the leftover offsets net gains in the other category.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses
Short-term versus long-term comes down to how long you held the stock. One year or less is short-term; more than one year is long-term.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses The distinction matters because short-term gains are taxed at ordinary income rates, which top out at 37 percent for 2026.3Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 Long-term gains get preferential rates of 0, 15, or 20 percent depending on your income. A short-term loss canceling a short-term gain saves more per dollar than a long-term loss canceling a long-term gain, simply because the underlying tax rate is higher.
The math is straightforward. If you sold one stock for a $30,000 gain and another for a $25,000 loss in the same year, you only owe tax on the net $5,000 gain.
Picking Which Shares to Sell
If you bought the same stock at different times and prices, the specific identification method lets you choose which lots to sell. Selling the lot with the highest cost basis maximizes your realized loss. You generally need to identify the specific shares before the trade settles, and your broker must confirm the selection. If you don’t specify, most brokers default to first-in, first-out, which may not give you the best tax outcome.
Deducting Up to $3,000 Against Ordinary Income
When your total capital losses for the year exceed your total capital gains, you have a net capital loss. The IRS lets you deduct up to $3,000 of that net loss from ordinary income like wages, salaries, or interest. If you file as married filing separately, the limit drops to $1,500 per spouse.1Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses This deduction comes directly off your taxable income, reducing your tax bill at your marginal rate.
Concretely: if you had no capital gains and realized a $10,000 capital loss, you’d deduct $3,000 against ordinary income this year and carry the remaining $7,000 forward. At a 24 percent marginal tax rate, that $3,000 deduction saves you $720 on this year’s return.
Carrying the Rest Forward
Any net capital loss above the $3,000 annual deduction carries forward to future tax years. There is no expiration date.4Office of the Law Revision Counsel. 26 USC 1212 – Capital Loss Carrybacks and Carryovers If you lost $50,000 in a market downturn and had no gains to offset, you’d deduct $3,000 per year and carry the balance forward until it’s fully used, whether that takes two years or sixteen. When you do realize gains in a future year, your carried-over losses offset those gains before the $3,000 ordinary income deduction applies again.
Carried-over losses keep their character. A short-term loss that carries forward stays short-term, and a long-term loss stays long-term.4Office of the Law Revision Counsel. 26 USC 1212 – Capital Loss Carrybacks and Carryovers That matters because a short-term carryover offsetting a future short-term gain saves more in taxes than a long-term carryover offsetting a long-term gain.
The Wash Sale Rule Can Cancel Your Deduction
The wash sale rule closes an obvious loophole: selling a stock to claim the loss, then buying it right back. If you sell a stock at a loss and acquire substantially identical stock or securities within 30 days before or after the sale, the loss is disallowed.5Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities That’s a 61-day window you need to keep clear: 30 days before the sale, the sale date, and 30 days after.
The disallowed loss doesn’t vanish permanently. It gets added to the cost basis of the replacement shares, deferring the tax benefit until you sell those new shares.6Internal Revenue Service. Case Study 1 – Wash Sales If you sold 100 shares at a $250 loss and bought the same stock back for $800 within the window, you couldn’t deduct the $250 now. Your basis in the new shares would be $1,050, so you’d benefit from that loss when you later sold the replacement shares.
What “Substantially Identical” Means
The statute uses the phrase “substantially identical” without defining it precisely. Buying back the exact same stock clearly triggers the rule. A call option or a contract to acquire the same stock also counts, because the statute explicitly includes contracts and options.5Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The IRS has also taken the position that convertible preferred stock trading in lockstep with the underlying common stock can be substantially identical, and the same goes for warrants whose prices closely track the stock.
Generally safer moves: selling one company’s stock and buying a different company in the same industry, or selling an individual stock and buying a broad index fund. Riskier: selling an S&P 500 index fund at a loss and buying a nearly identical S&P 500 fund from a different provider, since the holdings are almost the same.
Losses Inside an IRA or 401(k) Don’t Count
If your losses happened inside a traditional IRA, Roth IRA, or 401(k), none of the rules above apply. Tax-advantaged retirement accounts are walled off from capital gains and losses. Individual trades within these accounts don’t generate reportable gains or deductible losses. A stock that drops 80 percent inside your IRA produces no capital loss you can use on your tax return. Withdrawals from traditional IRAs and 401(k)s are taxed as ordinary income regardless of how the underlying investments performed. Qualified Roth distributions come out tax-free, again without regard to individual investment performance inside the account.
There used to be a limited way to deduct losses in a Roth IRA if you closed all Roth accounts and withdrew less than your total contributions. The Tax Cuts and Jobs Act eliminated that deduction for tax years after 2017, so it’s no longer available.
How to Report Your Losses
Your brokerage will send you Form 1099-B early in the year, reporting the proceeds from each sale and, for covered securities, your cost basis.7Internal Revenue Service. About Form 1099-B, Proceeds From Broker and Barter Exchange Transactions You then report each transaction on Form 8949, which separates sales into short-term and long-term categories and further splits them by whether the cost basis was reported to the IRS.8Internal Revenue Service. 2025 Instructions for Form 8949 The totals from Form 8949 flow onto Schedule D of your Form 1040, where you calculate your net gain or loss for the year.9Internal Revenue Service. 2025 Instructions for Schedule D (Form 1040)
For covered securities, generally stocks purchased after 2011, your broker reports the cost basis to both you and the IRS, so the numbers should match. For noncovered securities purchased before that date, the broker may provide cost basis for your reference, but only you are responsible for reporting it accurately. If you’ve held stocks for decades, dig up your original purchase records rather than guessing. An incorrect basis can either overstate your loss, which triggers IRS scrutiny, or understate it, which costs you money.
Wash sales also show up on Form 8949. If your broker flags one on your 1099-B, the disallowed loss appears as an adjustment code, and you report the adjusted basis of the replacement shares accordingly. Even if your broker doesn’t catch it, you’re still responsible for identifying and reporting wash sales yourself.