1. Short title This Act may be cited as the Refund Equality Act of 2017 . 2. Extension of period of limitation for certain legally married couples (a) In general Subsection (d) of section 6511 of the Internal Revenue Code of 1986 is amended by adding at the end the following new paragraph: (9) Rules relating to certain legally married couples (A) In general In the case of spouses— (i) who were married under state law (as such term is used in Revenue Ruling 2013–17) before September 16, 2013, and (ii) who were first treated as married for purposes of this title by the application of the holdings of Revenue Ruling 2013–17, with respect to the taxable year in which the marriage was entered into and any subsequent taxable year that, but for this paragraph, would be outside the 3-year period of limitation prescribed in subsection (a), such period shall be extended until the date prescribed by law (including extensions) for filing the return of tax for the taxable year that includes the date of the enactment of this paragraph.The preceding sentence shall apply only with respect to amendments to the return of tax, and claims for credit or refund, relating to a change in the marital status of such spouses. (B) Waiver of limit on amount of claim In the case of a claim for credit or refund which is allowed by reason of subparagraph (A), the amount of the refund may exceed the portion of the tax paid within the period provided in subsection (b)(2) to the extent of the amount of the overpayment attributable to the change in the marital status of the spouses. . (b) Filing of joint return for prior taxable year Section 6013 of the Internal Revenue Code of 1986 is amended by adding at the end the following new subsection: (i) Joint return after filing separate returns for certain legally married couples (1) In general If— (A) an individual has filed a separate return for a taxable year for which a joint return could have been made by the individual and the individual's spouse, but for the fact that the spouses were first