Free fifteen-minute call. With a CPA, no payment until after.
Client login786-952-6621

I'm moving back to Canada. Does the US still tax my ESPP when I sell?

Written by Yarik Yarosh, CPA (US & Canada) August 17, 2026 · FL CPA license AC61704 · CPA Ontario

Yes, for one specific piece of it. The discount you got on the purchase price is compensation under IRC 423(c), and not gain on a capital asset, and it’s included in the year you dispose of the shares. Compensation is sourced by where the labor was performed under IRC 861(a)(3). And IRC 864(c)(6) runs the section 871(b) determination against the year the services were performed rather than the year you sell, so breaking US residency first doesn’t move that test. The same 423(c) raises your basis by whatever it includes.

Key takeaway

The piece that doesn’t travel with you is the purchase discount. IRC 423(c) includes it as compensation and not as gain on a capital asset, IRC 861(a)(3) sources compensation by where the work was done, and IRC 864(c)(6) makes the section 871(b) determination as if the income had been taken into account in the services year. Those are three separate questions and none of them asks where you live on the day you sell. The same 423(c) increases your basis by the amount it includes, and Article XV(2) of the treaty carries two alternative carve-outs worth measuring against your own numbers before you assume none applies.

Does the US still tax my ESPP discount after I move to Canada?

Yes, and three separate provisions each do a different job here. IRC 423(c) includes the discount as compensation, and expressly not as gain on the sale of a capital asset, in the taxable year the shares are disposed of. IRC 861(a)(3) sources compensation by where the labor was performed, which is a question about place. IRC 864(c)(6) answers a different question, about timing: the section 871(b) determination is made as if the income were taken into account in the services year. And 423(c) raises your basis by the same amount it includes.

The inclusion rule, complete: “If the option price of a share of stock acquired by an individual pursuant to a transfer to which subsection (a) applies was less than 100 percent of the fair market value of such share at the time such option was granted, then, in the event of any disposition of such share by him which meets the holding period requirements of subsection (a), or in the event of his death (whenever occurring) while owning such share, there shall be included as compensation (and not as gain upon the sale or exchange of a capital asset) in his gross income, for the taxable year in which falls the date of such disposition or for the taxable year closing with his death, whichever applies, an amount equal to the lesser of” (IRC 423(c)).

Read 864(c)(6) to its last word, because the closing clause is what it turns on. The determination is made as if the income were taken into account in the services year “and without regard to the requirement that the taxpayer be engaged in a trade or business within the United States during the taxable year referred to in subparagraph (A)”. Subparagraph (A) is the year the income is taken into account, so the clause waives the trade-or-business requirement for the year you sell, and for that year only. The provision opens on its own class limit too: it runs to “any income or gain of a nonresident alien individual or a foreign corporation”.

That is a timing rule and it is only a timing rule. It does not source anything, which is IRC 861(a)(3)‘s job, and it does not impose a tax, which is 871(b)(1)‘s job: “A nonresident alien individual engaged in trade or business within the United States during the taxable year shall be taxable as provided in section 1 or 55 on his taxable income which is effectively connected with the conduct of a trade or business within the United States.” What 864(c)(6) settles is narrow, and it is the part the plan usually rests on: changing your residence status before the sale doesn’t change the year the test is run in.

One thing this page deliberately does not do is run the workday fraction. Reg 1.861-4(b)(2)(ii)(F) is the multi-year compensation rule people reach for, and it sits inside a paragraph scoped to “compensation for labor or personal services performed partly within and partly without the United States by an individual as an employee”. If every workday in the attribution period was inside the US, that regulation never engages and IRC 861(a)(3) sources the whole amount directly. Where there were non-US workdays, the split is the subject of how RSUs are divided between the two countries, and the method belongs on that page rather than this one.

How much of my gain is the discount and how much is capital gain?

IRC 423(c) makes the compensation piece a lesser-of with two limbs, and it is usually the smaller number by a distance. On a qualifying disposition the amount included is the lesser of the excess of the share’s fair market value at disposition over what you paid for it, or the excess of its fair market value at the time the option was granted over the option price. The smaller of those two is the compensation. The same subsection then increases your basis by that amount, so the US does not reach those dollars a second time.

The dispositionWhich provision appliesWhat it measuresThe condition on that answer
Qualifying dispositionIRC 423(c)The lesser of fair market value at disposition less what you paid, or fair market value at grant less the option priceOnly where the share was acquired pursuant to a transfer to which 423(a) applied, which takes 423(a)(2)‘s employment condition as well as the holding periods, and only where the disposition meets the holding period requirements in 423(a)(1), 2 years from the grant of the option and 1 year from the transfer of the share. 423(c) increases your basis by the amount it includes
Disqualifying dispositionIRC 421(b)The increase in income for the taxable year in which the exercise occurred, treated as income in the taxable year of the dispositionApplies only where the transfer “would otherwise meet the requirements of section 422(a) or 423(a) except that there is a failure to meet any of the holding period requirements” of 423(a)(1), so a holding period failure is not enough on its own and 423(a)(2)‘s employment condition has to have held. Whether that figure is larger or smaller than the qualifying one depends on the share price path, and this page does not assert a direction
Either route, withholdingIRC 423(c) and 421(b)Nothing. Both say no amount is required to be deducted and withheld under chapter 24Nothing withheld is not nothing owed. The amount is still included in gross income, so it arrives unfunded at filing rather than netted out of a payslip
Sourcing of the amountIRC 861(a)(3)Compensation for labor or personal services performed in the United States, as US sourceThe subsection carries its own exception, and that exception takes all three of its conditions together: a nonresident alien temporarily present for not more than 90 days in the taxable year, compensation not exceeding $3,000 in the aggregate, and a foreign employer or foreign office arrangement
Timing of the US testIRC 864(c)(6)That the section 871(b) determination is made as if the income were taken into account in the services yearAnd without regard to the trade-or-business requirement for the year the income is taken into account, that year only. It is a timing rule. It does not source the income and it does not impose the tax
Treaty overlayArticle XV(1) and XV(2), Schedule VIXV(1) permits the state where the employment is exercised to tax the remuneration derived from itXV(2) takes that back in either of two alternatives, (a) or (b), set out below. Whether a section 423 discount is Article XV remuneration is a legal question this page does not settle
Canadian cost baseITA 128.1(1)(b) and (c)A deemed disposition at fair market value and a deemed reacquisition at that same figure when you become resident in CanadaIt sets a Canadian cost and nothing else. It does not remove the 423(c) amount and it does not decide which country credits the other

Two width points worth having, because both are places a summary usually goes wrong. An employee stock purchase plan for this purpose is a plan meeting all nine of the requirements listed at 423(b), and this page doesn’t work through them. And 423(a) carries two conditions rather than one: the holding periods at (a)(1), and a separate employment condition at (a)(2) covering the period from grant until three months before exercise. Both 423(c) and 421(b) key specifically to the “holding period requirements”, so the employment condition is not what decides which of them applies. What it decides is whether either is reached at all: fail (a)(2) and the share was never bought under a transfer 423(a) applied to, so neither provision applies.

Which date counts as the grant is set by your plan document rather than by the statute, and on many offerings it is the start of the offering period rather than the purchase date. That matters because the second limb of the lesser-of is measured at grant. The statute does anticipate a plan whose price isn’t fixed at that point: “If the option price is not fixed or determinable at the time the option is granted, then for purposes of this subsection, the option price shall be determined as if the option were exercised at such time.”

What if I sell before the holding period is up?

Then 423(c) isn’t the provision that applies. It reaches only a share bought where 423(a) applied, on a disposition meeting its holding period requirements, 2 years from grant and 1 year from transfer. Miss either and IRC 421(b) takes over, moving the exercise year’s increase in income into the year of the disposition. 421(b) needs 423(a) otherwise met as well, so a failed (a)(2) employment condition puts you outside both. Neither withholds: both say no amount is required to be deducted and withheld under chapter 24, so the amount is still owed with nothing held back against it.

421(b) in full: “If the transfer of a share of stock to an individual pursuant to his exercise of an option would otherwise meet the requirements of section 422(a) or 423(a) except that there is a failure to meet any of the holding period requirements of section 422(a)(1) or 423(a)(1), then any increase in the income of such individual or deduction from the income of his employer corporation for the taxable year in which such exercise occurred attributable to such disposition, shall be treated as an increase in income or a deduction from income in the taxable year of such individual or of such employer corporation in which such disposition occurred. No amount shall be required to be deducted and withheld under chapter 24 with respect to any increase in income attributable to a disposition described in the preceding sentence.” (IRC 421(b))

The two routes part on the measurement. 423(c) is a lesser-of tested partly at grant; 421(b) picks up the increase in income for the taxable year the exercise occurred. Which is larger depends on what the share did between those dates, so nobody can tell you in advance that a disqualifying disposition is the worse outcome.

Worth knowing what happens at the front end too. 421(a)(1) says that on a qualifying transfer “no income shall result at the time of the transfer of such share to the individual upon his exercise of the option”. So nothing lands at purchase, which is exactly why the whole amount surfaces later, in a year when you may already have moved.

Does the treaty stop the US from taxing it?

Article XV(1), Schedule VI lets the state where the employment is exercised tax the remuneration derived from it. XV(2) takes it back in either of two alternatives: (a) remuneration not exceeding ten thousand dollars ($10,000) in that other state’s currency, or (b) presence there of no more than 183 days in any twelve-month period commencing or ending in the fiscal year concerned, with pay neither paid by or on behalf of a resident of that state nor borne by a permanent establishment there. Whether a 423 discount is XV remuneration is a question this page doesn’t settle.

XV(2) verbatim: “Notwithstanding the provisions of paragraph 1, remuneration derived by a resident of a Contracting State in respect of an employment exercised in the other Contracting State shall be taxable only in the first-mentioned State if: (a) Such remuneration does not exceed ten thousand dollars ($10,000) in the currency of that other State; or (b) The recipient is present in that other State for a period or periods not exceeding in the aggregate 183 days in any twelve-month period commencing or ending in the fiscal year concerned, and the remuneration is not paid by, or on behalf of, a person who is a resident of that other State and is not borne by a permanent establishment in that other State.” (Schedule VI, Article 10(2))

Limb (b) is three conditions joined rather than a bare day count, and a page that calls XV(2) “the 183-day rule” has dropped limb (a) and two thirds of limb (b). For a modest position limb (a) may be the whole answer on its own, which is the practical reason to measure before assuming the treaty gives you nothing.

On which text is operative: the laws-lois consolidation prints the 1980 Convention as Schedule I and appends each protocol as its own schedule, so the article bodies there are not consolidated. Schedule VI is the Fifth Protocol, 2007. Its Article 10(1) replaces the title of Article XV, and its Article 10(2) says paragraphs 1 and 2 “shall be deleted and replaced by the following”, with the text above following at that site. Nothing later than Schedule VI amends XV(1) or XV(2), so Schedule VI is the operative text for both.

Does Canada tax the same money again?

The arrival step-up is real and it is narrower than the plan usually assumes. ITA 128.1(1) applies “where at a particular time a taxpayer becomes resident in Canada”, and paragraph (b) deems a disposition of each property owned, subject to four exclusions for an individual, for proceeds equal to fair market value; paragraph (c) then deems a reacquisition at that same figure. What it gives you is a Canadian cost base. What it does not do is remove the 423(c) amount, which is US compensation for US work rather than a Canadian capital gain question.

Two things this page will not compute. How Canada characterises the discount in the hands of a new resident is a separate question, and it is not answered here. Neither is the foreign tax credit: which country gives relief for the other’s tax, in which basket, on which return, is its own piece of work and half an answer is worse than none.

How does this look on real numbers?

The example below uses invented, round US dollar figures and computes no tax. It shows the three figures the sections above produce: the IRC 423(c) compensation as a lesser-of, the US basis after the 423(c) increase, and the Canadian cost under ITA 128.1(1)(c). It stops before netting them, because those figures sit in two systems on two different dates and subtracting them manufactures a saving nobody claimed.

What should I do next?

Get the plan document before the brokerage statement, because the grant date and the option price are what size the 423(c) lesser-of and both are plan design rather than statute. If you also hold ISOs or NQSOs (not ESPPs), those run on a different allocation formula and a different character mismatch: how ISOs and NQSOs are taxed across the border. Then write down five dates and keep them apart: the grant, the purchase, the disposition, the day US residency ends, and the day Canadian residence begins. Then test the disposition against the 2 year and 1 year holding periods in 423(a)(1), since that decides whether 423(c) or 421(b) applies where 423(a)(2)‘s employment condition also held. Neither withholds, so the amount arrives at filing unfunded.

Want the discount piece sized before you sell?

The Cross-Border Assessment is $249 USD, credited in full against any engagement signed within 60 days. A dual-licensed CPA reads your plan document, your purchase history and your move dates, and puts in writing which part of the position is compensation and which part isn't.

Book a free call →
Get the next cross-border guide by email

One or two plain-English guides a week on US-Canada tax. No spam, unsubscribe anytime.

Cite this page

Yarik Yarosh, CPA. "I'm moving back to Canada. Does the US still tax my ESPP when I sell?." Blue Cloud CPA, August 16, 2026. https://bluecloudcpa.com/guides/does-the-us-still-tax-my-espp-after-i-move-to-canada

This guide is general information, not tax advice for your specific situation. Which points apply, and how, depends on your facts.