In general
The aggregate credits allowed to a taxpayer under subpart C shall be increased by the lesser of—
(A) the credit which would be allowed under this section without regard to this subsection and the limitation under section 26(a) or
(B) the amount by which the aggregate amount of credits allowed by this subpart (determined without regard to this subsection) would increase if the limitation imposed by section 26(a) were increased by the greater of— (i) 15 percent of so much of the taxpayer’s earned income (within the meaning of section 32) which is taken into account in computing taxable income for the taxable year as exceeds $3,000, or (ii) in the case of a taxpayer with 3 or more qualifying children, the excess (if any) of— (I) the taxpayer’s social security taxes for the taxable year, over (II) the credit allowed under section 32 for the taxable year.
The amount of the credit allowed under this subsection shall not be treated as a credit allowed under this subpart and shall reduce the amount of credit otherwise allowable under subsection (a) without regard to section 26(a). For purposes of subparagraph (B), any amount excluded from gross income by reason of section 112 shall be treated as earned income which is taken into account in computing taxable income for the taxable year.