TITLE 26 - US CODE - PART I - SOURCE RULES AND OTHER GENERAL RULES RELATING TO FOREIGN INCOME

26 USC 861 - Income from sources within the United States

(a) Gross income from sources within United States 
The following items of gross income shall be treated as income from sources within the United States:
(1) Interest 
Interest from the United States or the District of Columbia, and interest on bonds, notes, or other interest-bearing obligations of noncorporate residents or domestic corporations not including
(A) interest from a resident alien individual or domestic corporation, if such individual or corporation meets the 80-percent foreign business requirements of subsection (c)(1),
(B) interest
(i) on deposits with a foreign branch of a domestic corporation or a domestic partnership if such branch is engaged in the commercial banking business, and
(ii) on amounts satisfying the requirements of subparagraph (B) of section 871 (i)(3) which are paid by a foreign branch of a domestic corporation or a domestic partnership, and
(C) in the case of a foreign partnership, which is predominantly engaged in the active conduct of a trade or business outside the United States, any interest not paid by a trade or business engaged in by the partnership in the United States and not allocable to income which is effectively connected (or treated as effectively connected) with the conduct of a trade or business in the United States.
(2) Dividends 
The amount received as dividends
(A) from a domestic corporation other than a corporation which has an election in effect under section 936, or
(B) from a foreign corporation unless less than 25 percent of the gross income from all sources of such foreign corporation for the 3-year period ending with the close of its taxable year preceding the declaration of such dividends (or for such part of such period as the corporation has been in existence) was effectively connected (or treated as effectively connected other than income described in section 884 (d)(2)) with the conduct of a trade or business within the United States; but only in an amount which bears the same ratio to such dividends as the gross income of the corporation for such period which was effectively connected (or treated as effectively connected other than income described in section 884 (d)(2)) with the conduct of a trade or business within the United States bears to its gross income from all sources; but dividends (other than dividends for which a deduction is allowable under section 245 (b)) from a foreign corporation shall, for purposes of subpart A of part III (relating to foreign tax credit), be treated as income from sources without the United States to the extent (and only to the extent) exceeding the amount which is 100/70th of the amount of the deduction allowable under section 245 in respect of such dividends, or
(C) from a foreign corporation to the extent that such amount is required by section 243 (e) (relating to certain dividends from foreign corporations) to be treated as dividends from a domestic corporation which is subject to taxation under this chapter, and to such extent subparagraph (B) shall not apply to such amount, or
(D) from a DISC or former DISC (as defined in section 992 (a)) except to the extent attributable (as determined under regulations prescribed by the Secretary) to qualified export receipts described in section 993 (a)(1) (other than interest and gains described in section 995 (b)(1)).

In the case of any dividend from a 20-percent owned corporation (as defined in section 243 (c)(2)), subparagraph (B) shall be applied by substituting 100/80th for 100/70th.

(3) Personal services 
Compensation for labor or personal services performed in the United States; except that compensation for labor or services performed in the United States shall not be deemed to be income from sources within the United States if
(A) the labor or services are performed by a nonresident alien individual temporarily present in the United States for a period or periods not exceeding a total of 90 days during the taxable year,
(B) such compensation does not exceed $3,000 in the aggregate, and
(C) the compensation is for labor or services performed as an employee of or under a contract with
(i) a nonresident alien, foreign partnership, or foreign corporation, not engaged in trade or business within the United States, or
(ii) an individual who is a citizen or resident of the United States, a domestic partnership, or a domestic corporation, if such labor or services are performed for an office or place of business maintained in a foreign country or in a possession of the United States by such individual, partnership, or corporation.

In addition, compensation for labor or services performed in the United States shall not be deemed to be income from sources within the United States if the labor or services are performed by a nonresident alien individual in connection with the individuals temporary presence in the United States as a regular member of the crew of a foreign vessel engaged in transportation between the United States and a foreign country or a possession of the United States.

(4) Rentals and royalties 
Rentals or royalties from property located in the United States or from any interest in such property, including rentals or royalties for the use of or for the privilege of using in the United States patents, copyrights, secret processes and formulas, good will, trade-marks, trade brands, franchises, and other like property.
(5) Disposition of United States real property interest 
Gains, profits, and income from the disposition of a United States real property interest (as defined in section 897 (c)).
(6) Sale or exchange of inventory property 
Gains, profits, and income derived from the purchase of inventory property (within the meaning of section 865 (i)(1)) without the United States (other than within a possession of the United States) and its sale or exchange within the United States.
(7) Amounts received as underwriting income (as defined in section 832 (b)(3)) derived from the issuing (or reinsuring) of any insurance or annuity contract
(A) in connection with property in, liability arising out of an activity in, or in connection with the lives or health of residents of, the United States, or
(B) in connection with risks not described in subparagraph (A) as a result of any arrangement whereby another corporation receives a substantially equal amount of premiums or other consideration in respect to issuing (or reinsuring) any insurance or annuity contract in connection with property in, liability arising out of activity in, or in connection with the lives or health of residents of, the United States.
(8) Social security benefits 
Any social security benefit (as defined in section 86 (d)).
(b) Taxable income from sources within United States 
From the items of gross income specified in subsection (a) as being income from sources within the United States there shall be deducted the expenses, losses, and other deductions properly apportioned or allocated thereto and a ratable part of any expenses, losses, or other deductions which cannot definitely be allocated to some item or class of gross income. The remainder, if any, shall be included in full as taxable income from sources within the United States. In the case of an individual who does not itemize deductions, an amount equal to the standard deduction shall be considered a deduction which cannot definitely be allocated to some item or class of gross income.
(c) Foreign business requirements 

(1) Foreign business requirements 

(A) In general 
An individual or corporation meets the 80-percent foreign business requirements of this paragraph if it is shown to the satisfaction of the Secretary that at least 80 percent of the gross income from all sources of such individual or corporation for the testing period is active foreign business income.
(B) Active foreign business income 
For purposes of subparagraph (A), the term active foreign business income means gross income which
(i) is derived from sources outside the United States (as determined under this subchapter) or, in the case of a corporation, is attributable to income so derived by a subsidiary of such corporation, and
(ii) is attributable to the active conduct of a trade or business in a foreign country or possession of the United States by the individual or corporation (or by a subsidiary.)

For purposes of this subparagraph, the term subsidiary means any corporation in which the corporation referred to in this subparagraph owns (directly or indirectly) stock meeting the requirements of section 1504 (a)(2) (determined by substituting 50 percent for 80 percent each place it appears).

(C) Testing period 
For purposes of this subsection, the term testing period means the 3-year period ending with the close of the taxable year of the individual or corporation preceding the payment (or such part of such period as may be applicable). If the individual or corporation has no gross income for such 3-year period (or part thereof), the testing period shall be the taxable year in which the payment is made.
(2) Look-thru where related person receives interest 

(A) In general 
In the case of interest received by a related person from a resident alien individual or domestic corporation meeting the 80-percent foreign business requirements of paragraph (1), subsection (a)(1)(A) shall apply only to a percentage of such interest equal to the percentage which
(i) the gross income of such individual or corporation for the testing period from sources outside the United States (as determined under this subchapter), is of
(ii) the total gross income of such individual or corporation for the testing period.
(B) Related person 
For purposes of this paragraph, the term related person has the meaning given such term by section 954 (d)(3), except that
(i) such section shall be applied by substituting the individual or corporation making the payment for controlled foreign corporation each place it appears, and
(ii) such section shall be applied by substituting 10 percent or more for more than 50 percent each place it appears.
(d) Special rule for application of subsection (a)(2)(B) 
For purposes of subsection (a)(2)(B), if the foreign corporation has no gross income from any source for the 3-year period (or part thereof) specified, the requirements of such subsection shall be applied with respect to the taxable year of such corporation in which the payment of the dividend is made.
(e) Income from certain railroad rolling stock treated as income from sources within the United States 

(1) General rule 
For purposes of subsection (a) and section 862 (a), if
(A) a taxpayer leases railroad rolling stock which is section 1245 property (as defined in section 1245 (a)(3)) to a domestic common carrier by railroad or a corporation which is controlled, directly or indirectly, by one or more such common carriers, and
(B) the use under such lease is expected to be use within the United States,

all amounts includible in gross income by the taxpayer with respect to such railroad rolling stock (including gain from sale or other disposition of such railroad rolling stock) shall be treated as income from sources within the United States. The requirements of subparagraph (B) of the preceding sentence shall be treated as satisfied if the only expected use outside the United States is use by a person (whether or not a United States person) in Canada or Mexico on a temporary basis which is not expected to exceed a total of 90 days in any taxable year.

(2) Paragraph (1) not to apply where lessor is a member of controlled group which includes a railroad 
Paragraph (1) shall not apply to a lease between two members of the same controlled group of corporations (as defined in section 1563) if any member of such group is a domestic common carrier by railroad or a switching or terminal company all of whose stock is owned by one or more domestic common carriers by railroad.
(3) Denial of foreign tax credit 
No credit shall be allowed under section 901 for any payments to foreign countries with respect to any amount received by the taxpayer with respect to railroad rolling stock which is subject to paragraph (1).
(f) Cross reference 
For treatment of interest paid by the branch of a foreign corporation, see section 884 (f).

26 USC 862 - Income from sources without the United States

(a) Gross income from sources without United States 
The following items of gross income shall be treated as income from sources without the United States:
(1) interest other than that derived from sources within the United States as provided in section 861 (a)(1);
(2) dividends other than those derived from sources within the United States as provided in section 861 (a)(2);
(3) compensation for labor or personal services performed without the United States;
(4) rentals or royalties from property located without the United States or from any interest in such property, including rentals or royalties for the use of or for the privilege of using without the United States patents, copyrights, secret processes and formulas, good will, trade-marks, trade brands, franchises, and other like properties;
(5) gains, profits, and income from the sale or exchange of real property located without the United States;
(6) gains, profits, and income derived from the purchase of inventory property (within the meaning of section 865 (i)(1)) within the United States and its sale or exchange without the United States;
(7) underwriting income other than that derived from sources within the United States as provided in section 861 (a)(7); and
(8) gains, profits, and income from the disposition of a United States real property interest (as defined in section 897 (c)) when the real property is located in the Virgin Islands.
(b) Taxable income from sources without United States 
From the items of gross income specified in subsection (a) there shall be deducted the expenses, losses, and other deductions properly apportioned or allocated thereto, and a ratable part of any expenses, losses, or other deductions which cannot definitely be allocated to some item or class of gross income. The remainder, if any, shall be treated in full as taxable income from sources without the United States. In the case of an individual who does not itemize deductions, an amount equal to the standard deduction shall be considered a deduction which cannot definitely be allocated to some item or class of gross income.

26 USC 863 - Special rules for determining source

(a) Allocation under regulations 
Items of gross income, expenses, losses, and deductions, other than those specified in sections 861 (a) and 862 (a), shall be allocated or apportioned to sources within or without the United States, under regulations prescribed by the Secretary. Where items of gross income are separately allocated to sources within the United States, there shall be deducted (for the purpose of computing the taxable income therefrom) the expenses, losses, and other deductions properly apportioned or allocated thereto and a ratable part of other expenses, losses, or other deductions which cannot definitely be allocated to some item or class of gross income. The remainder, if any, shall be included in full as taxable income from sources within the United States.
(b) Income partly from within and partly from without the United States 
In the case of gross income derived from sources partly within and partly without the United States, the taxable income may first be computed by deducting the expenses, losses, or other deductions apportioned or allocated thereto and a ratable part of any expenses, losses, or other deductions which cannot definitely be allocated to some item or class of gross income; and the portion of such taxable income attributable to sources within the United States may be determined by processes or formulas of general apportionment prescribed by the Secretary. Gains, profits, and income
(1) from services rendered partly within and partly without the United States,
(2) from the sale or exchange of inventory property (within the meaning of section 865 (i)(1)) produced (in whole or in part) by the taxpayer within and sold or exchanged without the United States, or produced (in whole or in part) by the taxpayer without and sold or exchanged within the United States, or
(3) derived from the purchase of inventory property (within the meaning of section 865 (i)(1)) within a possession of the United States and its sale or exchange within the United States,

shall be treated as derived partly from sources within and partly from sources without the United States.

(c) Source rule for certain transportation income 

(1) Transportation beginning and ending in the United States 
All transportation income attributable to transportation which begins and ends in the United States shall be treated as derived from sources within the United States.
(2) Other transportation having United States connection 

(A) In general 
50 percent of all transportation income attributable to transportation which
(i) is not described in paragraph (1), and
(ii) begins or ends in the United States,

shall be treated as from sources in the United States.

(B) Special rule for personal service income 
Subparagraph (A) shall not apply to any transportation income which is income derived from personal services performed by the taxpayer, unless such income is attributable to transportation which
(i) begins in the United States and ends in a possession of the United States, or
(ii) begins in a possession of the United States and ends in the United States.

In the case of transportation income derived from, or in connection with, a vessel, this subparagraph shall only apply if the taxpayer is a citizen or resident alien.

(3) Transportation income 
For purposes of this subsection, the term transportation income means any income derived from, or in connection with
(A) the use (or hiring or leasing for use) of a vessel or aircraft, or
(B) the performance of services directly related to the use of a vessel or aircraft.

For purposes of the preceding sentence, the term vessel or aircraft includes any container used in connection with a vessel or aircraft.

(d) Source rules for space and certain ocean activities 

(1) In general 
Except as provided in regulations, any income derived from a space or ocean activity
(A) if derived by a United States person, shall be sourced in the United States, and
(B) if derived by a person other than a United States person, shall be sourced outside the United States.
(2) Space or ocean activity 
For purposes of paragraph (1)
(A) In general 
The term space or ocean activity means
(i) any activity conducted in space, and
(ii) any activity conducted on or under water not within the jurisdiction (as recognized by the United States) of a foreign country, possession of the United States, or the United States.

Such term includes any activity conducted in Antarctica.

(B) Exception for certain activities 
The term space or ocean activity shall not include
(i) any activity giving rise to transportation income (as defined in section 863 (c)),
(ii) any activity giving rise to international communications income (as defined in subsection (e)(2)), and
(iii) any activity with respect to mines, oil and gas wells, or other natural deposits to the extent within the United States or any foreign country or possession of the United States (as defined in section 638).

For purposes of applying section 638, the jurisdiction of any foreign country shall not include any jurisdiction not recognized by the United States.

(e) International communications income 

(1) Source rules 

(A) United States persons 
In the case of any United States person, 50 percent of any international communications income shall be sourced in the United States and 50 percent of such income shall be sourced outside the United States.
(B) Foreign persons 

(i) In general Except as provided in regulations or clause (ii), in the case of any person other than a United States person, any international communications income shall be sourced outside the United States.
(ii) Special rule for income attributable to office or fixed place of business in the United States In the case of any person (other than a United States person) who maintains an office or other fixed place of business in the United States, any international communications income attributable to such office or other fixed place of business shall be sourced in the United States.
(2) Definition 
For purposes of this section, the term international communications income includes all income derived from the transmission of communications or data from the United States to any foreign country (or possession of the United States) or from any foreign country (or possession of the United States) to the United States.

26 USC 864 - Definitions and special rules

(a) Produced 
For purposes of this part, the term produced includes created, fabricated, manufactured, extracted, processed, cured, or aged.
(b) Trade or business within the United States 
For purposes of this part, part II, and chapter 3, the term trade or business within the United States includes the performance of personal services within the United States at any time within the taxable year, but does not include
(1) Performance of personal services for foreign employer 
The performance of personal services
(A) for a nonresident alien individual, foreign partnership, or foreign corporation, not engaged in trade or business within the United States, or
(B) for an office or place of business maintained in a foreign country or in a possession of the United States by an individual who is a citizen or resident of the United States or by a domestic partnership or a domestic corporation,

by a nonresident alien individual temporarily present in the United States for a period or periods not exceeding a total of 90 days during the taxable year and whose compensation for such services does not exceed in the aggregate $3,000.

(2) Trading in securities or commodities 

(A) Stocks and securities 

(i) In general Trading in stocks or securities through a resident broker, commission agent, custodian, or other independent agent.
(ii) Trading for taxpayers own account Trading in stocks or securities for the taxpayers own account, whether by the taxpayer or his employees or through a resident broker, commission agent, custodian, or other agent, and whether or not any such employee or agent has discretionary authority to make decisions in effecting the transactions. This clause shall not apply in the case of a dealer in stocks or securities.
(B) Commodities 

(i) In general Trading in commodities through a resident broker, commission agent, custodian, or other independent agent.
(ii) Trading for taxpayers own account Trading in commodities for the taxpayers own account, whether by the taxpayer or his employees or through a resident broker, commission agent, custodian, or other agent, and whether or not any such employee or agent has discretionary authority to make decisions in effecting the transactions. This clause shall not apply in the case of a dealer in commodities.
(iii) Limitation Clauses (i) and (ii) shall apply only if the commodities are of a kind customarily dealt in on an organized commodity exchange and if the transaction is of a kind customarily consummated at such place.
(C) Limitation 
Subparagraphs (A)(i) and (B)(i) shall apply only if, at no time during the taxable year, the taxpayer has an office or other fixed place of business in the United States through which or by the direction of which the transactions in stocks or securities, or in commodities, as the case may be, are effected.
(c) Effectively connected income, etc. 

(1) General rule 
For purposes of this title
(A) In the case of a nonresident alien individual or a foreign corporation engaged in trade or business within the United States during the taxable year, the rules set forth in paragraphs (2), (3), (4), (6), and (7) shall apply in determining the income, gain, or loss which shall be treated as effectively connected with the conduct of a trade or business within the United States.
(B) Except as provided in paragraph (6) or (7) or in section 871 (d) or sections 882 (d) and (e), in the case of a nonresident alien individual or a foreign corporation not engaged in trade or business within the United States during the taxable year, no income, gain, or loss shall be treated as effectively connected with the conduct of a trade or business within the United States.
(2) Periodical, etc., income from sources within United States—factors 
In determining whether income from sources within the United States of the types described in section 871 (a)(1), section 871(h), section 881 (a), or section 881 (c), or whether gain or loss from sources within the United States from the sale or exchange of capital assets, is effectively connected with the conduct of a trade or business within the United States, the factors taken into account shall include whether
(A) the income, gain, or loss is derived from assets used in or held for use in the conduct of such trade or business, or
(B) the activities of such trade or business were a material factor in the realization of the income, gain, or loss.

In determining whether an asset is used in or held for use in the conduct of such trade or business or whether the activities of such trade or business were a material factor in realizing an item of income, gain, or loss, due regard shall be given to whether or not such asset or such income, gain, or loss was accounted for through such trade or business.

(3) Other income from sources within United States 
All income, gain, or loss from sources within the United States (other than income, gain, or loss to which paragraph (2) applies) shall be treated as effectively connected with the conduct of a trade or business within the United States.
(4) Income from sources without United States 

(A) Except as provided in subparagraphs (B) and (C), no income, gain, or loss from sources without the United States shall be treated as effectively connected with the conduct of a trade or business within the United States.
(B) Income, gain, or loss from sources without the United States shall be treated as effectively connected with the conduct of a trade or business within the United States by a nonresident alien individual or a foreign corporation if such person has an office or other fixed place of business within the United States to which such income, gain, or loss is attributable and such income, gain, or loss
(i) consists of rents or royalties for the use of or for the privilege of using intangible property described in section 862 (a)(4) derived in the active conduct of such trade or business;
(ii) consists of dividends or interest, and either is derived in the active conduct of a banking, financing, or similar business within the United States or is received by a corporation the principal business of which is trading in stocks or securities for its own account; or
(iii) is derived from the sale or exchange (outside the United States) through such office or other fixed place of business of personal property described in section 1221 (a)(1), except that this clause shall not apply if the property is sold or exchanged for use, consumption, or disposition outside the United States and an office or other fixed place of business of the taxpayer in a foreign country participated materially in such sale. Any income or gain which is equivalent to any item of income or gain described in clause (i), (ii), or (iii) shall be treated in the same manner as such item for purposes of this subparagraph.
(C) In the case of a foreign corporation taxable under part I or part II of subchapter L, any income from sources without the United States which is attributable to its United States business shall be treated as effectively connected with the conduct of a trade or business within the United States.
(D) No income from sources without the United States shall be treated as effectively connected with the conduct of a trade or business within the United States if it either
(i) consists of dividends, interest, or royalties paid by a foreign corporation in which the taxpayer owns (within the meaning of section 958 (a)), or is considered as owning (by applying the ownership rules of section 958 (b)), more than 50 percent of the total combined voting power of all classes of stock entitled to vote, or
(ii) is subpart F income within the meaning of section 952 (a).
(5) Rules for application of paragraph (4)(B) 
For purposes of subparagraph (B) of paragraph (4)
(A) in determining whether a nonresident alien individual or a foreign corporation has an office or other fixed place of business, an office or other fixed place of business of an agent shall be disregarded unless such agent
(i)  has the authority to negotiate and conclude contracts in the name of the nonresident alien individual or foreign corporation and regularly exercises that authority or has a stock of merchandise from which he regularly fills orders on behalf of such individual or foreign corporation, and
(ii)  is not a general commission agent, broker, or other agent of independent status acting in the ordinary course of his business,
(B) income, gain, or loss shall not be considered as attributable to an office or other fixed place of business within the United States unless such office or fixed place of business is a material factor in the production of such income, gain, or loss and such office or fixed place of business regularly carries on activities of the type from which such income, gain, or loss is derived, and
(C) the income, gain, or loss which shall be attributable to an office or other fixed place of business within the United States shall be the income, gain, or loss property allocable thereto, but, in the case of a sale or exchange described in clause (iii) of such subparagraph, the income which shall be treated as attributable to an office or other fixed place of business within the United States shall not exceed the income which would be derived from sources within the United States if the sale or exchange were made in the United States.
(6) Treatment of certain deferred payments, etc. 
For purposes of this title, in the case of any income or gain of a nonresident alien individual or a foreign corporation which
(A) is taken into account for any taxable year, but
(B) is attributable to a sale or exchange of property or the performance of services (or any other transaction) in any other taxable year,

the determination of whether such income or gain is taxable under section 871 (b) or 882 (as the case may be) shall be made as if such income or gain were taken into account in such other taxable 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).

(7) Treatment of certain property transactions 
For purposes of this title, if
(A) any property ceases to be used or held for use in connection with the conduct of a trade or business within the United States, and
(B) such property is disposed of within 10 years after such cessation,

the determination of whether any income or gain attributable to such disposition is taxable under section 871 (b) or 882 (as the case may be) shall be made as if such sale or exchange occurred immediately before such cessation and without regard to the requirement that the taxpayer be engaged in a trade or business within the United States during the taxable year for which such income or gain is taken into account.

(d) Treatment of related person factoring income 

(1) In general 
For purposes of the provisions set forth in paragraph (2), if any person acquires (directly or indirectly) a trade or service receivable from a related person, any income of such person from the trade or service receivable so acquired shall be treated as if it were interest on a loan to the obligor under the receivable.
(2) Provisions to which paragraph (1) applies 
The provisions set forth in this paragraph are as follows:
(A) Section 904 (relating to limitation on foreign tax credit).
(B) Subpart F of part III of this subchapter (relating to controlled foreign corporations).
(3) Trade or service receivable 
For purposes of this subsection, the term trade or service receivable means any account receivable or evidence of indebtedness arising out of
(A) the disposition by a related person of property described in section 1221 (a)(1), or
(B) the performance of services by a related person.
(4) Related person 
For purposes of this subsection, the term related person means
(A) any person who is a related person (within the meaning of section 267 (b)), and
(B) any United States shareholder (as defined in section 951 (b)) and any person who is a related person (within the meaning of section 267 (b)) to such a shareholder.
(5) Certain provisions not to apply 

(A) Certain exceptions 
The following provisions shall not apply to any amount treated as interest under paragraph (1) or (6):
(i) Subparagraphs (A)(iii)(II), (B)(ii), and (C)(iii)(II) of section 904 (d)(2) (relating to exceptions for export financing interest).
(ii) Subparagraph (A) of section 954 (b)(3) (relating to exception where foreign base company income is less than 5 percent or $1,000,000).
(iii) Subparagraph (B) of section 954 (c)(2) (relating to certain export financing).
(iv) Clause (i) of section 954 (c)(3)(A) (relating to certain income received from related persons).
(B) Special rules for possessions 
An amount treated as interest under paragraph (1) shall not be treated as income described in subparagraph (A) or (B) of section 936 (a)(1) unless such amount is from sources within a possession of the United States (determined after the application of paragraph (1)).
(6) Special rule for certain income from loans of a controlled foreign corporation 
Any income of a controlled foreign corporation (within the meaning of section 957 (a)) from a loan to a person for the purpose of financing
(A) the purchase of property described in section 1221(a)(1) of a related person, or
(B) the payment for the performance of services by a related person,

shall be treated as interest described in paragraph (1).

(7) Exception for certain related persons doing business in same foreign country 
Paragraph (1) shall not apply to any trade or service receivable acquired by any person from a related person if
(A) the person acquiring such receivable and such related person are created or organized under the laws of the same foreign country and such related person has a substantial part of its assets used in its trade or business located in such same foreign country, and
(B) such related person would not have derived any foreign base company income (as defined in section 954 (a), determined without regard to section 954 (b)(3)(A)), or any income effectively connected with the conduct of a trade or business within the United States, from such receivable if it had been collected by such related person.
(8) Regulations 
The Secretary shall prescribe such regulations as may be necessary to prevent the avoidance of the provisions of this subsection or section 956 (b)(3).[1]
(e) Rules for allocating interest, etc. 
For purposes of this subchapter
(1) Treatment of affiliated groups 
The taxable income of each member of an affiliated group shall be determined by allocating and apportioning interest expense of each member as if all members of such group were a single corporation.
(2) Gross income method may not be used for interest 
All allocations and apportionments of interest expense shall be made on the basis of assets rather than gross income.
(3) Tax-exempt assets not taken into account 
For purposes of allocating and apportioning any deductible expense, any tax-exempt asset (and any income from such an asset) shall not be taken into account. A similar rule shall apply in the case of the portion of any dividend (other than a qualifying dividend as defined in section 243 (b)) equal to the deduction allowable under section 243 or 245 (a) with respect to such dividend and in the case of a like portion of any stock the dividends on which would be so deductible and would not be qualifying dividends (as so defined).
(4) Basis of stock in nonaffiliated 10-percent owned corporations adjusted for earnings and profits changes 

(A) In general 
For purposes of allocating and apportioning expenses on the basis of assets, the adjusted basis of any stock in a nonaffiliated 10-percent owned corporation shall be
(i) increased by the amount of the earnings and profits of such corporation attributable to such stock and accumulated during the period the taxpayer held such stock, or
(ii) reduced (but not below zero) by any deficit in earnings and profits of such corporation attributable to such stock for such period.
(B) Nonaffiliated 10-percent owned corporation 
For purposes of this paragraph, the term nonaffiliated 10-percent owned corporation means any corporation if
(i) such corporation is not included in the taxpayers affiliated group, and
(ii) members of such affiliated group own 10 percent or more of the total combined voting power of all classes of stock of such corporation entitled to vote.
(C) Earnings and profits of lower tier corporations taken into account 

(i) In general If, by reason of holding stock in a nonaffiliated 10-percent owned corporation, the taxpayer is treated under clause (iii) as owning stock in another corporation with respect to which the stock ownership requirements of clause (ii) are met, the adjustment under subparagraph (A) shall include an adjustment for the amount of the earnings and profits (or deficit therein) of such other corporation which are attributable to the stock the taxpayer is so treated as owning and to the period during which the taxpayer is treated as owning such stock.
(ii) Stock ownership requirements The stock ownership requirements of this clause are met with respect to any corporation if members of the taxpayers affiliated group own (directly or through the application of clause (iii)) 10 percent or more of the total combined voting power of all classes of stock of such corporation entitled to vote.
(iii) Stock owned through entities For purposes of this subparagraph, stock owned (directly or indirectly) by a corporation, partnership, or trust shall be treated as being owned proportionately by its shareholders, partners, or beneficiaries. Stock considered to be owned by a person by reason of the application of the preceding sentence, shall, for purposes of applying such sentence, be treated as actually owned by such person.
(D) Coordination with subpart F, etc. 
For purposes of this paragraph, proper adjustment shall be made to the earnings and profits of any corporation to take into account any earnings and profits included in gross income under section 951 or under any other provision of this title and reflected in the adjusted basis of the stock.
(5) Affiliated group 
For purposes of this subsection
(A) In general 
Except as provided in subparagraph (B), the term affiliated group has the meaning given such term by section 1504 (determined without regard to paragraph (4) of section 1504 (b)).
(B) Treatment of certain financial institutions 
For purposes of subparagraph (A), any corporation described in subparagraph (C) shall be treated as an includible corporation for purposes of section 1504 only for purposes of applying such section separately to corporations so described. This subparagraph shall not apply for purposes of paragraph (6).
(C) Description 
A corporation is described in this subparagraph if
(i) such corporation is a financial institution described in section 581 or 591,
(ii) the business of such financial institution is predominantly with persons other than related persons (within the meaning of subsection (d)(4)) or their customers, and
(iii) such financial institution is required by State or Federal law to be operated separately from any other entity which is not such an institution.
(D) Treatment of bank holding companies 
To the extent provided in regulations
(i) a bank holding company (within the meaning of section 2(a) of the Bank Holding Company Act of 1956), and
(ii) any subsidiary of a financial institution described in section 581 or 591 or of any bank holding company if such subsidiary is predominantly engaged (directly or indirectly) in the active conduct of a banking, financing, or similar business,

shall be treated as a corporation described in subparagraph (C).

(6) Allocation and apportionment of other expenses 
Expenses other than interest which are not directly allocable or apportioned to any specific income producing activity shall be allocated and apportioned as if all members of the affiliated group were a single corporation.
(7) Regulations 
The Secretary shall prescribe such regulations as may be necessary or appropriate to carry out the purposes of this section, including regulations providing
(A) for the resourcing of income of any member of an affiliated group or modifications to the consolidated return regulations to the extent such resourcing or modification is necessary to carry out the purposes of this section,
(B) for direct allocation of interest expense incurred to carry out an integrated financial transaction to any interest (or interest-type income) derived from such transaction,
(C) for the apportionment of expenses allocated to foreign source income among the members of the affiliated group and various categories of income described in section 904 (d)(1),
(D) for direct allocation of interest expense in the case of indebtedness resulting in a disallowance under section 246A,
(E) for appropriate adjustments in the application of paragraph (3) in the case of an insurance company, and
(F) that this subsection shall not apply for purposes of any provision of this subchapter to the extent the Secretary determines that the application of this subsection for such purposes would not be appropriate.
(f) Allocation of research and experimental expenditures 

(1) In general 
For purposes of sections 861 (b), 862 (b), and 863 (b), qualified research and experimental expenditures shall be allocated and apportioned as follows:
(A) Any qualified research and experimental expenditures expended solely to meet legal requirements imposed by a political entity with respect to the improvement or marketing of specific products or processes for purposes not reasonably expected to generate gross income (beyond de minimis amounts) outside the jurisdiction of the political entity shall be allocated only to gross income from sources within such jurisdiction.
(B) In the case of any qualified research and experimental expenditures (not allocated under subparagraph (A)) to the extent
(i) that such expenditures are attributable to activities conducted in the United States, 50 percent of such expenditures shall be allocated and apportioned to income from sources within the United States and deducted from such income in determining the amount of taxable income from sources within the United States, and
(ii) that such expenditures are attributable to activities conducted outside the United States, 50 percent of such expenditures shall be allocated and apportioned to income from sources outside the United States and deducted from such income in determining the amount of taxable income from sources outside the United States.
(C) The remaining portion of qualified research and experimental expenditures (not allocated under subparagraphs (A) and (B)) shall be apportioned, at the annual election of the taxpayer, on the basis of gross sales or gross income, except that, if the taxpayer elects to apportion on the basis of gross income, the amount apportioned to income from sources outside the United States shall at least be 30 percent of the amount which would be so apportioned on the basis of gross sales.
(2) Qualified research and experimental expenditures 
For purposes of this section, the term qualified research and experimental expenditures means amounts which are research and experimental expenditures within the meaning of section 174. For purposes of this paragraph, rules similar to the rules of subsection (c) of section 174 shall apply. Any qualified research and experimental expenditures treated as deferred expenses under subsection (b) of section 174 shall be taken into account under this subsection for the taxable year for which such expenditures are allowed as a deduction under such subsection.
(3) Special rules for expenditures attributable to activities conducted in space, etc. 

(A) In general 
Any qualified research and experimental expenditures described in subparagraph (B)
(i) if incurred by a United States person, shall be allocated and apportioned under this section in the same manner as if they were attributable to activities conducted in the United States, and
(ii) if incurred by a person other than a United States person, shall be allocated and apportioned under this section in the same manner as if they were attributable to activities conducted outside the United States.
(B) Description of expenditures 
For purposes of subparagraph (A), qualified research and experimental expenditures are described in this subparagraph if such expenditures are attributable to activities conducted
(i) in space,
(ii) on or under water not within the jurisdiction (as recognized by the United States) of a foreign country, possession of the United States, or the United States, or
(iii) in Antarctica.
(4) Affiliated group 

(A) Except as provided in subparagraph (B), the allocation and apportionment required by paragraph (1) shall be determined as if all members of the affiliated group (as defined in subsection (e)(5)) were a single corporation.
(B) For purposes of the allocation and apportionment required by paragraph (1)
(i) sales and gross income from products produced in whole or in part in a possession by an electing corporation (within the meaning of section 936 (h)(5)(E)), and
(ii) dividends from an electing corporation,

shall not be taken into account, except that this subparagraph shall not apply to sales of (and gross income and dividends attributable to sales of) products with respect to which an election under section 936 (h)(5)(F) is not in effect.

(C) The qualified research and experimental expenditures taken into account for purposes of paragraph (1) shall be adjusted to reflect the amount of such expenditures included in computing the cost-sharing amount (determined under section 936 (h)(5)(C)(i)(I)).
(D) The Secretary may prescribe such regulations as may be necessary to carry out the purposes of this paragraph, including regulations providing for the source of gross income and the allocation and apportionment of deductions to take into account the adjustments required by subparagraph (B) or (C).
(E) Paragraph (6) of subsection (e) shall not apply to qualified research and experimental expenditures.
(5) Regulations 
The Secretary shall prescribe such regulations as may be appropriate to carry out the purposes of this subsection, including regulations relating to the determination of whether any expenses are attributable to activities conducted in the United States or outside the United States and regulations providing such adjustments to the provisions of this subsection as may be appropriate in the case of cost-sharing arrangements and contract research.
(6) Applicability 
This subsection shall apply to the taxpayers first taxable year (beginning on or before August 1, 1994) following the taxpayers last taxable year to which Revenue Procedure 9256 applies or would apply if the taxpayer elected the benefits of such Revenue Procedure.
[1] See References in Text note below.

26 USC 865 - Source rules for personal property sales

(a) General rule 
Except as otherwise provided in this section, income from the sale of personal property
(1) by a United States resident shall be sourced in the United States, or
(2) by a nonresident shall be sourced outside the United States.
(b) Exception for inventory property 
In the case of income derived from the sale of inventory property
(1) this section shall not apply, and
(2) such income shall be sourced under the rules of sections 861 (a)(6), 862 (a)(6), and 863.

Notwithstanding the preceding sentence, any income from the sale of any unprocessed timber which is a softwood and was cut from an area in the United States shall be sourced in the United States and the rules of sections 862 (a)(6) and 863 (b) shall not apply to any such income. For purposes of the preceding sentence, the term unprocessed timber means any log, cant, or similar form of timber.

(c) Exception for depreciable personal property 

(1) In general 
Gain (not in excess of the depreciation adjustments) from the sale of depreciable personal property shall be allocated between sources in the United States and sources outside the United States
(A) by treating the same proportion of such gain as sourced in the United States as the United States depreciation adjustments with respect to such property bear to the total depreciation adjustments, and
(B) by treating the remaining portion of such gain as sourced outside the United States.
(2) Gain in excess of depreciation 
Gain (in excess of the depreciation adjustments) from the sale of depreciable personal property shall be sourced as if such property were inventory property.
(3) United States depreciation adjustments 
For purposes of this subsection
(A) In general 
The term United States depreciation adjustments means the portion of the depreciation adjustments to the adjusted basis of the property which are attributable to the depreciation deductions allowable in computing taxable income from sources in the United States.
(B) Special rule for certain property 
Except in the case of property of a kind described in section 168 (g)(4), if, for any taxable year
(i) such property is used predominantly in the United States, or
(ii) such property is used predominantly outside the United States,

all of the depreciation deductions allowable for such year shall be treated as having been allocated to income from sources in the United States (or, where clause (ii) applies, from sources outside the United States).

(4) Other definitions 
For purposes of this subsection
(A) Depreciable personal property 
The term depreciable personal property means any personal property if the adjusted basis of such property includes depreciation adjustments.
(B) Depreciation adjustments 
The term depreciation adjustments means adjustments reflected in the adjusted basis of any property on account of depreciation deductions (whether allowed with respect to such property or other property and whether allowed to the taxpayer or to any other person).
(C) Depreciation deductions 
The term depreciation deductions means any deductions for depreciation or amortization or any other deduction allowable under any provision of this chapter which treats an otherwise capital expenditure as a deductible expense.
(d) Exception for intangibles 

(1) In general 
In the case of any sale of an intangible
(A) this section shall apply only to the extent the payments in consideration of such sale are not contingent on the productivity, use, or disposition of the intangible, and
(B) to the extent such payments are so contingent, the source of such payments shall be determined under this part in the same manner as if such payments were royalties.
(2) Intangible 
For purposes of paragraph (1), the term intangible means any patent, copyright, secret process or formula, goodwill, trademark, trade brand, franchise, or other like property.
(3) Special rule in the case of goodwill 
To the extent this section applies to the sale of goodwill, payments in consideration of such sale shall be treated as from sources in the country in which such goodwill was generated.
(4) Coordination with subsection (c) 

(A) Gain not in excess of depreciation adjustments sourced under subsection (c) 
Notwithstanding paragraph (1), any gain from the sale of an intangible shall be sourced under subsection (c) to the extent such gain does not exceed the depreciation adjustments with respect to such intangible.
(B) Subsection (c)(2) not to apply to intangibles 
Paragraph (2) of subsection (c) shall not apply to any gain from the sale of an intangible.
(e) Special rules for sales through offices or fixed places of business 

(1) Sales by residents 

(A) In general 
In the case of income not sourced under subsection (b), (c), (d)(1)(B) or (3), or (f), if a United States resident maintains an office or other fixed place of business in a foreign country, income from sales of personal property attributable to such office or other fixed place of business shall be sourced outside the United States.
(B) Tax must be imposed 
Subparagraph (A) shall not apply unless an income tax equal to at least 10 percent of the income from the sale is actually paid to a foreign country with respect to such income.
(2) Sales by nonresidents 

(A) In general 
Notwithstanding any other provisions of this part, if a nonresident maintains an office or other fixed place of business in the United States, income from any sale of personal property (including inventory property) attributable to such office or other fixed place of business shall be sourced in the United States. The preceding sentence shall not apply for purposes of section 971 (defining export trade corporation).
(B) Exception 
Subparagraph (A) shall not apply to any sale of inventory property which is sold for use, disposition, or consumption outside the United States if an office or other fixed place of business of the taxpayer in a foreign country materially participated in the sale.
(3) Sales attributable to an office or other fixed place of business 
The principles of section 864 (c)(5) shall apply in determining whether a taxpayer has an office or other fixed place of business and whether a sale is attributable to such an office or other fixed place of business.
(f) Stock of affiliates 
If
(1) a United States resident sells stock in an affiliate which is a foreign corporation,
(2) such sale occurs in a foreign country in which such affiliate is engaged in the active conduct of a trade or business, and
(3) more than 50 percent of the gross income of such affiliate for the 3-year period ending with the close of such affiliates taxable year immediately preceding the year in which the sale occurred was derived from the active conduct of a trade or business in such foreign country,

any gain from such sale shall be sourced outside the United States. For purposes of paragraphs (2) and (3), the United States resident may elect to treat an affiliate and all other corporations which are wholly owned (directly or indirectly) by the affiliate as one corporation.

(g) United States resident; nonresident 
For purposes of this section
(1) In general 
Except as otherwise provided in this subsection
(A) United States resident 
The term United States resident means
(i) any individual who
(I) is a United States citizen or a resident alien and does not have a tax home (as defined in section 911 (d)(3)) in a foreign country, or
(II) is a nonresident alien and has a tax home (as so defined) in the United States, and
(ii) any corporation, trust, or estate which is a United States person (as defined in section 7701 (a)(30)).
(B) Nonresident 
The term nonresident means any person other than a United States resident.
(2) Special rules for United States citizens and resident aliens 
For purposes of this section, a United States citizen or resident alien shall not be treated as a nonresident with respect to any sale of personal property unless an income tax equal to at least 10 percent of the gain derived from such sale is actually paid to a foreign country with respect to that gain.
(3) Special rule for certain stock sales by residents of Puerto Rico 
Paragraph (2) shall not apply to the sale by an individual who was a bona fide resident of Puerto Rico during the entire taxable year of stock in a corporation if
(A) such corporation is engaged in the active conduct of a trade or business in Puerto Rico, and
(B) more than 50 percent of its gross income for the 3-year period ending with the close of such corporations taxable year immediately preceding the year in which such sale occurred was derived from the active conduct of a trade or business in Puerto Rico.

For purposes of the preceding sentence, the taxpayer may elect to treat a corporation and all other corporations which are wholly owned (directly or indirectly) by such corporation as one corporation.

(h) Treatment of gains from sale of certain stock or intangibles and from certain liquidations 

(1) In general 
In the case of gain to which this subsection applies
(A) such gain shall be sourced outside the United States, but
(B) subsections (a), (b), and (c) of section 904 and sections 902, 907, and 960 shall be applied separately with respect to such gain.
(2) Gain to which subsection applies 
This subsection shall apply to
(A) Gain from sale of certain stock or intangibles 
Any gain
(i) which is from the sale of stock in a foreign corporation or an intangible (as defined in subsection (d)(2)) and which would otherwise be sourced in the United States under this section,
(ii) which, under a treaty obligation of the United States (applied without regard to this section), would be sourced outside the United States, and
(iii) with respect to which the taxpayer chooses the benefits of this subsection.
(B) Gain from liquidation in possession 
Any gain which is derived from the receipt of any distribution in liquidation of a corporation
(i) which is organized in a possession of the United States, and
(ii) more than 50 percent of the gross income of which during the 3-taxable year period ending with the close of the taxable year immediately preceding the taxable year in which the distribution is received is from the active conduct of a trade or business in such possession.
(i) Other definitions 
For purposes of this section
(1) Inventory property 
The term inventory property means personal property described in paragraph (1) of section 1221 (a).
(2) Sale includes exchange 
The term sale includes an exchange or any other disposition.
(3) Treatment of possessions 
Any possession of the United States shall be treated as a foreign country.
(4) Affiliate 
The term affiliate means a member of the same affiliated group (within the meaning of section 1504 (a) without regard to section 1504 (b)).
(5) Treatment of partnerships 
In the case of a partnership, except as provided in regulations, this section shall be applied at the partner level.
(j) Regulations 
The Secretary shall prescribe such regulations as may be necessary or appropriate to carry out the purpose of this section, including regulations
(1) relating to the treatment of losses from sales of personal property,
(2) applying the rules of this section to income derived from trading in futures contracts, forward contracts, options contracts, and other instruments, and
(3) providing that, subject to such conditions (which may include provisions comparable to section 877) as may be provided in such regulations, subsections (e)(1)(B) and (g)(2) shall not apply for purposes of sections 931, 933, and 936.
(k) Cross references 

(1) For provisions relating to the characterization as dividends for source purposes of gains from the sale of stock in certain foreign corporations, see section 1248.
(2) For sourcing of income from certain foreign currency transactions, see section 988.