Are stock investments tax deductible? No — buying shares is not a deductible expense. The money you put into a stock becomes your cost basis in that investment, not a write-off on your return. The tax code offers relief in two other places: when you sell stock at a loss you can deduct up to $3,000 of net capital losses against ordinary income each year (with the rest carried forward), and when you buy stocks inside a traditional 401(k) or IRA, the contribution itself can be deductible even though the purchase inside the account is not.
Why Buying Stock Is Not Deductible
The IRS treats a stock purchase as a capital expenditure, not an expense. Your cost basis equals what you paid for the shares plus any commissions or transaction fees the brokerage charged.1Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses Those costs sit inside the asset. You cannot write them off in the year you buy.
The agency has been explicit that commissions and other acquisition costs are not deductible and must instead be used to figure your gain or loss when you eventually sell.2Internal Revenue Service. Topic No 429, Traders in Securities (Information for Form 1040 or 1040-SR Filers) Pay $10,000 for stock and $50 in commissions, and your basis is $10,050. That figure determines whether you have a gain or a loss later, so tracking it accurately from the first trade is worth the effort.
When Stock Losses Become Deductible
Selling a stock for less than your basis creates a capital loss, and that loss can reduce your tax bill. Losses first offset any capital gains you realized during the same year, dollar for dollar, whether those gains are short-term or long-term.3Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses
If your losses exceed your gains, you can deduct up to $3,000 of the net loss against ordinary income such as wages, salary, or interest. Married taxpayers filing separately get a lower cap of $1,500 each.4Internal Revenue Service. Topic No 409, Capital Gains and Losses That $3,000 figure has stood since 1978 and is not indexed for inflation.
Anything above the annual cap carries forward indefinitely. Carried losses keep their character as short-term or long-term, and each year you can apply them against new gains plus another $3,000 of ordinary income.5Office of the Law Revision Counsel. 26 US Code 1212 – Capital Loss Carrybacks and Carryovers A $25,000 loss with no offsetting gains would take more than seven years to fully deduct through the annual allowance alone. Realizing gains in later years speeds things up, because the carryover offsets those gains without limit.
The Wash Sale Trap
You cannot claim a loss if you buy the same stock right back. Under the wash sale rule, your loss is disallowed if you purchase substantially identical securities within 30 days before or after the sale that produced the loss.6Office of the Law Revision Counsel. 26 US Code 1091 – Loss from Wash Sales of Stock or Securities The window runs both ways, so buying replacement shares 30 days before the sale triggers the rule just as buying them the day after does.
The rule also reaches contracts or options to buy substantially identical stock, and it can apply across accounts, including an IRA. A common trip-up: selling a loser in a taxable brokerage account while your 401(k) automatically buys shares of the same company through a routine contribution.
A disallowed loss is not gone forever. The amount is added to the cost basis of the replacement shares.7Internal Revenue Service. Case Study 1 – Wash Sales Sell at a $250 loss and repurchase identical shares for $800, and your basis in the new shares becomes $1,050. You defer the loss rather than lose it, but you have to hold the replacement shares long enough to avoid triggering another wash sale later.
Worthless Stock
If a company goes bankrupt and the shares become completely worthless, the tax code treats them as sold on the last day of the tax year in which they became worthless.8Office of the Law Revision Counsel. 26 US Code 165 – Losses That deemed sale date fixes your holding period and whether the loss is short-term or long-term.
You report the loss on Form 8949 like any other sale, using zero as the proceeds. You can also claim a loss on securities you voluntarily abandon, provided you permanently give up all rights and receive nothing in exchange.9Internal Revenue Service. Losses (Homes, Stocks, Other Property) The hard part is pinning down the exact year a security became worthless, since the IRS may disagree with your timing. Keep records showing the company’s collapse. For worthless securities the record-retention window is seven years, not the standard three.10Internal Revenue Service. How Long Should I Keep Records
Retirement Accounts: The Real Deductible Path
The most direct way to get a tax deduction connected to stock investing is through a retirement account. Contributions to a traditional 401(k) come out of your paycheck before federal income tax is withheld, lowering your taxable income for the year.11Internal Revenue Service. 401(k) Plan Overview The 2026 deferral limit is $24,500. Workers 50 or older can add an $8,000 catch-up contribution, and those between ages 60 and 63 can contribute an extra $11,250 under the enhanced catch-up created by SECURE 2.0.12Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500
Traditional IRA contributions work similarly, with a 2026 limit of $7,500 ($8,600 if you are 50 or older).12Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500 The deduction phases out at higher incomes if you or your spouse are covered by a workplace retirement plan. Single filers covered by an employer plan begin losing the deduction at $81,000 of modified adjusted gross income and lose it entirely above $91,000. For married couples filing jointly where the contributing spouse has a workplace plan, the phase-out range is $129,000 to $149,000.13Office of the Law Revision Counsel. 26 USC 219 – Retirement Savings
The stocks inside these accounts can be identical to what you would buy in a regular brokerage account, but the tax treatment is not. A taxable-account purchase creates basis with no current deduction. A traditional retirement contribution lowers your tax bill now, though you will owe income tax on withdrawals later. That tradeoff tends to favor the retirement account if you expect to be in a lower bracket in retirement.
Investment Interest on Borrowed Funds
If you borrow to buy taxable investments, the interest may be deductible. Margin interest is the most common case. The deduction is capped at your net investment income for the year, which includes dividends, interest, and short-term capital gains from your portfolio.14Office of the Law Revision Counsel. 26 US Code 163 – Interest Any excess carries forward.
You calculate the deduction on Form 4952, and the result moves to Schedule A as an itemized deduction.15Internal Revenue Service. Form 4952 Investment Interest Expense Deduction You only benefit if you itemize rather than take the standard deduction, so for most investors with modest margin balances this deduction does nothing. It tends to matter for active traders carrying large margin positions.
How to Report a Stock Loss
Your brokerage will send Form 1099-B after year-end listing every sale, with proceeds and cost basis for each transaction.16Internal Revenue Service. About Form 1099-B, Proceeds from Broker and Barter Exchange Transactions Transfer that data to Form 8949, reporting each sale individually with its acquisition date, sale date, proceeds, and cost basis. Sales go into Part I if short-term and Part II if long-term, based on how long you held each position.
Totals from Form 8949 flow to Schedule D of Form 1040, which calculates your net capital gain or loss.17Internal Revenue Service. 2025 Instructions for Schedule D (Form 1040) If you have a net loss, the deductible portion (up to $3,000) appears on your Form 1040 and reduces taxable income directly. Match your figures to the 1099-B exactly. The IRS receives its own copy and runs automated matching, so discrepancies generate notices.
Fixing a Prior Year You Missed
If you forgot to report a capital loss in an earlier year, file Form 1040-X to amend that return. You generally have three years from the original filing deadline. Attach a corrected Schedule D and Form 8949 showing the missed loss, and the IRS will recalculate your tax and issue any refund owed.18Internal Revenue Service. Instructions for Form 1040-X (Rev December 2025)
A corrected loss can ripple into every later year where the excess should have carried forward. If the missed loss was large, you may need to amend multiple years to apply the carryforward properly. Hold onto original returns and brokerage statements to support the amendment; the IRS may not have basis records for older sales, since brokerages were not always required to report basis on the 1099-B.