§ 152.
(e)
Special rule for divorced parents, etc.
(1)
In general
Notwithstanding subsection (c)(1)(B), (c)(4), or (d)(1)(C), if—
(A)
a child receives over one-half of the child’s support during the calendar year from the child’s parents—
(i)
who are divorced or legally separated under a decree of divorce or separate maintenance,
(ii)
who are separated under a written separation agreement, or
(iii)
who live apart at all times during the last 6 months of the calendar year, and—
(B)
such child is in the custody of 1 or both of the child’s parents for more than one-half of the calendar year, such child shall be treated as being the qualifying child or qualifying relative of the noncustodial parent for a calendar year if the requirements described in paragraph (2) or (3) are met.
(2)
Exception where custodial parent releases claim to exemption for the year
For purposes of paragraph (1), the requirements described in this paragraph are met with respect to any calendar year if—
(A)
the custodial parent signs a written declaration (in such manner and form as the Secretary may by regulations prescribe) that such custodial parent will not claim such child as a dependent for any taxable year beginning in such calendar year, and
(B)
the noncustodial parent attaches such written declaration to the noncustodial parent’s return for the taxable year beginning during such calendar year.
(3)
Exception for certain pre-1985 instruments
(A)
In general
For purposes of paragraph (1), the requirements described in this paragraph are met with respect to any calendar year if—
(i)
a qualified pre-1985 instrument between the parents applicable to the taxable year beginning in such calendar year provides that the noncustodial parent shall be entitled to any deduction allowable under section 151 for such child, and
(ii)
the noncustodial parent provides at least $600 for the support of such child during such calendar year.
For purposes of this subparagraph, amounts expended for the support of a child or children shall be treated as received from the noncustodial parent to the extent that such parent provided amounts for such support.
(B)
Qualified pre-1985 instrument
For purposes of this paragraph, the term “qualified pre-1985 instrument” means any decree of divorce or separate maintenance or written agreement—
(i)
which is executed before January 1, 1985,
(ii)
which on such date contains the provision described in subparagraph (A)(i), and
(iii)
which is not modified on or after such date in a modification which expressly provides that this paragraph shall not apply to such decree or agreement.
(4)
Custodial parent and noncustodial parent
For purposes of this subsection—
(5)
Exception for multiple-support agreement
(6)
Special rule for support received from new spouse of parent
([Aug. 16, 1954, ch. 736], [68A Stat. 43]; [Aug. 9, 1955, ch. 693, § 2], [69 Stat. 626]; [Pub. L. 85–866, title I, § 4(a)]–(c), Sept. 2, 1958, [72 Stat. 1607]; [Pub. L. 86–376, § 1(a)], Sept. 23, 1959, [73 Stat. 699]; [Pub. L. 90–78, § 1], Aug. 31, 1967, [81 Stat. 191]; [Pub. L. 91–172, title IX, § 912(a)], Dec. 30, 1969, [83 Stat. 722]; [Pub. L. 92–580, § 1(a)], Oct. 27, 1972, [86 Stat. 1276]; [Pub. L. 94–455, title XIX], §§ 1901(a)(24), (b)(7)(B), (8)(A), 1906(b)(13)(A), title XXI, § 2139(a), Oct. 4, 1976, [90 Stat. 1767], 1794, 1834, 1932; [Pub. L. 98–369, div. A, title IV], §§ 423(a), 482(b)(2), July 18, 1984, [98 Stat. 799], 848; [Pub. L. 99–514, title I, § 104(b)(1)(B)], (3), title XIII, § 1301(j)(8), Oct. 22, 1986, [100 Stat. 2104], 2105, 2658; [Pub. L. 108–311, title II, § 201], Oct. 4, 2004, [118 Stat. 1169]; [Pub. L. 109–135, title IV, § 404(a)], Dec. 21, 2005, [119 Stat. 2632]; [Pub. L. 110–351, title V, § 501(a)], (b), (c)(2), Oct. 7, 2008, [122 Stat. 3979], 3980; [Pub. L. 115–97, title I, § 11051(b)(3)(B)], Dec. 22, 2017, [131 Stat. 2089].)