
Trading Taxes, Explained
You owe tax when you sell, not when you are up
The single idea everything else is built on.
A gain on the screen is unrealized. It is not income and it is not taxed. The moment you sell, that gain becomes realized, and a realized gain is a taxable event for that year. A position you have held for six years and never sold has produced no tax bill at all.
This is why December matters to active traders: the tax year closes on your realized results, not your account balance. Two traders can end the year with identical portfolios and very different tax bills depending on what they sold along the way.
You buy 100 shares at $10 ($1,000). It rises to $15 ($1,500).
Still holding on Dec 31: $500 unrealized. Nothing to report.
Sold on Dec 31: $500 realized gain. Reportable for that year.
How long you held it changes the rate
The line is one year, and it is the biggest lever most investors have.
Hold an asset for one year or less and the gain is short-term, taxed at your ordinary income rate, the same bracket as your salary. Hold it for more than one year and it is long-term, taxed at preferential rates that are meaningfully lower for most people.
The long-term structure has for many years been a small number of tiers (commonly described as 0%, 15% and 20%) that depend on your total taxable income. The thresholds for those tiers move every year, so check the current ones rather than trusting a number you read once.
The wash sale rule
The rule that surprises active traders more than any other.
If you sell a security at a loss and buy the same or a substantially identical security within 30 days before or 30 days after that sale, the loss is disallowed for that year. It is a 61-day window centred on the sale, not just the 30 days after.
The loss is not destroyed. It is added to the cost basis of the replacement shares, which defers it until you finally exit the position for good. The problem is timing: the deduction you were counting on this year moves to a later year.
Jan 5: buy 100 shares at $50 ($5,000).
Feb 1: sell all 100 at $40. A $1,000 loss.
Feb 20: you buy back in at $42 (19 days later, inside the window).
The $1,000 loss is disallowed this year. Your new basis becomes $42 + $10 = $52/share.
Trader Tax Status and the Section 475 election
The thing most active traders have never heard of, with a deadline that is easy to miss by a year.
The IRS treats most people as investors. A small number who trade with enough frequency, continuity and volume may qualify as being in the business of trading, often called Trader Tax Status. It is a facts-and-circumstances test, not a box you tick, and it is genuinely contested territory. Qualifying can allow trading expenses to be treated as business expenses.
Separately, a qualifying trader can make a Section 475(f) mark-to-market election. Under it, open positions are treated as if sold at year end, and two things change that matter enormously to an active trader:
- •Wash sales stop applying to your trading, which removes the single biggest bookkeeping headache above.
- •Losses become ordinary rather than capital, so they are not trapped behind the small annual limit on deducting net capital losses against other income (long set at $3,000, with the rest carried forward).
Tax-loss harvesting, done properly
Losses are worth something, if you realize them without tripping the wash sale rule.
Realized losses offset realized gains. Net them out, and if losses exceed gains you can deduct a limited amount against ordinary income each year (long set at $3,000), carrying the remainder forward indefinitely. A carried-forward loss does not expire, which makes a bad year genuinely useful later.
Ordering matters: short-term losses offset short-term gains first, and long-term against long-term, before the two categories are netted against each other. Since short-term gains are taxed at the higher ordinary rate, a short-term loss is generally the more valuable one to have available.
Accounts, and the Roth misconception
Where you trade changes the tax outcome more than what you trade.
In a taxable brokerage account, every realized gain is a taxable event in that year. In a traditional IRA or 401(k), contributions are generally pre-tax and you are taxed on withdrawal. In a Roth, contributions are made with money you have already paid tax on, and qualified withdrawals come out tax-free. Trades inside a retirement account do not generate a per-trade tax bill, which is why frequent trading is far simpler there.
Contribution limits, income phase-outs and the rules around conversions all change year to year and have real conditions attached. Check current figures before acting on any of it.
Quarterly estimated payments
Where a good year turns into a penalty.
Tax in the US is pay-as-you-go. An employer withholds for a salary, but nobody withholds on your trading profits. If you have a strong year and pay nothing until April, you can owe an underpayment penalty on top of the tax itself, even if you pay the full balance on time.
The system provides safe harbours: broadly, paying in a set percentage of what you owed last year, or a set percentage of what you will owe this year, protects you from the penalty. The percentages differ, and the prior-year one is higher for higher earners. The practical point is that a trader with a profitable first quarter usually needs to be making payments during the year rather than settling once at the end.
Borrowing against stock instead of selling
One legitimate strategy and one audit magnet get described the same way.
Borrowing against a portfolio (a margin loan, or a securities-backed line of credit) is legitimate and widely used. Loan proceeds are not income, so drawing on the line is not itself a taxable event, and the shares are never sold so no gain is realized. This is the mechanic behind the strategy often described as "buy, borrow, die".
The costs are real and are not tax questions: you pay interest, the loan is secured by a volatile asset, and a sharp drawdown can trigger a margin call that forces liquidation at the worst possible price, which realizes exactly the gain you were deferring. Interest may be deductible as investment interest expense against investment income, subject to conditions.
Can real estate offset your trading gains?
Mostly no, and the exceptions are narrower than they sound.
This is one of the most common plans traders describe: make money in the market, buy property, use the losses and the loan to wipe out the tax. Three separate things get blended together there, and only one of them actually connects to a stock gain.
Rental losses usually cannot touch your trading gains either. Rental real estate is generally a passive activity, and passive losses can normally only offset passive income, not capital gains from stocks and not wage income. Depreciation, including the accelerated kind people chase through a cost segregation study, produces a paper loss that is still stuck behind that same passive wall. There are two well-known ways out, and both are demanding: a limited allowance for people who actively participate, which phases out as income rises, and Real Estate Professional Status, which has strict hours tests, has to be genuinely met rather than asserted, and is one of the more heavily examined positions in the code.
And a 1031 exchange does not help a stock trader. It defers gain on real property exchanged for real property. You cannot 1031 a stock gain into a building.
Qualified Opportunity Zone funds. A realized capital gain, from stock included, can generally be reinvested into a Qualified Opportunity Fund within a limited window after the sale, which defers the tax on that gain and, if the investment is held long enough, can exempt the appreciation on the new investment itself.
This is a real mechanism and it is also an illiquid, long-horizon investment with its own risk that has nothing to do with tax. The deadlines and holding periods are specific and have changed over time. Verify the current rules and talk to a professional before relying on it.
The forms you will actually see
So nothing arriving in the post is a surprise.
- 1099-B from your broker: your proceeds and, in most cases, cost basis. Brokers report this to the IRS too, so it needs to match what you file.
- Form 8949: the individual disposals, including wash sale adjustments.
- Schedule D: where the 8949 totals land and short and long-term are netted.
- Schedule C: business expenses, if you qualify for Trader Tax Status.
- Form 4797: where gains and losses go under a Section 475 mark-to-market election, rather than Schedule D.
Reconcile your broker's figures against your own records before filing. Basis reporting errors are common on transferred positions and on anything with a corporate action attached.
The mistakes that cost the most
Ranked by how often they turn into a bill nobody planned for.
- 1Trading through wash sales all year and discovering in April that a large share of the losses are disallowed.
- 2Missing the Section 475 deadline, which costs a full year because it is elected in advance.
- 3Paying nothing during a profitable year and taking an underpayment penalty on top of the tax.
- 4Spending the gains. A realized gain in November is money that is already owed to someone else in April.
- 5Assuming a Roth can fix it afterwards. It cannot, and believing otherwise usually means the money is already spent.
- 6Repurchasing inside an IRA after harvesting a loss in a taxable account, which can lose the deduction entirely rather than deferring it.
When to stop reading and call a CPA
Get professional help if you are considering the Section 475 election, if you think you may qualify for Trader Tax Status, if you traded heavily enough that wash sales are material, if you are trading through an entity, or if you had a year large enough that the answer is worth more than the fee. A CPA who works with active traders specifically is worth more than a generalist here, because most of the above rarely comes up in ordinary practice.
Educational content only. TheDesperateTrader is not a tax advisor, accountant or law firm, and nothing here is a recommendation for your circumstances. Rules described are for US federal taxes; state treatment differs and is not covered. Figures that change annually have deliberately been left out. Confirm anything that affects a filing with a qualified professional.