A nonresident alien's income that is subject to U.S. income tax must be divided into two categories:

Income that is effectively connected with a trade or business in the United States,
and

Income that is not effectively connected with a trade or business in the United States (discussed under
The 30% Tax, later).

The difference between these two categories is that effectively connected income, after allowable deductions, is taxed at graduated rates. These are the same rates that apply to U.S. citizens and residents. Income that is not effectively connected is taxed at a flat 30% (or lower treaty) rate.

If you were formerly a U.S. citizen or resident alien, these rules may not apply. See
Expatriation Tax, later, in this chapter.

Generally, you must be engaged in a trade or business during the tax year to be able to treat income received in that year as effectively connected with that trade or business. Whether you are engaged in a trade or business in the United States depends on the nature of your activities. The discussions that follow will help you determine whether you are engaged in a trade or business in the United States.

You are considered engaged in a trade or business in the United States if you are temporarily present in the United States as a nonimmigrant under an "F," "J," "M," or "Q" visa. A nonresident alien temporarily present in the United States under a "J" visa includes a nonresident alien individual admitted to the United States as an exchange visitor under the Mutual Educational and Cultural Exchange Act of 1961. The taxable part of any scholarship or fellowship grant that is U.S. source income is treated as effectively connected with a trade or business in the United States.

If you are a member of a partnership that at any time during the tax year is engaged in a trade or business in the United States, you are considered to be engaged in a trade or business in the United States.

If your only U.S. business activity is trading in stocks, securities, or commodities (including hedging transactions) through a U.S. resident broker or other agent, you are not engaged in a trade or business in the United States.

For transactions in stocks or securities, this applies to any nonresident alien, including a dealer or broker in stocks and securities.

For transactions in commodities, this applies to commodities that are usually traded on an organized commodity exchange and to transactions that are usually carried out at such an exchange.

This discussion does not apply if you have a U.S. office or other fixed place of business at any time during the tax year through which, or by the direction of which, you carry out your transactions in stocks, securities, or commodities.

You are not engaged in a trade or business in the United States if trading for your own account in stocks, securities, or commodities is your only U.S. business activity. This applies even if the trading takes place while you are present in the United States or is done by your employee or your broker or other agent.

This does not apply to trading for your own account if you are a dealer in stocks, securities, or commodities. This does not necessarily mean, however, that as a dealer you are considered to be engaged in a trade or business in the United States. Determine that based on the facts and circumstances in each case or under the rules given above in
Trading in stocks, securities, and commodities.

If you are engaged in a U.S. trade or business, all income, gain, or loss for the tax year that you get from sources within the United States (other than certain investment income) is treated as effectively connected income. This applies whether or not there is any connection between the income and the trade or business being carried on in the United States during the tax year.

Two tests, described next under
Investment Income, determine whether certain items of investment income (such as interest, dividends, and royalties) are treated as effectively connected with that business.

In limited circumstances, some kinds of foreign source income may be treated as effectively connected with a trade or business in the United States. For a discussion of these rules, see
Foreign Income, later.

Gains (some of which are considered capital gains) from the sale or exchange of the following types of
property.

Timber, coal, or domestic iron ore with a retained economic
interest.

Patents, copyrights, and similar property on which you receive contingent payments after October 4,
1966.

Patents transferred before October 5, 1966.

Original issue discount obligations.

Capital gains (and losses).

Use the two tests, described next, to determine whether an item of U.S. source income falling in one of the three categories above and received during the tax year is effectively connected with your U.S. trade or business. If the tests indicate that the item of income is effectively connected, you must include it with your other effectively connected income. If the item of income is not effectively connected, include it with all other income discussed under
The 30% Tax later, in this chapter.

This test usually applies to income that is not directly produced by trade or business activities. Under this test, if an item of income is from assets (property) used in, or held for use in, the trade or business in the United States, it is considered effectively
connected.

An asset is used in, or held for use in, the trade or business in the United States if the asset is:

Held for the principal purpose of promoting the conduct of a trade or business in the United
States,

Acquired and held in the ordinary course of the trade or business conducted in the United States (for example, an account receivable or note receivable arising from that trade or business),
or

Otherwise held to meet the present needs of the trade or business in the United States and not its anticipated future
needs.

Generally, stock of a corporation is not treated as an asset used in, or held for use in, a trade or business in the United
States.

You usually are engaged in a U.S. trade or business when you perform personal services in the United States. Personal service income you receive in a tax year in which you are engaged in a U.S. trade or business is effectively connected with a U.S. trade or business. Income received in a year other than the year you performed the services is also effectively connected if it would have been effectively connected if received in the year you performed the services. Personal service income includes wages, salaries, commissions, fees, per diem allowances, and employee allowances and bonuses. The income may be paid to you in the form of cash, services, or property.

If you are engaged in a U.S. trade or business only because you perform personal services in the United States during the tax year, income and gains from assets, and gains and losses from the sale or exchange of capital assets are generally not effectively connected with your trade or business. However, if there is a direct economic relationship between your holding of the asset and your trade or business of performing personal services, the income, gain, or loss is effectively connected.

If you were a nonresident alien engaged in a U.S. trade or business after 1986 because you performed personal services in the United States, and you later receive a pension or retirement pay attributable to these services, such payments are effectively connected income in each year you receive them. This is true whether or not you are engaged in a U.S. trade or business in the year you receive the retirement
pay.

Transportation income (defined in chapter 2) is effectively connected if you meet both of the following conditions.

You had a fixed place of business in the United States involved in earning the
income.

At least 90% of your U.S. source transportation income is attributable to regularly scheduled
transportation.

"Fixed place of business" generally means a place, site, structure, or other similar facility through which you engage in a trade or business. "Regularly scheduled transportation" means that a ship or aircraft follows a published schedule with repeated sailings or flights at regular intervals between the same points for voyages or flights that begin or end in the United States. This definition applies to both scheduled and chartered air transportation.

If you do not meet the two conditions above, the income is not effectively connected and is taxed at a 4% rate. See
Transportation Tax, later, in this chapter.

All profits or losses from U.S. sources that are from the operation of a business in the United States are effectively connected with a trade or business in the United States. For example, profit from the sale in the United States of inventory property purchased either in this country or in a foreign country is effectively connected trade or business income. A share of U.S. source profits or losses of a partnership that is engaged in a trade or business in the United States is also effectively connected with a trade or business in the United States.

Gains and losses from the sale or exchange of U.S. real property interests (whether or not they are capital assets) are taxed as if you are engaged in a trade or business in the United States. You must treat the gain or loss as effectively connected with that trade or business.

This is any interest in real property located in the United States or the U.S. Virgin Islands or any interest (other than as a creditor) in a domestic corporation that is a U.S. real property holding corporation. Real property includes the
following.

Land and unsevered natural products of the land, such as growing crops and timber, and mines, wells, and other natural
deposits.

Improvements on land, including buildings, other permanent structures, and their structural
components.

Personal property associated with the use of real property, such as equipment used in farming, mining, forestry, or construction or property used in lodging facilities or rented office space, unless the personal property
is:

Disposed of more than one year before or after the disposition of the real property,
or

Separately sold to persons unrelated either to the seller or to the buyer of the real property.

A corporation is a U.S. real property holding corporation if the fair market value of the corporation's U.S. real property interests are at least 50% of the total fair market value of:

The corporation's U.S. real property interests, plus

The corporation's interests in real property located outside the United States,
plus

The corporation's other assets that are used in, or held for use in, a trade or business.

Gain or loss on the sale of the stock in any domestic corporation is taxed as if you are engaged in a U.S. trade or business unless you establish that the corporation is not a U.S. real property holding corporation.

A U.S. real property interest does not include a class of stock of a corporation that is regularly traded on an established securities market, unless you hold more than 5% of the fair market value of that class of stock. An interest in a foreign corporation owning U.S. real property generally is not a U.S. real property interest unless the corporation chooses to be treated as a domestic corporation.

Special rules apply to qualified investment entities (QIEs). A QIE is any real estate investment trust (REIT) or any regulated investment company (RIC) that is a U.S. real property holding
corporation.

Generally, any distribution from a QIE to a shareholder that is attributable to
gain from the sale or exchange of a U.S. real property interest is treated as a
U.S. real property gain by the shareholder receiving the distribution. A
distribution by a QIE on stock regularly traded on an established securities
market in the United States is not treated as gain from the sale or exchange of
a U.S. real property interest if you did not own more than 5% of that stock at
any time during the 1-year period ending on the date of the distribution. A
distribution that you do not treat as gain from the sale or exchange of a U.S.
real property interest is included in your gross income as a regular dividend.

The sale of an interest in a domestically controlled QIE is not the sale of a U.S. real property interest. The entity is domestically controlled if at all times during the testing period less than 50% in value of its stock was held, directly or indirectly, by foreign persons. The testing period is the shorter of (a) the 5-year period ending on the date of disposition, or (b) the period during which the entity was in
existence.

If you dispose of an interest in a domestically controlled QIE in an applicable
wash sale transaction, special rules apply. An applicable wash sale transaction
is one in which you:

Dispose of an interest in the domestically controlled QIE during the 30-day period before the ex-dividend date of a distribution that you would (but for the disposition) have treated as gain from the sale or exchange of a U.S. real property interest, and

Acquire, or enter into a contract or option to acquire, a substantially identical interest in that entity during the 61-day period that began on the first day of the 30-day period.

If this occurs, you are treated as having gain from the sale or exchange of a U.S. real property interest in an amount equal to the distribution made after June 15, 2006, that would have been treated as such gain. This also applies to any substitute dividend payment.

A transaction is not treated as an applicable wash sale transaction
if:

You actually receive the distribution from the domestically controlled QIE related to the interest disposed of, or acquired, in the transaction,
or

You dispose of any class of stock in a QIE that is regularly traded on an established securities market in the United States but only if you did not own more than 5% of that class of stock at any time during the 1-year period ending on the date of the
distribution.

You must treat three kinds of foreign source income as effectively connected with a trade or business in the United States if:

You have an office or other fixed place of business in the United States to which the income can be
attributed,

That office or place of business is a material factor in producing the income,
and

The income is produced in the ordinary course of the trade or business carried on through that office or other fixed place of
business.

An office or other fixed place of business is a material factor if it significantly contributes to, and is an essential economic element in, the earning of the income.

The three kinds of foreign source income are listed below.

Rents and royalties for the use of, or for the privilege of using, intangible personal property located outside the United States or from any interest in such property. Included are rents or royalties for the use, or for the privilege of using, outside the United States, patents, copyrights, secret processes and formulas, goodwill, trademarks, trade brands, franchises, and similar properties if the rents or royalties are from the active conduct of a trade or business in the United
States.

Dividends, interest, or amounts received for the provision of a guarantee of indebtedness issued after September 27, 2010, from the active conduct of a banking, financing, or similar business in the United States. A substitute dividend or interest payment received under a securities lending transaction or a sale-repurchase transaction is treated the same as the amounts received on the transferred security.

Income, gain, or loss from the sale outside the United States, through the U.S. office or other fixed place of business, of:

Stock in trade,

Property that would be included in inventory if on hand at the end of the tax year,
or

Property held primarily for sale to customers in the ordinary course of business.

Item (3) will not apply if you sold the property for use, consumption, or disposition outside the United States and an office or other fixed place of business in a foreign country was a material factor in the
sale.

Any foreign source income that is equivalent to any item of income described above is treated as effectively connected with a U.S. trade or business. For example, foreign source interest and dividend equivalents are treated as U.S. effectively connected income if the income is derived by a foreign person in the active conduct of a banking, financing, or similar business within the United
States.

Income you receive during the tax year that is effectively connected with your trade or business in the United States is, after allowable deductions, taxed at the rates that apply to U.S. citizens and residents.

Generally, you can receive effectively connected income only if you are a nonresident alien engaged in trade or business in the United States during the tax year. However, income you receive from the sale or exchange of property, the performance of services, or any other transaction in another tax year is treated as effectively connected in that year if it would have been effectively connected in the year the transaction took place or you performed the services.

Ted Richards, a nonresident alien, entered the United States in August 2011, to perform personal services in the U.S. office of his overseas employer. He worked in the U.S. office until December 25, 2011, but did not leave this country until January 11, 2012. On January 8, 2012, he received his final paycheck for services performed in the United States during 2011. All of Ted's income during his stay here is U.S. source
income.

During 2011, Ted was engaged in the trade or business of performing personal services in the United States. Therefore, all amounts paid to him in 2011 for services performed in the United States during 2011 are effectively connected with that trade or business during
2011.

The salary payment Ted received in January 2012 is U.S. source income to him in 2012. It is effectively connected with a trade or business in the United States because he was engaged in a trade or business in the United States during 2011 when he performed the services that earned the
income.

The 30% (or lower treaty) rate applies to the gross amount of U.S. source fixed or determinable annual or periodic gains, profits, or income.

Income is fixed when it is paid in amounts known ahead of time. Income is determinable whenever there is a basis for figuring the amount to be paid. Income can be periodic if it is paid from time to time. It does not have to be paid annually or at regular intervals. Income can be determinable or periodic even if the length of time during which the payments are made is increased or decreased.

Items specifically included as fixed or determinable income are interest (other than original issue discount), dividends, dividend equivalent payments (defined in chapter 2), rents, premiums, annuities, salaries, wages, and other compensation. A substitute dividend or interest payment received under a securities lending transaction or a sale-repurchase transaction is treated the same as the amounts received on the transferred security. Other items of income, such as royalties, also may be subject to the 30% tax.

Some fixed or determinable income may be exempt from U.S. tax. See
chapter 3 if you are not sure whether the income is taxable.

If you sold, exchanged, or received a payment on a bond or other debt instrument that was issued at a discount after March 31, 1972, all or part of the original issue discount (OID) (other than portfolio interest) may be subject to the 30% tax. The amount of OID is the difference between the stated redemption price at maturity and the issue price of the debt instrument. The 30% tax applies in the following circumstances.

You received a payment on a debt instrument. In this case, the amount of OID subject to tax is the OID that accrued while you held the debt instrument minus the OID previously taken into account. But the tax on the OID cannot be more than the payment minus the tax on the interest payment on the debt
instrument.

You sold or exchanged the debt instrument. The amount of OID subject to tax is the OID that accrued while you held the debt instrument minus the amount already taxed in (1)
above.

Report on your return the amount of OID shown on Form 1042-S, Foreign Person's U.S. Source Income Subject to Withholding, if you bought the debt instrument at original issue. However, you must recompute your proper share of OID shown on Form 1042-S if any of the following apply.

You bought the debt instrument at a premium or paid an acquisition
premium.

The debt instrument is a stripped bond or a stripped coupon (including zero coupon instruments backed by U.S. Treasury
securities).

The debt instrument is a contingent payment or inflation-indexed debt
instrument.

For the definition of premium and acquisition premium and instructions on how to
recompute OID, get Publication 1212.

If you held a bond or other debt instrument that was issued at a discount before April 1, 1972, contact the IRS for further information. See
chapter 12.

In general, nonresident aliens are subject to the 30% tax on the gross proceeds from gambling won in the United States if that income is not effectively connected with a U.S. trade or business and is not exempted by treaty. However, no tax is imposed on nonbusiness gambling income a nonresident alien wins playing blackjack, baccarat, craps, roulette, or big-6 wheel in the United States.

Nonresident aliens are taxed at graduated rates on net gambling income won in the United States that is effectively connected with a U.S. trade or business.

A nonresident alien must include 85% of any U.S. social security benefit (and the social security equivalent part of a tier 1 railroad retirement benefit) in U.S. source fixed or determinable annual or periodic income. Social security benefits include monthly retirement, survivor, and disability benefits. This income is exempt under some tax treaties. See Table 1 in Publication
901, U.S. Tax Treaties, for a list of tax treaties that exempt U.S. social security benefits from U.S. tax.

These rules apply only to those capital gains and losses from sources in the United States that are not effectively connected with a trade or business in the United States. They apply even if you are engaged in a trade or business in the United States. These rules do not apply to the sale or exchange of a U.S. real property interest or to the sale of any property that is effectively connected with a trade or business in the United States. See
Real Property Gain or Loss, earlier, under
Effectively Connected Income.

A capital asset is everything you own except:

Inventory.

Business accounts or notes receivable.

Depreciable property used in a trade or business.

Real property used in a trade or business.

Supplies regularly used in a trade or business.

Certain copyrights, literary or musical or artistic compositions, letters or memoranda, or similar
property.

A capital gain is a gain on the sale or exchange of a capital asset. A capital loss is a loss on the sale or exchange of a capital asset.

If the sale is in foreign currency, for the purpose of determining gain, the cost and selling price of the property should be expressed in U.S. currency at the rate of exchange prevailing as of the date of the purchase and date of the sale,
respectively.

You may want to read Publication 544. However, use Publication 544 only to determine what is a sale or exchange of a capital asset, or what is treated as such. Specific tax treatment that applies to U.S. citizens or residents generally does not apply to
you.

The following gains are subject to the 30% (or lower treaty) rate without regard to the 183-day rule, discussed later.

Gains on the disposal of timber, coal, or domestic iron ore with a retained economic interest.

Gains on contingent payments received from the sale or exchange of patents, copyrights, and similar property after October 4, 1966.

Gains on certain transfers of all substantial rights to, or an undivided interest in, patents if the transfers were made before October 5, 1966.

Gains on the sale or exchange of original issue discount obligations.

Gains in (1) are not subject to the 30% (or lower treaty) rate if you choose to treat the gains as effectively connected with a U.S. trade or business. See
Income From Real Property, later.

If you were in the United States for 183 days or more during the tax year, your net gain from sales or exchanges of capital assets is taxed at a 30% (or lower treaty) rate. For purposes of the 30% (or lower treaty) rate, net gain is the excess of your capital gains from U.S. sources over your capital losses from U.S. sources. This rule applies even if any of the transactions occurred while you were not in the United States.

To determine your net gain, consider the amount of your gains and losses that would be recognized and taken into account only if, and to the extent that, they would be recognized and taken into account if you were in a U.S. trade or business during the year and the gains and losses were effectively connected with that trade or business during the tax
year.

In arriving at your net gain, do not take the following into consideration.

The four types of gains listed earlier.

The deduction for a capital loss carryover.

Capital losses in excess of capital gains.

Exclusion for gain from the sale or exchange of qualified small business stock (section 1202
exclusion).

Losses from the sale or exchange of property held for personal use. However, losses resulting from casualties or thefts may be deductible on Schedule A (Form 1040NR). See
Itemized Deductions in chapter 5.

If you are not engaged in a trade or business in the United States and have not established a tax year for a prior period, your tax year will be the calendar year for purposes of the 183-day rule. Also, you must file your tax return on a calendar-year basis.

If you were in the United States for less than 183 days during the tax year, capital gains (other than gains listed earlier) are tax exempt unless they are effectively connected with a trade or business in the United States during your tax
year.

Report your gains and losses from the sales or exchanges of capital assets that are not effectively connected with a trade or business in the United States on page 4 of Form 1040NR. Report gains and losses from sales or exchanges of capital assets (including real property) that are effectively connected with a trade or business in the United States on a separate Schedule D (Form 1040), Form 4797, or both. Attach them to Form 1040NR.

If you have income from real property located in the United States that you own or have an interest in and hold for the production of income, you can choose to treat all income from that property as income effectively connected with a trade or business in the United States. The choice applies to all income from real property located in the United States and held for the production of income and to all income from any interest in such property. This includes income from rents, royalties from mines, oil or gas wells, or other natural resources. It also includes gains from the sale or exchange of timber, coal, or domestic iron ore with a retained economic interest.

You can make this choice only for real property income that is not otherwise effectively connected with your U.S. trade or business.

If you make the choice, you can claim deductions attributable to the real property income and only your net income from real property is taxed.

This choice does not treat a nonresident alien, who is not otherwise engaged in a U.S. trade or business, as being engaged in a trade or business in the United States during the year.

You are a nonresident alien and are not engaged in a U.S. trade or business. You own a single-family house in the United States that you rent out. Your rental income for the year is $10,000. This is your only U.S. source income. As discussed earlier under
The 30% Tax, the rental income is subject to a tax at a 30% (or lower treaty) rate. You received a Form 1042-S showing that your tenants properly withheld this tax from the rental income. You do not have to file a U.S. tax return (Form 1040NR) because your U.S. tax liability is satisfied by the withholding of
tax.

If you make the choice discussed earlier, you can offset the $10,000 income by certain rental expenses. (See Publication
527, Residential Rental Property, for information on rental expenses.) Any resulting net income is taxed at graduated rates. If you make this choice, report the rental income and expenses on Schedule E (Form 1040) and attach the schedule to Form 1040NR. For the first year you make the choice, also attach the statement discussed
next.

Make the initial choice by attaching a statement to your return, or amended return, for the year of the choice. Include the following in your statement.

That you are making the choice.

Whether the choice is under Internal Revenue Code section 871(d) (explained earlier) or a tax
treaty.

A complete list of all your real property, or any interest in real property, located in the United States. Give the legal identification of U.S. timber, coal, or iron ore in which you have an
interest.

The extent of your ownership in the property.

The location of the property.

A description of any major improvements to the property.

The dates you owned the property.

Your income from the property.

Details of any previous choices and revocations of the real property income choice.

This choice stays in effect for all later tax years unless you revoke it.

You can revoke the choice without IRS approval by filing Form 1040X, Amended U.S. Individual Income Tax Return, for the year you made the choice and for later tax years. You must file Form 1040X within 3 years from the date your return was filed or 2 years from the time the tax was paid, whichever is later. If this time period has expired for the year of choice, you cannot revoke the choice for that year. However, you may revoke the choice for later tax years only if you have IRS approval. For information on how to get IRS approval, see Regulation section
1.871-10(d)(2).

A 4% tax rate applies to transportation income that is not effectively connected because it does not meet the two conditions listed earlier under
Transportation Income. If you receive transportation income subject to the 4% tax, you should figure the tax and show it on line 57 of Form 1040NR. Attach a statement to your return that includes the following information (if
applicable).

Your name, taxpayer identification number, and tax year.

A description of the types of services performed (whether on or off
board).

Names of vessels or registration numbers of aircraft on which you performed the
services.

Amount of U.S. source transportation income derived from each type of service for each vessel or aircraft for the calendar
year.

Total amount of U.S. source transportation income derived from all types of services for the calendar
year.

This 4% tax applies to your U.S. source gross transportation income. This only includes transportation income that is treated as derived from sources in the United States if the transportation begins or ends in the United States. For transportation income from personal services, the transportation must be between the United States and a U.S. possession. For personal services of a nonresident alien, this only applies to income derived from, or in connection with, an aircraft.