The tax-optimal order to sell investments to raise cash (US & Canada)

Last updated June 2026

You need a lump of cash — a tax bill, a down payment, a renovation. You have it, but it's in your portfolio. The question almost nobody answers well is: which dollars do you sell first? Get the order wrong and you can hand a chunk of the proceeds to the tax authority for no reason. Get it right and you raise the same cash for materially less tax.

The short answer: a strict order of operations

Raise cash in this sequence, only moving to the next step when the previous one is exhausted:

  1. Idle cash above your buffer. No tax, no fees, instant. Keep a reasonable emergency buffer; deploy the rest first.
  2. Positions trading below your cost basis (harvest the loss). Selling these raises cash and books a capital loss that offsets other gains — it's the cheapest non-cash dollar you have.
  3. Positions with the smallest unrealized gains. Less embedded gain means less tax per dollar raised. Sell lowest-gain lots before higher-gain ones.
  4. Trim your most concentrated position last, if you still need cash and have no cost-basis information — raising cash and reducing single-name risk at the same time.

And one hard rule that sits above all of it: don't touch your registered / retirement accounts — RRSP, TFSA, 401(k), IRA, RRIF — to fund a near-term expense. The tax shelter (and, for some, the penalty for early withdrawal) makes them the most expensive place to pull from.

Why the order matters

Every dollar you raise by selling an appreciated position drags some tax with it. Harvested losses carry a negative tax cost (they shelter other gains), so they belong first. After that, selling your smallest gains keeps the realized gain — and therefore the tax — as low as possible for the cash you need. Selling your biggest winner first does the opposite: maximum tax for the same cash.

US vs. Canada: the rate you should actually use

The ordering above is the same on both sides of the border. The dollar estimates are not, because the two systems tax gains very differently:

A flat "assume 15%" estimate — which a lot of tools quietly use — can be wildly off for a cross-border earner or a high earner. Use your real effective rate.

The traps

How Orbeva does this for you

This is exactly the engine inside Orbeva. When you need to fund something, it sequences the move across your real, connected accounts — idle cash first, then losses to harvest, then your lowest-tax lots — using your effective US or Canadian rate, never a flat guess, and it leaves your registered accounts alone. It's read-only: it lays out the ordered steps and the estimated tax, and you make every trade. Nothing moves automatically.

See your tax-optimal plan — start free →

This article is general information and decision support, not financial, tax, or investment advice. Rates, thresholds, and rules change and vary by situation — confirm anything material with a qualified professional.