1. Short title This Act may be cited as the Student Agriculture Protection Act of 2017 . 2. Exclusion of certain gain by student farmers from gross income (a) In general Part III of subchapter B of chapter 1 of the Internal Revenue Code of 1986 is amended by inserting after section 139F the following new section: 139G. Gain from property produced or raised by a student farmer (a) In general In the case of a student farmer, gross income shall not include so much of the gain from qualified dispositions during the taxable year as does not exceed $5,000. (b) Definitions For purposes of this section— (1) Student farmer The term student farmer means an individual who has not attained age 19 and who is enrolled in— (A) a program established by the National FFA Organization, (B) a 4–H Club or other program established by 4–H, or (C) any student agriculture program similar in nature to a club or program described in subparagraph (A) or (B) which is under the direction or guidance of an agricultural educator, advisor, or club leader. (2) Qualified disposition (A) In general The term qualified disposition means a sale or exchange of qualified property by or on behalf of a student farmer (determined as of the date of the sale or exchange) which occurs— (i) during an activity of a type described in paragraph (2)(B) or (3)(B) of section 513(d), or (ii) under the supervision of a program described in subparagraph (A), (B), or (C) of paragraph (1). (B) Qualified property For purposes of subparagraph (A), the term qualified property means personal property, including livestock, crops, and agricultural mechanics or shop projects, produced or raised— (i) by the student farmer by or on behalf of whom the sale or exchange is made, and (ii) under the supervision of a program described in subparagraph (A), (B), or (C) of paragraph (1). . (b) Conforming amendment The table of sections for part III of subchapter B of chapter 1 of the Internal Revenue Code of 1986 is amended by inserting after the item relating to section 139F the