ratio to the amount so allowable as— (i) the amount (if any) by which the taxpayer’s adjusted gross income exceeds the dollar amount in effect under clause (i) of section 23(b)(2)(A), bears to (ii) $40,000. (B) Determination of adjusted gross income For purposes of subparagraph (A), adjusted gross income shall be determined without regard to sections 911, 931, and 933. (3) Denial of double benefit (A) In general No credit shall be allowed under subsection (a) for any expense for which a deduction or credit is taken under any other provision of this chapter. (B) Grants No credit shall be allowed under subsection (a) for any expense to the extent that reimbursement or other funds in compensation for such expense are received under any Federal, State, or local program. (C) Insurance reimbursement No credit shall be allowed under subsection (a) for any expense to the extent that payment for such expense is made, or reimbursement for such expense is received, under any insurance policy. (c) Carryforwards of unused credit (1) Rule for years in which all personal credits allowed against regular and alternative minimum tax If the credit allowable under subsection (a) exceeds the limitation imposed by section 26(a)(2) for such taxable year reduced by the sum of the credits allowable under this subpart (other than this section), such excess shall be carried to the succeeding taxable year and added to the credit allowable under subsection (a) for such succeeding taxable year. (2) Limitation No credit may be carried forward under this subsection to any taxable year after the 5th taxable year after the taxable year in which the credit arose. For purposes of the preceding sentence, credits shall be treated as used on a first-in, first-out basis. (d) Qualified infertility treatment expenses For purposes of this section: (1) In general The term qualified infertility treatment expenses means amounts paid or incurred for the treatment of infertility via in vitro fertilization if such treatment is— (A) provided by a licensed