Can You Write Off Stock Investments on Your Taxes?

Yes, you can write off stock investments on your taxes when you sell shares for less than you paid. That loss first cancels out capital gains from other investments, and if losses still remain, you can deduct up to $3,000 against ordinary income each year, or $1,500 if you’re married filing separately.1Office of the Law Revision Counsel. 26 USC 1211 Limitation on Capital Losses Anything above that ceiling carries forward to later years with no expiration.2Office of the Law Revision Counsel. 26 USC 1212 Capital Loss Carrybacks and Carryovers The write-off only exists once you actually sell (or the stock becomes worthless). A paper loss on a share you still hold does nothing for your return.

How the Deduction Is Calculated

At year-end, you net every capital gain against every capital loss. Gains win the year, you pay tax on the difference. Losses win, and up to $3,000 of the excess offsets wages, salary, and other ordinary income.3Internal Revenue Service. Topic No. 409, Capital Gains and Losses The $3,000 figure is fixed by statute and does not adjust for inflation.

Netting happens by holding period first. Stock held one year or less produces a short-term gain or loss; held longer than a year, it’s long-term.4Office of the Law Revision Counsel. 26 USC 1222 Other Terms Relating to Capital Gains and Losses Short-term items offset each other, long-term items offset each other, and only then do the two categories meet. The sequencing matters because short-term gains are taxed at ordinary rates (10% to 37%), while long-term gains get the preferential 0%, 15%, or 20% rates. A loss aimed at the higher-taxed bucket saves you more.

Carrying Losses Forward

When your net loss exceeds what you can deduct this year, the leftover rolls into next year and keeps its character. Short-term stays short-term, long-term stays long-term.2Office of the Law Revision Counsel. 26 USC 1212 Capital Loss Carrybacks and Carryovers Next year, the carryover joins that year’s gains and losses and goes through the same netting. There’s no time limit, so a large loss can shelter income for many years.

To compute the carryover, use the Capital Loss Carryover Worksheet in the Schedule D instructions.5Internal Revenue Service. 2025 Instructions for Schedule D (Form 1040) Capital Gains and Losses Hold onto every year’s Schedule D and Form 1040 while a carryover is still alive; the worksheet needs the prior year’s numbers.

The Wash Sale Rule

The biggest way to lose the deduction is to buy the same stock back too soon. If you purchase the same or a substantially identical security within 30 days before or 30 days after the loss sale, the wash sale rule disallows the loss.6Office of the Law Revision Counsel. 26 USC 1091 Loss From Wash Sales of Stock or Securities That’s a 61-day window in total.

The disallowed loss isn’t erased. It gets added to the cost basis of the replacement shares, so when you eventually sell those in a clean transaction, the deferred loss shows up as a smaller gain or a larger loss.6Office of the Law Revision Counsel. 26 USC 1091 Loss From Wash Sales of Stock or Securities

The rule reaches across your accounts. A loss sale in your brokerage combined with a purchase of the same stock in your IRA triggers the rule, and so does a purchase by your spouse in any of their accounts. Most brokers only flag wash sales inside a single account, so cross-account and cross-spouse tracking falls on you.

Cryptocurrency is a separate matter. Because the IRS classifies crypto as property, not a security, the wash sale rule generally doesn’t reach it.6Office of the Law Revision Counsel. 26 USC 1091 Loss From Wash Sales of Stock or Securities Proposals to extend the rule to digital assets have surfaced, so check current law before relying on this gap.

Figuring Your Cost Basis

Your loss is measured from cost basis, which starts with what you paid for the shares plus commissions and transaction fees.7Office of the Law Revision Counsel. 26 USC 1012 Basis of Property Cost A few events adjust basis after the fact:

  • A stock split spreads your original total cost across more shares, dropping the per-share basis while leaving the total unchanged.
  • Reinvested dividends buy additional shares with money you’ve already been taxed on, so each reinvestment adds to your total basis.8eCFR. 26 CFR 1.1012-1 Basis of Property
  • Return-of-capital distributions reduce basis instead of being taxed as income, which increases any future gain or shrinks any future loss.

Picking Which Shares to Sell

If you bought the same stock in several lots at different prices, the shares you designate for sale change the size of the loss. The default is first-in, first-out: your oldest shares go first. The alternative is specific identification, where you tell your broker before settlement exactly which lots to sell. Specific identification lets you target high-basis shares to build a bigger loss.

Worthless Stock

If a company collapses and shareholders get nothing, you don’t need a sale on an exchange to claim the loss. Federal law treats a worthless security as sold on the last day of the tax year it became worthless.9Office of the Law Revision Counsel. 26 USC 165 Losses The loss equals your full basis, and the holding period runs through December 31 of that year.

You can also abandon a security by permanently giving up all rights in it and getting nothing back.10Internal Revenue Service. Losses (Homes, Stocks, Other Property) A steep price drop isn’t enough; the stock has to be genuinely worthless. Report it on Form 8949 like any other sale, with December 31 as the sale date and zero as the proceeds.

Inherited and Gifted Shares

Inherited stock resets to fair market value on the date of the original owner’s death, not what they paid.11Office of the Law Revision Counsel. 26 USC 1014 Basis of Property Acquired From a Decedent Any loss you claim runs from that stepped-up figure.

Gifted stock uses a dual basis. If you sell above the donor’s original basis, use the donor’s basis to figure the gain. If you sell below the fair market value on the date of the gift, use that lower fair market value as your basis for the loss.12Office of the Law Revision Counsel. 26 USC 1015 Basis of Property Acquired by Gifts and Transfers in Trust Sell somewhere between the two, and there’s no gain and no loss.

Section 1244 Small Business Stock

Most stock losses are capital losses bound by the $3,000 annual limit. Stock that qualifies under Section 1244 is different: the loss is ordinary, offsetting regular income dollar-for-dollar, up to $50,000 a year, or $100,000 for a joint return.13Office of the Law Revision Counsel. 26 USC 1244 Losses on Small Business Stock To qualify:

  • The issuer had to be a small business corporation, meaning it received no more than $1,000,000 total for all its stock at issuance.
  • You had to receive the stock for money or property, not for services or in exchange for other securities.
  • For the five tax years before the loss, more than half the corporation’s gross receipts had to come from active business, not from rents, royalties, dividends, or interest.13Office of the Law Revision Counsel. 26 USC 1244 Losses on Small Business Stock

A loss above the annual Section 1244 cap becomes a regular capital loss and follows the usual netting.

Losses Inside Retirement Accounts

Losses that happen inside a 401(k), traditional IRA, or Roth IRA aren’t deductible.14Internal Revenue Service. What If My 401(k) Drops in Value These accounts already get tax-deferred or tax-free treatment, and the trade-off is that internal losses can’t offset gains or income on your return. A narrow pre-2018 exception let some taxpayers deduct a shortfall on a complete IRA liquidation as a miscellaneous itemized deduction, but the Tax Cuts and Jobs Act suspended those deductions through 2025.15Internal Revenue Service. Publication 529, Miscellaneous Deductions

Reporting the Loss on Your Return

Start With Form 1099-B

Your broker sends Form 1099-B after year-end, listing each sale with proceeds, purchase date, sale date, and, for covered securities, the cost basis reported to the IRS.16Internal Revenue Service. Instructions for Form 1099-B (2026) Older shares acquired before broker basis-reporting rules took effect are noncovered, and the broker may leave basis blank. Reporting the correct number is still your responsibility.

Form 8949

Each sale gets its own line on Form 8949, with description, acquisition date, sale date, proceeds, and basis.17Internal Revenue Service. Instructions for Form 8949 (2025) An adjustment column lets you enter wash sale disallowances as a positive number with code “W.” Short-term sales go in Part I, long-term in Part II, and checkboxes indicate whether basis was reported to the IRS.

Schedule D

Form 8949 totals feed Schedule D on your Form 1040, which combines short-term and long-term results into one net figure.18Internal Revenue Service. About Form 8949, Sales and Other Dispositions of Capital Assets If the net is a loss, Schedule D applies the $3,000 or $1,500 annual limit and computes the carryover. Both forms attach to your return. Tax software moves the numbers automatically; if you file by hand, verify the totals line up. Keep the forms, your 1099-Bs, and each year’s Carryover Worksheet for at least three years in case of audit.5Internal Revenue Service. 2025 Instructions for Schedule D (Form 1040) Capital Gains and Losses