26 USC 511 - Imposition of tax on unrelated business income of charitable, etc., organizations

(a) Charitable, etc., organizations taxable at corporation rates 

(1) Imposition of tax 
There is hereby imposed for each taxable year on the unrelated business taxable income (as defined in section 512) of every organization described in paragraph (2) a tax computed as provided in section 11. In making such computation for purposes of this section, the term taxable income as used in section 11 shall be read as unrelated business taxable income.
(2) Organizations subject to tax 

(A) Organizations described in sections 401 (a) and 501 (c) 
The tax imposed by paragraph (1) shall apply in the case of any organization (other than a trust described in subsection (b) or an organization described in section 501 (c)(1)) which is exempt, except as provided in this part or part II (relating to private foundations), from taxation under this subtitle by reason of section 501 (a).
(B) State colleges and universities 
The tax imposed by paragraph (1) shall apply in the case of any college or university which is an agency or instrumentality of any government or any political subdivision thereof, or which is owned or operated by a government or any political subdivision thereof, or by any agency or instrumentality of one or more governments or political subdivisions. Such tax shall also apply in the case of any corporation wholly owned by one or more such colleges or universities.
(b) Tax on charitable, etc., trusts 

(1) Imposition of tax 
There is hereby imposed for each taxable year on the unrelated business taxable income of every trust described in paragraph (2) a tax computed as provided in section 1 (e). In making such computation for purposes of this section, the term taxable income as used in section 1 shall be read as unrelated business taxable income as defined in section 512.
(2) Charitable, etc., trusts subject to tax 
The tax imposed by paragraph (1) shall apply in the case of any trust which is exempt, except as provided in this part or part II (relating to private foundations), from taxation under this subtitle by reason of section 501 (a) and which, if it were not for such exemption, would be subject to subchapter J (sec. 641 and following, relating to estates, trusts, beneficiaries, and decedents).
(c) Special rule for section 501 (c)(2) corporations 
If a corporation described in section 501 (c)(2)
(1) pays any amount of its net income for a taxable year to an organization exempt from taxation under section 501 (a) (or which would pay such an amount but for the fact that the expenses of collecting its income exceed its income), and
(2) such corporation and such organization file a consolidated return for the taxable year,

such corporation shall be treated, for purposes of the tax imposed by subsection (a), as being organized and operated for the same purposes as such organization, in addition to the purposes described in section 501 (c)(2).