Definition of “U.S. source” for US non-resident alien capital gains tax
"The examples you provide in the question are completely irrelevant. It doesn't matter where the brokerage is or where is the company you own stocks in. For a fairly standard case of an non-resident alien international student living full time in the US - your capital gains are US sourced. Let me quote the following text a couple of paragraphs down the line you quoted on the same page: Gain or loss from the sale or exchange of personal property generally   has its source in the United States if the alien has a tax home in the   United States. The key factor in determining if an individual is a   U.S. resident for purposes of the sourcing of capital gains is whether   the alien's ""tax home"" has shifted to the United States. If an alien   does not have a tax home in the United States, then the alien’s U.S.   source capital gains would be treated as foreign-source and thus   nontaxable. In general, under the ""tax home"" rules, a person who is away (or who   intends to be away) from his tax home for longer than 1 year has   shifted tax homes to his new location upon his arrival in that new   location. See Chapter 1 of Publication 463, Travel, Entertainment,   Gift, and Car Expenses I'll assume you've read this and just want an explanation on what it means. What it means is that if you move to the US for a significant period of time (expected length of 1 year or more), your tax home is assumed to have shifted to the US and the capital gains are sourced to the US from the start of your move. For example: you are a foreign diplomat, and your 4-year assignment started in May. Year-end - you're not US tax resident (diplomats exempt), but you've stayed in the US for more than 183 days, and since your assignment is longer than 1 year - your tax home is now in the US. You'll pay the 30% flat tax. Another example: You're a foreign airline pilot, coming to the US every other day flying the airline aircraft. You end up staying in the US 184 days, but your tax home hasn't shifted, nor you're a US tax resident - you don't pay the flat tax. Keep in mind, that tax treaties may alter the situation since in many cases they also cover the capital gains situation for non-residents."
"If it's fully expensed, it has zero basis. Any sale is taxable, 100%. To the ordinary income / cap gain issue raised in comment - It's a cap gain, but I believe, as with real estate, special rates apply. This is where I am out of my area of expertise, and as they say - ""Consult a professional.""" "Answers: 1: No, Sections 1291-1298 of the IRC were passed in the Reagan adminstration. 2: Not only can a foreign company like a chocolate company fall afoul of the definition of PFIC because of the ""asset test"", which you cite, but it can also be called a PFIC because of the ""income test"".  For example, I have shares in a development-stage Canadian biotech which is considered a PFIC because it has no income at all, except for a minor amount of bank interest on its working capital.  This company is by no means ""passive"" (it has run 31 clinical trials in over 1100 human research subjects, burning $250M of investor's money in the process) nor is it an ""investment company"", but the stupid IRS considers it to be a ""passive foreign investment company""!  The IRS looks at it and sees only the bank account, and assumes it is a foreign shell corporation set up to shield the bank interest from them. 3: Yes, a foreign mutual fund is EXACTLY what congress intended to be a PFIC when passed IRC 1291-1298.  (Biotechs, candy factories, ect got nailed as innocent bystanders.)  Note that if you hold a US mutual fund then every year you'll get a form 1099 in the mail.  The 1099 will report your share of the mutual fund's own income and capital gains, which you must report on your taxes.  (You can also have capital gains from selling your shares of the mutual fund, but that's a different thing.) Now suppose that there was no PFIC law.  Then the US investors in the mutual fund would do better if the mutual fund were in a foreign country, for two reasons: a) The fund would no longer distribute 1099's.  That means the shareholders wouldn't have to pay tax every year on their proportions of the fund's own income/gains.  The money that would have sooner gone to the IRS can sit around for years earning interest. b) The fund could return profits to shareholders exclusively through capital gains rather than dividends, thus ensuring that all of the investors' income on the fund would be taxed at <15%-20% rather than up to 39%.  The fund could do this by returning cash to shareholders exclusively through buybacks. However, the US mutual fund industry doesn't want to move the industry to Canada, and it only takes a few newspaper articles about a foreign loophole to make congress spring to action. 4) It depends.  If you have a PEDIGREED QEF election in place (as I do for my biotech shares) then form 8621 takes a few minutes by hand.  However, this requires both the company and the investor to fully cooperate with congress's vision for PFICs.  The company cooperates by providing a so-called ""PFIC annual information sheet"", which replaces the 1099 form for a US mutual fund.  The investor cooperates by having a ""QEF election"" in place for EACH AND EVERY TAX YEAR in which he held the stock and by reporting the numbers from the PFIC annual information sheet on his return.  (Note that the QEF election persists once made, until revoked.  There are subtleties here that I am glossing over, since ""deemed sale"" elections and other means may be used to modify a share's holding period to come into compliance.) Note that there is software coming out to handle PFICs, and that the software makers will already run their software to make your form 8621 for $75 or so.  I should also warn you that the blogs of tax accountants and tax lawyers all contradict each other on the basic issue of whether you can take capital losses on PFICs for which you have no form 8621 elections.  (See section 2.3 of my notes http://tinyurl.com/mh9vlnr for commentary on this mess.)  I do not know if the software people will tell you which elections are best made on form 8621, though, or advise you if it's time to simply dump your investment. The professional software is at 8621.com, and the individual 8621 preparation is at http://expattaxtools.com/?page_id=242. BTW, in case you're interested, I wrote up a very careful analysis of how to deal with the PFIC situation for the small biotech I invested in in certain cases. It is posted http://tinyurl.com/mh9vlnr.  (For tax reasons it was quite fortunate that the share price dipped to near an all-time low on Jan 1, 2015, making the (next) 2015 tax year ripe for a so-called ""deemed sale"" election.  This was only possible because the company provides the necessary ""PFIC annual information statements"", which your chocolate factory may or may not do.)" This depends on the state law. In case of the State of New York - these are the criteria for sourcing the NY income: As a sole proprietor or partnership, your New York source income   includes: Business activities As a nonresident sole proprietor or partnership, you carry on a   business, trade, profession, or occupation within New York State if   you (or your business): As you can see, the qualification depends on the way you do business, and the amount of business transactions you have in New York. If it is not clear to you - talk to a CPA/EA licensed to practice in the State of New York to give you an advice. "That's a very clear explanation, thanks! So a few additional things if anyone will humor my curiosity...  1. By ""one-time"" tax, does that mean a company that has, say, $5B overseas could bring that back into the US and just be taxed $500M, then keep the remaining $4.5B?  2. Could a company choose a percentage of their overseas money to transfer into the US? Like, only bring in 8% of that $5B ($400M) and be taxed $40M, while keeping all the rest outside the US? Or would it be mandatory to bring it all over?  3. Would most companies just start that same practice of routing to tax havens again after this tax is implented?" It depends and I would not just jump into conclusion as I have seen cases where offering some services are not U.S. sourced income. I'll advise you speak with a knowledgeable tax professional. "I would suggest reading through page 1 of the Arizona Nonresident form instructions at the web address below: https://www.azdor.gov/Portals/0/ADOR-forms/TY2015/10100/10177_inst.pdf To quote: ""You are subject to Arizona income tax on all income derived from Arizona sources. If you are in this state for a temporary or transitory purpose or did not live in Arizona but received income from sources within Arizona during 2015, you are subject to Arizona tax. Income from Arizona sources includes the following: ...the sale of Arizona real estate...""" "The only ""authoritative document"" issued by the IRS to date relating to Cryptocurrencies is Notice 2014-21. It has this to say as the first Q&A: Q-1: How is virtual currency treated for federal tax purposes?   A-1: For federal tax purposes, virtual currency is treated as property. General tax principles applicable to property transactions apply to transactions using virtual currency. That is to say, it should be treated as property like any other asset. Basis reporting the same as any other property would apply, as described in IRS documentation like Publication 550, Investment Income and Expenses and Publication 551, Basis of Assets. You should be able to use the same basis tracking method as you would use for any other capital asset like stocks or bonds. Per Publication 550 ""How To Figure Gain or Loss"", You figure gain or loss on a sale or trade of property by comparing the amount you realize with the adjusted basis of the property. Gain. If the amount you realize from a sale or trade is more than the adjusted basis of the property you transfer, the difference is a gain. Loss. If the adjusted basis of the property you transfer is more than the amount you realize, the difference is a loss.  That is, the assumption with property is that you would be using specific identification. There are specific rules for mutual funds to allow for using average cost or defaulting to FIFO, but for general ""property"", including individual stocks and bonds, there is just Specific Identification or FIFO (and FIFO is just making an assumption about what you're choosing to sell first in the absence of any further information). You don't need to track exactly ""which Bitcoin"" was sold in terms of exactly how the transactions are on the Bitcoin ledger, it's just that you bought x bitcoins on date d, and when you sell a lot of up to x bitcoins you specify in your own records that the sale was of those specific bitcoins that you bought on date d and report it on your tax forms accordingly and keep track of how much of that lot is remaining. It works just like with stocks, where once you buy a share of XYZ Corp on one date and two shares on another date, you don't need to track the movement of stock certificates and ensure that you sell that exact certificate, you just identify which purchase lot is being sold at the time of sale." Resident Alien is liable for the same taxes as a citizen. Citizenship has nothing to do with taxes. "If you're a US citizen, money earned while in the US is sourced to the US. So you can't apply FTC/FEIE to the amounts attributable to the periods of your work while in the US even if it is a short business trip. Tax treaties may affect this. Most tax treaties have explicit provisions to exclude short trips from the sourcing rules, however due to the ""saving clause"" these would probably not apply to you if you're a US citizen - you'll need to read the relevant treaty. Your home country should allow credit for the US taxes paid on the US-sourced income, and the double-taxation avoidance provision should apply in this case. The technicalities depend on your specific country. You would probably not just remove it from the taxable income, there probably is a form similar to the US form 1116 to calculate the available credit." "Tax US corporate ""persons (citizens)"" under the same regime as US human persons/citizens, i.e., file/pay taxes on all income earned annually with deductions for foreign taxes paid.  Problem solved for both shareholders and governments.  [US Citizens and Resident Aliens Abroad - Filing Requirements](https://www.irs.gov/individuals/international-taxpayers/us-citizens-and-resident-aliens-abroad-filing-requirements)  &gt;If you are a U.S. citizen or resident alien living or traveling outside the United States, **you generally are required to file income tax returns, estate tax returns, and gift tax returns and pay estimated tax in the same way as those residing in the United States.**  Thing is, we know solving this isn't the point.  It is to misdirect and talk about everything, but the actual issues, i.e., the discrepancy between tax regimes applied to persons and the massive inequality it creates in tax responsibility.  Because that would lead to the simple solutions that the populace need/crave.  My guess is most US human persons would LOVE to pay taxes only on what was left AFTER they covered their expenses." Just going to point out that the $5.2 figure includes gains from outside of the us. Considering he said that we gained that money, it'd be pretty normal to interpret it as part of the domestic gains. Also Wilbur Ross is trump's secretary of commerce and part of the administrstion, trump getting figures from him is still his responsibility. Corporations are taxed on their profits.  Multinational corporations can report their profits in any country they have operations, regardless of where they made the sale.  In other words, it's impossible to nail down exactly where a company 'made it's money'.  So the US doesn't try, we just tax them on earnings everywhere, minus taxes paid elsewhere.  edit for clarity As you have indicated, the 1042-S reflects no income or withholding.  As such, you are not required to file a US tax return unless you have other income from the US.  Gains on stocks are not reported until realized upon sale. FYI, your activity does not fit the requirements of being engaged in a trade or business activity.  While the definition is documented in several places of the Code, I have attached Publication 519 which most accurately represents the application to your situation as you have described it. https://www.irs.gov/publications/p519/ch04.html#en_US_2016_publink1000222308 Any large stockbroker will offer trading in US securities. As a foreign national you will be required to register with the US tax authorities (IRS) by completing and filing a W-8BEN form and pay US withholding taxes on any dividend income you receive.  US dividends are paid net of withholding taxes, so you do not need to file a US tax return.  Capital gains are not subject to US taxes.  Also, each year you are holding US securities, you will receive a form from the IRS which you are required to complete and return. You will also be required to complete and file forms for each of the exchanges you wish to received market price data from. Trading will be restricted to US trading hours, which I believe is 6 hours ahead of Denmark for the New York markets.  You will simply submit an order to the desired market using your broker's online trading software or your broker's telephone dealing service. You can expect to pay significantly higher commissions for trading US securities when compared to domestic securities. You will also face potentially large foreign exchange fees when exchaning your funds from EUR to USD. All in all, you will probably be better off using your local market to trade US index or sector ETFs. Well, whats the source of income from?  Social security?  Dividends?  At 40k that's the good thing about a progressive tax, you wouldn't be taxed heavily.  Even 40k of capital gains, which lets be honest is mostly high income individuals, is barely taxed at a higher level than that 40,000k from a fixed income source. Again, that's the gain (aka profit) one is receiving from selling shares of a company.