Subscriptions are live: We're on the subscription model now, early-access price $24.99/month, with day, week, and longer plans too. New accounts start with 5 free premium days. Prefer to donate? Donations grant premium time and are logged on your profile page.

TheDesperateTrader
Reference

Trading Taxes, Explained

TheDesperateTrader.com· What you owe, when you owe it, and the rules that catch active traders out.
This is education, not tax advice. We are not accountants and this is not a recommendation for your situation. Tax outcomes depend on facts we do not know about you, and the brackets, contribution caps and income limits change every year. Use this to understand the mechanics and to ask your CPA better questions. Verify any current-year figure at irs.gov.

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.

Realized vs unrealized

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.

Active trading is almost entirely short-term by definition. If you are day trading or swing trading, essentially none of your gains get the preferential long-term rate. That is not a flaw in your strategy, but it does mean the tax drag on active trading is higher than the headline capital-gains numbers most articles quote, and it should be part of how you judge returns.

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.

How a wash sale defers a loss

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.

Two traps worth knowing. First, a very active trader who repeatedly re-enters the same ticker can accumulate disallowed losses all year and end up owing tax on gains that their actual cash position does not reflect. Second, the rule looks across your accounts, and repurchasing inside an IRA is the worst case: the loss is disallowed and there is no taxable-account basis for it to attach to, so it can be lost permanently rather than deferred.

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).
The deadline is the trap. For an existing taxpayer the 475 election generally has to be made by the due date of the prior year's return, meaning you elect it before the year it applies to, not when you file for that year. Miss it and you wait a full year. It is also difficult to revoke, and it is not automatically the right answer for everyone. This is the section to take to a CPA who works with traders rather than to decide alone.

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.

The entire strategy depends on not repurchasing inside the 61-day window. Harvesting a loss and buying back the next morning simply disallows it. This is where most self-directed harvesting goes wrong.

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.

You cannot move a gain you already made into a Roth to avoid tax on it. This is the most common misconception we see, and it is worth being blunt about. Roth contributions are made with after-tax dollars, are capped at a modest annual amount, and phase out above certain incomes. There is no mechanism that takes a realized gain sitting in a taxable brokerage account and retroactively shelters it. The tax on that sale is already owed.
What is true is the reverse ordering: money contributed to a Roth grows and is withdrawn tax-free, so the shelter has to be in place before the gain happens. That is an argument for funding the account early, not for moving profits after the fact.

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.

Paying yourself from your own company as a "loan" is a different thing entirely. Owner loans that lack real terms, interest and repayment are a known audit target and get recharacterized as wages or distributions, with back taxes and penalties attached. Borrowing against assets you own and labelling your own compensation as a loan are not the same strategy, and only the first one is what people mean when they talk about borrowing instead of selling.

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.

Borrowing against a property does not offset a capital gain. Loan proceeds are not income, so a loan is not a deduction. Taking a mortgage or a cash-out refinance creates no offset against a gain you realized in your brokerage account. Interest can be deductible against the income the property produces, which is a different and much smaller thing.

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.

The one route that does connect the two

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 honest summary: real estate is a way to build and shelter future income. With the narrow exception above it is not a way to erase tax on a gain you have already taken. If the goal is reducing the bill on this year's trading, the levers that actually apply are the ones earlier on this page: holding period, harvesting losses without tripping the wash sale rule, and where you trade.

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.

  1. 1Trading through wash sales all year and discovering in April that a large share of the losses are disallowed.
  2. 2Missing the Section 475 deadline, which costs a full year because it is elected in advance.
  3. 3Paying nothing during a profitable year and taking an underpayment penalty on top of the tax.
  4. 4Spending the gains. A realized gain in November is money that is already owed to someone else in April.
  5. 5Assuming a Roth can fix it afterwards. It cannot, and believing otherwise usually means the money is already spent.
  6. 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.