Skip to content
Cryptos: 556Market Cap: $2.86T 1.3%24h Vol: $128.92BDominance: BTC 58.1% ETH 10.4%
Open Tradzy

Taxes on foreign stock gains: what to check before you sell

Tax on a gain from a foreign stock depends mainly on where you are tax resident. Learn what to check on dividends, withholding, currency and records.

International markets · Updated 2026-10-09 · 1,340 words

When you sell a share listed in another country, the tax question is not settled by the exchange where the share trades. For most people, the deciding factor is tax residence, meaning the country whose tax authority treats them as a resident. Each country sets its own rules on capital gains, dividends and foreign income, and a tax treaty between two countries can change how much is withheld from a dividend.

This guide sets out the questions to answer before you sell, with a worked example that uses invented figures. It does not give the rate that applies to you, because that depends on your residence, your status and your country's current law. Treat it as a checklist for a conversation with a qualified tax adviser or your local tax office, and keep records from your first trade.

Which country's tax rules apply?

In most cases, a gain is taxed by the country where you are tax resident, whichever exchange the shares trade on. Some countries tax residents on worldwide income, while others tax only income from local sources. Your residence status is therefore the first question to settle, before any figure on a broker statement.

Tax residence tests vary. Some countries count the days you spend there in a year, while others look at where your home, family or main economic ties are. A few also use citizenship. If you have lived in more than one country in a year, the rules can produce two answers, and a tax treaty between the countries may decide which one prevails. Do not assume that a broker's country of registration decides your tax, because it usually does not. Write down your residence status and the date it began, since that record will matter if you are ever asked to show it.

Some countries also apply a temporary non-residence rule, under which a person who leaves can still be taxed on gains for a period after moving. Others apply exit taxes on assets held at the point of departure. These rules are specific and often recent, so check them with an adviser before you move countries or sell a large position.

What happens to dividends?

Many countries withhold tax on dividends paid to foreign investors before the money reaches them. Tax treaties often reduce that rate, and some tax systems let you claim back part of the amount withheld. The forms and deadlines differ by country and by broker, so find out early what paperwork your broker needs.

For example, a non-US investor who buys US-listed shares usually completes a form such as the W-8BEN with the broker. The form certifies foreign status and can allow a lower treaty rate of withholding than the default. If the form is missing or out of date, the broker may withhold at the higher default rate. Keep every dividend statement, because the withheld amount is what you will need if you claim a credit or refund. In your home country the dividend may also be taxable, and some systems credit the foreign withholding against that tax. Check the current rules before you assume the withheld amount is the final figure.

Withholding is not always the same as the tax you owe. Some countries apply a higher rate to dividends than to gains, and some treat certain payouts, such as capital returns or special dividends, differently. Read each dividend statement line by line, and note which amount is gross, which is withheld and which is net, so every figure can be traced in your records.

How is the gain calculated?

A gain is usually the sale proceeds minus the cost of the shares, including the buying fee, measured in the currency your tax authority uses. Because the share price and the exchange rate can move at different times, the gain in your home currency may differ from the gain you see in the share's own currency.

The example below is illustrative. You buy 100 shares at 50 dollars each and pay a 10-dollar fee, then sell them at 60 dollars each and pay another 10-dollar fee. The table shows the result in the share's own currency, with invented figures.

StepAmount (dollars)What it means
Purchase price (100 × 50)5,000The base cost of the shares
Buying fee10Usually added to the cost
Total cost5,010The figure most tax systems start from
Sale price (100 × 60)6,000Gross proceeds
Selling feeminus 10Usually deducted from the proceeds
Net proceeds5,990What you received
Gain before currency effects980Net proceeds minus total cost

Now add the exchange rate. If your tax rules convert each figure at the rate on the day of the trade, a dollar that is worth more in your home currency on the sale date will increase the gain, and one that is worth less will reduce it. The gain in your home currency is therefore not simply the dollar gain multiplied by a single rate. Your tax authority or adviser will set out which rates to use, and you should write them down with the date of each conversion.

If you bought the same shares in several lots, each lot can have its own cost and date. Many systems require you to match sales to lots using a set method, such as first in, first out or an average cost, and the method you use can change the gain. Keep a lot-by-lot record from the first purchase, so the calculation does not depend on memory.

What about losses and carry-forward?

Many tax systems let you offset gains with losses in the same year, and some let you carry an unused loss forward into later years. Which losses qualify, and for how long they can be carried, varies by country. Record every sale, including losing ones, so you can prove any loss you claim.

Some systems treat foreign and domestic gains differently, and some limit how losses on certain assets can be offset. A loss on one foreign share may not offset a gain on another if the rules put them in separate categories. Timing also matters: a sale near the year end can move a gain into the next tax year. Do not sell only to create a loss without checking the rules, because anti-avoidance rules exist in some countries and can disallow such a loss. Keep trade confirmations, contract notes, dividend statements and conversion records for as many years as your tax authority requires.

Common mistakes

Assuming the broker handles your tax. A broker reports what it has to, but it does not know your full position across countries. Keep your own record.

Forgetting the withheld amount. A dividend that arrives smaller than expected is still income. Record the gross figure and the withholding separately.

Using the wrong currency or date. A gain converted at the wrong date or rate can change your result. Use the rates your rules specify and write them down.

Checklist

  1. Confirm your tax residence status and the date it began.
  2. Find out whether your country taxes foreign income, and whether a treaty applies to dividends from the country where the shares are listed.
  3. Complete any treaty or residence form your broker asks for, and keep a copy.
  4. Keep every trade confirmation, dividend statement and withholding record, with a lot-by-lot record for repeat purchases.
  5. Work out the gain in the share's currency, then convert it using the rates your rules set.
  6. Check how losses can be used in your country before you plan a sale near year end.
  7. Ask a qualified tax adviser to review your figures before you file.

Key takeaways

Tax on a gain from a foreign share is decided mainly by your tax residence, not by the exchange where the share trades. Withholding on dividends depends on treaties and on the forms you file, and gains must be converted with the rules your tax authority sets. The most useful habit is keeping complete records from the first trade, because every figure in the final calculation depends on them.

This guide is for general information, not financial advice. See the disclaimer.

Frequently asked questions

Do I pay tax in the country where the company is listed?

Not usually. Your tax residence normally decides how a gain is taxed. The listing country may still withhold tax on dividends, and a tax treaty can change how much is withheld.

Can I get back tax withheld on dividends?

Sometimes. Some tax systems allow a credit or refund for foreign withholding, and treaties can reduce the rate at source. The forms and deadlines vary, so check the current rules with your tax office or an adviser.

Should I see a tax adviser before I sell?

If your gains are large, your residence status is unclear, or you hold shares in several countries, yes. A qualified adviser can apply your country's current rules to your exact figures. This guide is for general information, not financial or tax advice. Tax rules change, so check the current rules for your country.

Keep reading

All international markets guides · All guides

Ready to try it? Practise with paper money in Tradzy first. It is free, and no real money is at risk.

Open Tradzy