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:
- Idle cash above your buffer. No tax, no fees, instant. Keep a reasonable emergency buffer; deploy the rest first.
- 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.
- Positions with the smallest unrealized gains. Less embedded gain means less tax per dollar raised. Sell lowest-gain lots before higher-gain ones.
- 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:
- United States: long-term capital gains are taxed at 0% / 15% / 20% depending on your taxable income, plus a 3.8% Net Investment Income Tax (NIIT) above the MAGI thresholds. Short-term gains are taxed as ordinary income — another reason lot selection matters.
- Canada: 50% of a capital gain is included in income and taxed at your combined federal + provincial marginal rate. So a BC earner in a 40.7% marginal bracket pays roughly 20.4% on the gain — not a flat number, and not the US number.
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
- Wash sale (US) / superficial loss (Canada): if you harvest a loss and re-buy the same (or identical) security within 30 days, the loss is disallowed. Plan the gap.
- Settlement timing: sales typically settle in ~1–2 business days — don't cut a payment deadline too fine.
- Partial cost basis: if your broker doesn't have basis for some lots, treat those as unknown and trim by concentration, not by guessed gain.
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.