1986 is amended by adding at the end the following new item: Sec. 45T. STEM internship credit. . (e) Effective date The amendments made by this section shall apply to taxable years beginning after December 31, 2017. 5. STEM apprenticeship tax credit (a) In general Subpart D of part IV of subchapter A of chapter 1 of the Internal Revenue Code of 1986, as amended by section 4, is amended by adding at the end the following new section: 45U. STEM apprenticeship credit (a) General rule For purposes of section 38, in the case of an eligible employer the STEM apprenticeship credit determined under this section for the taxable year is an amount equal to the taxpayer’s aggregate STEM credit amount for the taxable year. (b) Limitation The total amount of the credit allowed under subsection (a) to a taxpayer for a taxable year may not exceed $50,000. (c) STEM credit amount For purposes of subsection (a), the STEM credit amount with respect to an individual shall be— (1) $2,000 in the case of a new apprentice, (2) $3,000 in the case of a mid-career apprentice, (3) $3,000 in the case of a unemployed apprentice, and (4) 5,000 in the case of a completed apprenticeship employee. (d) Definitions For purposes of subsection (a)— (1) Eligible employer (A) In general The term eligible employer means an employer who employed on average not more than 500 full-time employees on business days during the preceding calendar year. For purposes of the preceding sentence, any individual with respect to whom a credit is allowed under this section shall not be taken into account. (B) Rules for determining employer size For purposes of subparagraph (A)— (i) Application of aggregation rule for employers All persons treated as a single employer under subsection (b), (c), (m), or (o) of section 414 shall be treated as 1 employer. (ii) Employers not in existence in preceding year In the case of an employer which was not in existence throughout the preceding calendar year, the determination of whether such employer is an eligible employer shall be