To amend the Internal Revenue Code of 1986 to improve 529 plans.

SECTION 1. COMPUTER TECHNOLOGY AND EQUIPMENT ALLOWED AS A QUALIFIED 
              HIGHER EDUCATION EXPENSE FOR SECTION 529 ACCOUNTS.

    (a) Made Permanent.--Clause (iii) of section 529(e)(3)(A) of the 
Internal Revenue Code of 1986 is amended by striking ``in 2009 or 
2010''.
    (b) Only for Use Primarily by the Beneficiary.--Clause (iii) of 
section 529(e)(3)(A) of such Code is amended by striking ``used by the 
beneficiary and the beneficiary's family'' and inserting ``used 
primarily by the beneficiary''.
    (c) Effective Date.--The amendments made by this section shall 
apply to expenses paid or incurred after December 31, 2010.

SEC. 2. INVESTMENT DIRECTION UNDER QUALIFIED TUITION PROGRAMS.

    (a) In General.--Paragraph (4) of section 529(b) of the Internal 
Revenue Code of 1986 is amended by striking the period at the end and 
inserting ``more frequently than 4 times per calendar year.''.
    (b) Clerical Amendment.--The heading for paragraph (4) of section 
529(b) of such Code is amended by striking ``No investment direction'' 
and inserting ``Limited investment direction''.
    (c) Effective Date.--The amendments made by this section shall 
apply to years beginning after December 31, 2013.

SEC. 3. ELIMINATION OF DISTRIBUTION AGGREGATION REQUIREMENTS.

    (a) In General.--Clause (ii) of section 529(c)(3)(D) of the 
Internal Revenue Code of 1986 is amended by inserting before the comma 
at the end the following: ``, except for purposes of calculating the 
earnings portion of any distribution.''.
    (b) Effective Date.--The amendment made by this section shall apply 
to distributions after December 31, 2013.

SEC. 4. CONTRIBUTION OF AMOUNTS PREVIOUSLY DISTRIBUTED IN CASE OF 
              WITHDRAWAL FROM SCHOOL.

    (a) In General.--Paragraph (3) of section 529(c) of the Internal 
Revenue Code of 1986 is amended by adding at the end the following new 
subparagraph:
                    ``(E) Special rule for contributions relating to 
                withdrawal from school.--In the case of a beneficiary 
                who receives a refund of any qualified higher education 
                expenses from an eligible educational institution in 
                connection with withdrawal from enrollment at such 
                institution, subparagraph (A) shall not apply to that 
                portion of any distribution for the taxable year which 
                is recontributed to a qualified tuition program of 
                which such individual is a beneficiary, but only to the 
                extent such recontribution is made not later than 60 
                days after the date of such refund and does not exceed 
                the refunded amount.''.
    (b) Effective Date.--The amendment made by this section shall apply 
with respect to distributions after December 31, 2013.

SEC. 5. SPECIAL ROLLOVER TO ROTH IRA FROM LONG-TERM QUALIFIED TUITION 
              PROGRAM.

    (a) In General.--Paragraph (3) of section 529(c) of the Internal 
Revenue Code of 1986, as amended by this Act, is amended by adding at 
the end the following new subparagraph:
                    ``(F) Special rollover to roth ira from long-term 
                qualified tuition program.--For purposes of this 
                section--
                            ``(i) In general.--In the case of a 
                        distribution from a qualified tuition program 
                        which has been maintained by an account owner 
                        for the 10-year period ending on the date of 
                        such distribution--
                                    ``(I) subparagraph (A) shall not 
                                apply to any portion of such 
                                distribution which, not later than 60 
                                days after such distribution, is paid 
                                into a Roth IRA maintained for the 
                                benefit of such account owner or the 
                                designated beneficiary under such 
                                qualified tuition program, and
                                    ``(II) such portion shall be 
                                treated as a rollover contribution for 
                                purposes of section 408A(e).
                            ``(ii) Limitation.--Clause (i) shall only 
                        apply to so much of any distribution as does 
                        not exceed the lesser of--
                                    ``(I) $25,000, or
                                    ``(II) the aggregate amount 
                                contributed to the program (and 
                                earnings attributable thereto) before 
                                the 5-year period ending on the date of 
                                the distribution.''.
    (b) Qualified Rollover Contribution.--Paragraph (1) of section 
408A(e) of such Code is amended by striking the period at the end of 
subparagraph (B) and inserting ``, and'' and by inserting after 
subparagraph (B) the following new subparagraph:
                    ``(C) from a covered qualified tuition program (as 
                defined in section 529(c)(3)(F)(ii)).''.
    (c) Effective Date.--The amendments made by this section shall 
apply with respect to distributions after December 31, 2013.

Summary: Amends the Internal Revenue Code, with respect to tax-exempt qualified tuition programs (529 plans), to: (1) make permanent the allowance for computer technology and equipment expenses and require that such technology and equipment&nbsp;be used primarily by the plan beneficiary (formerly, beneficiary and beneficiary's family); (2) allow contributors to a 529 plan or a plan beneficiary to direct plan investments, but not more frequently than four times per calendar year; (3) permit a recontribution to a 529 plan&nbsp;of amounts refunded to a student who withdraws from an educational institution&nbsp;if the recontribution is made not later than 60 days after the date of such refund and does not exceed the refunded amount; and (4) allow&nbsp;tax-free rollovers to a Roth individual retirement account (Roth IRA) of distributions from a qualified tuition program which has been maintained by&nbsp;the account holder for a 10-year period.