Dividends vs capital gains for non-residents
For a non-resident alien, the U.S. taxes the two very differently. Dividends from U.S. companies are subject to withholding at source — a flat 30% by default. Capital gains on stock are generally not taxed by the U.S. for non-residents who are not engaged in a U.S. trade or business and are not present enough days to be a resident. So a foreign investor who buys and sells U.S. shares typically owes U.S. tax only on the dividends, not the gains.
The 30% dividend withholding
The default rate on U.S.-source dividends paid to a non-resident is 30%, withheld by your broker and sent to the IRS before the cash reaches you. You do not file a normal U.S. return for it; the withholding is the tax. Interest and some other income have their own rules, but for equity investors dividends are the main event.
Treaty rates can lower it
If your country has an income-tax treaty with the U.S., the dividend rate is often reduced — commonly to 15%, and lower for some categories. To get the treaty rate you must claim it, which is exactly what the W-8BEN form does. Without a valid W-8BEN on file, your broker must withhold the full 30% (and possibly backup withholding).
What the W-8BEN does
Form W-8BEN certifies to your broker that you are a foreign person and claims any treaty benefit you are entitled to. It confirms your country of residence and tax ID and lowers your dividend withholding to the treaty rate. It is provided to the broker, not filed with the IRS, and generally remains valid for the year signed plus three more, unless your circumstances change.
Why gains usually escape U.S. tax
The U.S. generally does not tax a non-resident's capital gains on stock, because the source of a gain is tied to the seller's residence, not the company's country. That does not make the gain tax-free overall — your home country almost certainly taxes it under its own rules. Non-residents also face special U.S. estate tax exposure on U.S. shares, which is a separate and often-overlooked issue worth planning for.
A quick example
A non-resident in a country with a 15% U.S. treaty rate holds a U.S. stock that pays a $1,000 dividend and later sells the shares for a $5,000 gain. With a valid W-8BEN, $150 is withheld on the dividend (15% instead of 30%) and nothing is withheld or owed to the U.S. on the $5,000 gain. The investor still reports both at home according to local law.