26 USC 513 - Unrelated trade or business

(a) General rule 
The term unrelated trade or business means, in the case of any organization subject to the tax imposed by section 511, any trade or business the conduct of which is not substantially related (aside from the need of such organization for income or funds or the use it makes of the profits derived) to the exercise or performance by such organization of its charitable, educational, or other purpose or function constituting the basis for its exemption under section 501 (or, in the case of an organization described in section 511 (a)(2)(B), to the exercise or performance of any purpose or function described in section 501 (c)(3)), except that such term does not include any trade or business
(1) in which substantially all the work in carrying on such trade or business is performed for the organization without compensation; or
(2) which is carried on, in the case of an organization described in section 501 (c)(3) or in the case of a college or university described in section 511 (a)(2)(B), by the organization primarily for the convenience of its members, students, patients, officers, or employees, or, in the case of a local association of employees described in section 501 (c)(4) organized before May 27, 1969, which is the selling by the organization of items of work-related clothes and equipment and items normally sold through vending machines, through food dispensing facilities, or by snack bars, for the convenience of its members at their usual places of employment; or
(3) which is the selling of merchandise, substantially all of which has been received by the organization as gifts or contributions.
(b) Special rule for trusts 
The term unrelated trade or business means, in the case of
(1) a trust computing its unrelated business taxable income under section 512 for purposes of section 681; or
(2) a trust described in section 401 (a), or section 501 (c)(17), which is exempt from tax under section 501 (a);

any trade or business regularly carried on by such trust or by a partnership of which it is a member.

(c) Advertising, etc., activities 
For purposes of this section, the term trade or business includes any activity which is carried on for the production of income from the sale of goods or the performance of services. For purposes of the preceding sentence, an activity does not lose identity as a trade or business merely because it is carried on within a larger aggregate of similar activities or within a larger complex of other endeavors which may, or may not, be related to the exempt purposes of the organization. Where an activity carried on for profit constitutes an unrelated trade or business, no part of such trade or business shall be excluded from such classification merely because it does not result in profit.
(d) Certain activities of trade shows, State fairs, etc. 

(1) General rule 
The term unrelated trade or business does not include qualified public entertainment activities of an organization described in paragraph (2)(C), or qualified convention and trade show activities of an organization described in paragraph (3)(C).
(2) Qualified public entertainment activities 
For purposes of this subsection
(A) Public entertainment activity 
The term public entertainment activity means any entertainment or recreational activity of a kind traditionally conducted at fairs or expositions promoting agricultural and educational purposes, including, but not limited to, any activity one of the purposes of which is to attract the public to fairs or expositions or to promote the breeding of animals or the development of products or equipment.
(B) Qualified public entertainment activity 
The term qualified public entertainment activity means a public entertainment activity which is conducted by a qualifying organization described in subparagraph (C) in
(i) conjunction with an international, national, State, regional, or local fair or exposition,
(ii) accordance with the provisions of State law which permit the activity to be operated or conducted solely by such an organization, or by an agency, instrumentality, or political subdivision of such State, or
(iii) accordance with the provisions of State law which permit such an organization to be granted a license to conduct not more than 20 days of such activity on payment to the State of a lower percentage of the revenue from such licensed activity than the State requires from organizations not described in section 501 (c)(3), (4), or (5).
(C) Qualifying organization 
For purposes of this paragraph, the term qualifying organization means an organization which is described in section 501 (c) (3), (4), or (5) which regularly conducts, as one of its substantial exempt purposes, an agricultural and educational fair or exposition.
(3) Qualified convention and trade show activities 

(A) Convention and trade show activities 
The term convention and trade show activity means any activity of a kind traditionally conducted at conventions, annual meetings, or trade shows, including, but not limited to, any activity one of the purposes of which is to attract persons in an industry generally (without regard to membership in the sponsoring organization) as well as members of the public to the show for the purpose of displaying industry products or to stimulate interest in, and demand for, industry products or services, or to educate persons engaged in the industry in the development of new products and services or new rules and regulations affecting the industry.
(B) Qualified convention and trade show activity 
The term qualified convention and trade show activity means a convention and trade show activity carried out by a qualifying organization described in subparagraph (C) in conjunction with an international, national, State, regional, or local convention, annual meeting, or show conducted by an organization described in subparagraph (C) if one of the purposes of such organization in sponsoring the activity is the promotion and stimulation of interest in, and demand for, the products and services of that industry in general or to educate persons in attendance regarding new developments or products and services related to the exempt activities of the organization, and the show is designed to achieve such purpose through the character of the exhibits and the extent of the industry products displayed.
(C) Qualifying organization 
For purposes of this paragraph, the term qualifying organization means an organization described in section 501 (c)(3), (4), (5), or (6) which regularly conducts as one of its substantial exempt purposes a show which stimulates interest in, and demand for, the products of a particular industry or segment of such industry or which educates persons in attendance regarding new developments or products and services related to the exempt activities of the organization.
(4) Such activities not to affect exempt status 
An organization described in section 501 (c) (3), (4), or (5) shall not be considered as not entitled to the exemption allowed under section 501 (a) solely because of qualified public entertainment activities conducted by it.
(e) Certain hospital services 
In the case of a hospital described in section 170 (b)(1)(A)(iii), the term unrelated trade or business does not include the furnishing of one or more of the services described in section 501 (e)(1)(A) to one or more hospitals described in section 170 (b)(1)(A)(iii) if
(1) such services are furnished solely to such hospitals which have facilities to serve not more than 100 inpatients;
(2) such services, if performed on its own behalf by the recipient hospital, would constitute activities in exercising or performing the purpose or function constituting the basis for its exemption; and
(3) such services are provided at a fee or cost which does not exceed the actual cost of providing such services, such cost including straight line depreciation and a reasonable amount for return on capital goods used to provide such services.
(f) Certain bingo games 

(1) In general 
The term unrelated trade or business does not include any trade or business which consists of conducting bingo games.
(2) Bingo game defined 
For purposes of paragraph (1), the term bingo game means any game of bingo
(A) of a type in which usually
(i) the wagers are placed,
(ii) the winners are determined, and
(iii) the distribution of prizes or other property is made,

in the presence of all persons placing wagers in such game,

(B) the conducting of which is not an activity ordinarily carried out on a commercial basis, and
(C) the conducting of which does not violate any State or local law.
(g) Certain pole rentals 
In the case of a mutual or cooperative telephone or electric company, the term unrelated trade or business does not include engaging in qualified pole rentals (as defined in section 501 (c)(12)(D)).
(h) Certain distributions of low cost articles without obligation to purchase and exchanges and rentals of member lists 

(1) In general 
In the case of an organization which is described in section 501 and contributions to which are deductible under paragraph (2) or (3) of section 170 (c), the term unrelated trade or business does not include
(A) activities relating to the distribution of low cost articles if the distribution of such articles is incidental to the solicitation of charitable contributions, or
(B) any trade or business which consists of
(i) exchanging with another such organization names and addresses of donors to (or members of) such organization, or
(ii) renting such names and addresses to another such organization.
(2) Low cost article defined 
For purposes of this subsection
(A) In general 
The term low cost article means any article which has a cost not in excess of $5 to the organization which distributes such item (or on whose behalf such item is distributed).
(B) Aggregation rule 
If more than 1 item is distributed by or on behalf of an organization to a single distributee in any calendar year, the aggregate of the items so distributed in such calendar year to such distributee shall be treated as 1 article for purposes of subparagraph (A).
(C) Indexation of $5 amount 
In the case of any taxable year beginning in a calendar year after 1987, the $5 amount in subparagraph (A) shall be increased by an amount equal to
(i) $5, multiplied by
(ii) the cost-of-living adjustment determined under section 1 (f)(3) for the calendar year in which the taxable year begins, by substituting calendar year 1987 for calendar year 1992 in subparagraph (B) thereof.
(3) Distribution which is incidental to the solicitation of charitable contributions described 
For purposes of this subsection, any distribution of low cost articles by an organization shall be treated as a distribution incidental to the solicitation of charitable contributions only if
(A) such distribution is not made at the request of the distributee,
(B) such distribution is made without the express consent of the distributee, and
(C) the articles so distributed are accompanied by
(i) a request for a charitable contribution (as defined in section 170 (c)) by the distributee to such organization, and
(ii) a statement that the distributee may retain the low cost article regardless of whether such distributee makes a charitable contribution to such organization.
(i) Treatment of certain sponsorship payments 

(1) In general 
The term unrelated trade or business does not include the activity of soliciting and receiving qualified sponsorship payments.
(2) Qualified sponsorship payments 
For purposes of this subsection
(A) In general 
The term qualified sponsorship payment means any payment made by any person engaged in a trade or business with respect to which there is no arrangement or expectation that such person will receive any substantial return benefit other than the use or acknowledgement of the name or logo (or product lines) of such persons trade or business in connection with the activities of the organization that receives such payment. Such a use or acknowledgement does not include advertising such persons products or services (including messages containing qualitative or comparative language, price information, or other indications of savings or value, an endorsement, or an inducement to purchase, sell, or use such products or services).
(B) Limitations 

(i) Contingent payments The term qualified sponsorship payment does not include any payment if the amount of such payment is contingent upon the level of attendance at one or more events, broadcast ratings, or other factors indicating the degree of public exposure to one or more events.
(ii) Safe harbor does not apply to periodicals and qualified convention and trade show activities The term qualified sponsorship payment does not include
(I) any payment which entitles the payor to the use or acknowledgement of the name or logo (or product lines) of the payors trade or business in regularly scheduled and printed material published by or on behalf of the payee organization that is not related to and primarily distributed in connection with a specific event conducted by the payee organization, or
(II) any payment made in connection with any qualified convention or trade show activity (as defined in subsection (d)(3)(B)).
(3) Allocation of portions of single payment 
For purposes of this subsection, to the extent that a portion of a payment would (if made as a separate payment) be a qualified sponsorship payment, such portion of such payment and the other portion of such payment shall be treated as separate payments.
(j) Debt management plan services 
The term unrelated trade or business includes the provision of debt management plan services (as defined in section 501 (q)(4)(B)) by any organization other than an organization which meets the requirements of section 501 (q).