(a) General provisions—(1) Allocation of deductions. In computing the taxable income of a nonresident alien individual the deductions otherwise allowable shall be allowed only if, and to the extent that, they are connected with income from sources within the United States. No deduction shall be allowed in respect of any item, or portion thereof, which is not connected with income from such sources. For this purpose, the proper apportionment and allocation of the deductions with respect to sources of income within and without the United States shall be determined as provided in part I (section 861 and following), subchapter N, chapter 1 of the Code, and the regulations thereunder, except as may otherwise be provided by tax convention. Thus, from the items of gross income specifically from sources within the United States and from the items allocated thereto under the provisions of section 863(a), there shall be deducted (i) the expenses, losses, and other deductions which are connected with those items of income and are properly apportioned or allocated thereto, and (ii) a ratable part of any other expenses, losses, or deductions which are connected with those items of income but cannot definitely be allocated to some item or class of gross income. The ratable part shall be based upon the ratio of gross income from sources within the United States to the total gross income. See §§ 1.861-8 and 1.863-1. In the case of income partly from within and partly from without the United States the expenses, losses, and other deductions connected with income from sources within the United States shall also be deducted in the manner prescribed by §§ 1.863-2 through 1.863-5 in order to ascertain under section 863 the portion of the taxable income attributable to sources within the United States.
(2) Personal exemptions. The deductions for the personal exemptions allowed by section 151 or 642(b) shall not be taken into account for purposes of subparagraph (1) of this paragraph but shall be allowed to the extent provided by paragraphs (b) and (c) of this section.
(3) Adjusted gross income. The adjusted gross income of a nonresident alien individual shall be the gross income from sources within the United States, determined in accordance with § 1.871-7, minus the deductions prescribed by section 62 to the extent such deductions are allowed under this section in computing taxable income.
(4) Standard deduction. The standard deduction shall not be allowed in computing the taxable income of a nonresident alien individual. See section 142(b)(1) and the regulations thereunder.
(5) Exempt income. No deduction shall be allowed under this section for the amount of any item or part thereof allocable to a class or classes of exempt income, including income exempt by tax convention. See section 265 and the regulations thereunder.
(b) No United States business—(1) Income of not more than $15,400—(i) Deduction for losses only. A nonresident alien individual within class 1 shall not be allowed any deductions other than the deduction for losses from sales or exchanges of capital assets determined in the manner prescribed by paragraph (b)(4)(vii) of § 1.871-7. Thus, an individual within this class shall not be allowed any deductions for the personal exemptions otherwise allowed by section 151 or 642(b).
(ii) Source of losses. Notwithstanding the provisions of section 873(b)(1), losses from sales or exchanges of capital assets shall be allowed under this subparagraph only if allocable to sources within the United States. See paragraph (b)(4)(i) of § 1.871-7.
(2) Aggregate more than $15,400—(i) Deductions allowed. In computing the income subject to tax under section 1 or section 1201(b), a nonresident alien individual within class 2 shall be allowed deductions to the extent prescribed by paragraph (c)(3) of § 1.871-7, but subject to the limitations of this section. For this purpose, the deduction for the personal exemptions shall be allowed in accordance with subdivision (iii) of this subparagraph.
(ii) Deductions disallowed. In computing the minimum tax prescribed by section 871(b)(3), that individual shall not be allowed any deductions other than the deduction for losses from sales or exchanges of capital assets determined in the manner prescribed by paragraph (b)(4)(vii) of § 1.871-7. For this purpose, the deductions for the personal exemptions shall not be allowed. See paragraph (c)(4) of § 1.871-7.
(iii) Personal exemptions. When the deductions for personal exemptions are allowed under this subparagraph, only one exemption under section 151 shall be allowed in the case of an individual who is not a resident of Canada or Mexico. A resident of either of those countries shall be allowed all the exemptions granted by section 151 to the extent prescribed therein. An estate or trust, whether or not a resident of Canada or Mexico, shall determine its deduction for the personal exemption in accordance with section 642(b) and the regulations thereunder.
(iv) Source of losses. Notwithstanding the provisions of section 873(b), losses from sales or exchanges of capital assets shall be allowed under this subparagraph only if allocable to sources within the United States. See paragraph (c)(3)(i) of § 1.871-7.
(3) Election to be taxed on a net basis. Notwithstanding the other provisions of this paragraph, a nonresident alien individual within class 1 or 2 shall be allowed the deductions allowed by paragraph (c) of this section, if pursuant to a tax convention he is entitled, and does elect, to be subject to United States tax on a net basis as though he were engaged in trade or business within the United States through a permanent establishment situated therein.
(c) United States business—(1) Deductions in general. For purposes of computing the income subject to tax, a nonresident alien individual within class 3 shall be allowed deductions to the extent prescribed by paragraph (d) of § 1.871-7, but subject to the limitations of this section. For this purpose, the deductions for the personal exemptions shall be allowed in accordance with subparagraph (3) of this paragraph.
(2) Special deductions. Notwithstanding the rule of source prescribed in paragraph (a) of this section, an individual within class 3 shall be allowed the following deductions whether or not they are connected with income from sources within the United States:
(i) Losses on transactions for profit. Any loss sustained during the taxable year and not compensated for by insurance or otherwise, if incurred in any transaction entered into for profit, though not connected with a trade or business, shall be allowed to the extent allowed by section 165(c)(2), but only if and to the extent that the profit, if the transaction had resulted in a profit, would be taxable to such individual. Losses allowed under this subdivision shall be deducted in full, as provided in §§ 1.861-8 and 1.863-1, when the profit from the transaction, if it had resulted in a profit, would, under the provisions of section 861(a) or 863(a), have been taxable in full as income from sources within the United States; but shall be deducted under the provisions of § 1.863-3 when the profit from the transaction, if it had resulted in profit, would have been taxable only in part.
(ii) Casualty losses. Any loss of property not connected with a trade or business, sustained during the taxable year and not compensated for by insurance or otherwise, if the loss arises from fire, storm, shipwreck, or other casualty, or from theft, shall be allowed to the extent allowed by section 165(c)(3), but only if the loss is of property within the United States. Losses allowed under this subdivision shall be deducted in full, as provided in §§ 1.861-8 and 1.863-1, from the items of gross income specified under sections 861(a) and 863(a) as being derived in full from sources within the United States; but, if greater than the sum of those items, the unabsorbed loss shall be deducted from the income apportioned under the provisions of § 1.863-3 to sources within the United States.
(iii) Charitable contributions. The deduction for charitable contributions and gifts, to the extent allowed by section 170, shall be allowed under this subparagraph, but only as to contributions or gifts made to domestic corporations, or to community chests, funds, or foundations, created in the United States.
(3) Personal exemptions. Only one exemption under section 151 shall be allowed in the case of an individual who is not a resident of Canada or Mexico. A resident of either of those countries shall be allowed all the exemptions granted by section 151 to the extent prescribed therein. An estate or trust, whether or not a resident of Canada or Mexico, shall determine its deduction for the personal exemption in accordance with section 642(b) and the regulations thereunder.