SECTION 1. SHORT TITLE.

    This Act may be cited as the ``Farm Risk Abatement and Mitigation 
Election Act of 2012'' or the ``FRAME Act of 2012''.

SEC. 2. FARM RISK MANAGEMENT ACCOUNTS.

    (a) In General.--Part VII of subchapter B of chapter 1 of the 
Internal Revenue Code of 1986 (relating to additional itemized 
deductions for individuals) is amended by redesignating section 224 as 
section 225 and by inserting after section 223 the following new 
section:

``SEC. 224. FRAME ACCOUNTS.

    ``(a) Deduction Allowed.--In the case of a qualified farmer, there 
shall be allowed as a deduction for the taxable year an amount equal to 
the aggregate amount paid in cash during such taxable year by or on 
behalf of such individual to a FRAME account of such individual.
    ``(b) Limitation.--The amount allowable as a deduction under 
subsection (a) shall not exceed the least of the following:
            ``(1) The taxable income of the taxpayer for the taxable 
        year which is attributable to farming and ranching.
            ``(2) $50,000.
            ``(3) $500,000 reduced by the aggregate contributions of 
        the taxpayer to all FRAME accounts of the taxpayer for all 
        taxable years.
    ``(c) Qualified Farmer.--For purposes of this section, the term 
`qualified farmer' means, with respect to any taxable year, any 
individual who, during such year--
            ``(1) was actively engaged in the trade or business of 
        farming or ranching, and
            ``(2) has in effect an agreement with the Secretary of 
        Agriculture with respect to each FRAME account of which the 
        individual is an account beneficiary.
    ``(d) FRAME Account.--For purposes of this section--
            ``(1) In general.--The term `FRAME account' means a trust 
        created or organized in the United States as a FRAME account 
        exclusively for the purpose of making qualified distributions, 
        but only if the written governing instrument creating the trust 
        meets the following requirements:
                    ``(A) No contribution will be accepted unless it is 
                in cash.
                    ``(B) The trustee is a bank (as defined in section 
                408(n)) or another person who demonstrates to the 
                satisfaction of the Secretary that the manner in which 
                such person will administer the trust will be 
                consistent with the requirements of this section.
                    ``(C) The assets of the trust will not be 
                commingled with other property except in a common trust 
                fund or common investment fund.
                    ``(D) The interest of an individual in the balance 
                in his account is nonforfeitable.
            ``(2) Qualified distribution.--The term `qualified 
        distribution' means any of the following amounts paid from a 
        FRAME account to the account beneficiary:
                    ``(A) Any distributions in a taxable year during 
                which the gross income attributable to farm to which 
                the FRAME account relates is less than 95 percent of 
                the average gross income attributable to such farm for 
                the 5 preceding taxable years, but only so much as does 
                not exceed such difference.
                    ``(B) Any distributions to the extent such 
                distribution does not exceed amounts necessary to 
                protect the solvency of the farm to which the FRAME 
                account relates, as determined by the Secretary.
                    ``(C) Any distributions to the extent such 
                distributions do not exceed amounts paid or incurred to 
                procure revenue or crop insurance with respect to the 
                farm to which the FRAME account relates.
            ``(3) Account beneficiary.--The term `account beneficiary' 
        means the individual on whose behalf the FRAME account was 
        established.
            ``(4) Accounts per farm limitation.--The Secretary of 
        Agriculture shall have in effect not more than 4 agreements for 
        FRAME accounts with respect to any farm. The Secretary of 
        Agriculture shall by regulation prescribe rules preventing the 
        avoidance of the preceding limitation through use of multiple 
        entities, related parties, division of farms, or de minimis 
        ownership.
            ``(5) Other rules.--Rules similar to the following rules 
        shall apply for purposes of this section:
                    ``(A) Section 219(d)(2) (relating to no deduction 
                for rollovers).
                    ``(B) Section 219(f)(3) (relating to time when 
                contributions deemed made).
                    ``(C) Section 408(g) (relating to community 
                property laws).
                    ``(D) Section 408(h) (relating to custodial 
                accounts).
    ``(e) Tax Treatment of Accounts.--
            ``(1) In general.--A FRAME account is exempt from taxation 
        under this subtitle unless such account has ceased to be a 
        FRAME account. Notwithstanding the preceding sentence, any such 
        account is subject to the taxes imposed by section 511 
        (relating to imposition of tax on unrelated business income of 
        charitable, etc. organizations).
            ``(2) Termination of accounts.--If the account beneficiary 
        ceases to engage in the trade or business of farming or 
        ranching--
                    ``(A) all FRAME accounts of such individual shall 
                cease to be such accounts, and
                    ``(B) the balance of all such accounts shall be 
                treated as--
                            ``(i) distributed to such individual, and
                            ``(ii) not paid in a qualified 
                        distribution.
    ``(f) Tax Treatment of Distributions.--
            ``(1) In general.--Any amount paid or distributed out of a 
        FRAME account (other than a rollover contribution described in 
        paragraph (4)) shall be included in gross income.
            ``(2) Additional tax on non-qualified distributions.--
                    ``(A) In general.--The tax imposed by this chapter 
                on the account beneficiary for any taxable year in 
                which there is a payment or distribution from a FRAME 
                account of such beneficiary which is not a qualified 
                distribution shall be increased by 20 percent of the 
                amount of such payment or distribution which is not a 
                qualified distribution.
                    ``(B) Exception for disability or death.--
                Subparagraph (A) shall not apply if the payment or 
                distribution is made after the account beneficiary 
                becomes disabled within the meaning of section 72(m)(7) 
                or dies.
            ``(3) Excess contributions returned before due date of 
        return.--
                    ``(A) In general.--If any excess contribution is 
                contributed for a taxable year to a FRAME account of an 
                individual, paragraph (2) shall not apply to 
                distributions from the FRAME accounts of such 
                individual (to the extent such distributions do not 
                exceed the aggregate excess contributions to all such 
                accounts of such individual for such year) if--
                            ``(i) such distribution is received by the 
                        individual on or before the last day prescribed 
                        by law (including extensions of time) for 
                        filing such individual's return for such 
                        taxable year, and
                            ``(ii) such distribution is accompanied by 
                        the amount of net income attributable to such 
                        excess contribution.
                Any net income described in clause (ii) shall be 
                included in the gross income of the individual for the 
                taxable year in which it is received.
                    ``(B) Excess contribution.--For purposes of 
                subparagraph (A), the term `excess contribution' means 
                any contribution (other than a rollover contribution) 
                which is not deductible under this section.
            ``(4) Rollover contribution.--An amount is described in 
        this paragraph as a rollover contribution if it meets the 
        requirements of subparagraphs (A) and (B).
                    ``(A) In general.--For purposes of this section, 
                any amount paid or distributed from a FRAME account to 
                the account beneficiary shall be treated as a qualified 
                distribution to the extent the amount received is paid 
                into a FRAME account for the benefit of such 
                beneficiary not later than the 60th day after the day 
                on which the beneficiary receives the payment or 
                distribution.
                    ``(B)  Limitation.--This paragraph shall not apply 
                to any amount described in subparagraph (A) received by 
                an individual from a FRAME account if, at any time 
                during the 1-year period ending on the day of such 
                receipt, such individual received any other amount 
                described in subparagraph (A) from a FRAME account 
                which was not included in the individual's gross income 
                because of the application of this paragraph.
            ``(5) Transfer of account incident to divorce.--The 
        transfer of an individual's interest in a FRAME account to an 
        individual's spouse or former spouse under a divorce or 
        separation instrument described in subparagraph (A) of section 
        71(b)(2) shall not be considered a taxable transfer made by 
        such individual notwithstanding any other provision of this 
        subtitle, and such interest shall, after such transfer, be 
        treated as a FRAME account with respect to which such spouse is 
        the account beneficiary.
            ``(6) Treatment after death of account beneficiary.--
                    ``(A) Treatment in case of individual designated 
                beneficiary.--If any individual acquires such 
                beneficiary's interest in a FRAME account by reason of 
                being the designated beneficiary of such account at the 
                death of the account beneficiary, such FRAME account 
                shall be treated as if such individual were the account 
                beneficiary.
                    ``(B) Other cases.--
                            ``(i) In general.--If, by reason of the 
                        death of the account beneficiary, any person 
                        acquires the account beneficiary's interest in 
                        a FRAME account in a case to which subparagraph 
                        (A) does not apply--
                                    ``(I) such account shall cease to 
                                be a FRAME account as of the date of 
                                death, and
                                    ``(II) an amount equal to the fair 
                                market value of the assets in such 
                                account on such date shall be included 
                                if such person is not the estate of 
                                such beneficiary, in such person's 
                                gross income for the taxable year which 
                                includes such date, or if such person 
                                is the estate of such beneficiary, in 
                                such beneficiary's gross income for the 
                                last taxable year of such beneficiary.
                            ``(ii) Deduction for estate taxes.--An 
                        appropriate deduction shall be allowed under 
                        section 691(c) to any person (other than the 
                        decedent or the decedent's spouse) with respect 
                        to amounts included in gross income under 
                        clause (i) by such person.
    ``(g) Reports.--The Secretary may require the trustee of a FRAME 
account to make such reports regarding such account to the Secretary 
and to the account beneficiary with respect to contributions, 
distributions, and such other matters as the Secretary determines 
appropriate. The reports required by this subsection shall be filed at 
such time and in such manner and furnished to such individuals at such 
time and in such manner as may be required by the Secretary.''.
    (b) Deduction Allowed Whether or Not Individual Itemizes Other 
Deductions.--Subsection (a) of section 62 of such Code is amended by 
inserting after paragraph (20) the following new paragraph:
            ``(21) FRAME accounts.--The deduction allowed by section 
        224.''.
    (c) Tax on Excess Contributions.--Section 4973 of such Code 
(relating to tax on excess contributions to certain tax-favored 
accounts and annuities) is amended--
            (1) by striking ``or'' at the end of subsection (a)(4), by 
        inserting ``or'' at the end of subsection (a)(5), and by 
        inserting after subsection (a)(5) the following new paragraph:
            ``(6) a FRAME account (within the meaning of section 
        224(d)),'', and
            (2) by adding at the end the following new subsection:
    ``(h) Excess Contributions to FRAME Accounts.--For purposes of this 
section, in the case of FRAME accounts (within the meaning of section 
224(d)), the term `excess contribution' means the sum of--
            ``(1) the aggregate amount contributed for the taxable year 
        to the accounts (other than rollover contributions described in 
        section 224(f)(4)) which is not allowable as a deduction under 
        section 224 for such year, and
            ``(2) the amount determined under this subsection for the 
        preceding taxable year, reduced by the sum of--
                    ``(A) the distributions out of the accounts with 
                respect to which additional tax was imposed under 
                section 224(f)(2), and
                    ``(B) the excess (if any) of--
                            ``(i) the maximum amount allowable as a 
                        deduction under section 224(b) for the taxable 
                        year, over
                            ``(ii) the amount contributed to the 
                        accounts for the taxable year.
        For purposes of this subsection, any contribution which is 
        distributed out of the FRAME account in a distribution to which 
        section 224(f)(3) applies shall be treated as an amount not 
        contributed.''.
    (d) Tax on Prohibited Transactions.--
            (1) Section 4975(c) of such Code (relating to tax on 
        prohibited transactions) is amended by adding at the end the 
        following new paragraph:
            ``(7) Special rule for frame accounts.--An individual for 
        whose benefit a FRAME account (within the meaning of section 
        224(d)) is established shall be exempt from the tax imposed by 
        this section with respect to any transaction concerning such 
        account (which would otherwise be taxable under this section) 
        if, with respect to such transaction, the account ceases to be 
        a FRAME account by reason of the application of section 
        224(e)(2) to such account.''.
            (2) Section 4975(e)(1) of such Code is amended by 
        redesignating subparagraphs (F) and (G) as subparagraphs (G) 
        and (H), respectively, and by inserting after subparagraph (E) 
        the following new subparagraph:
                    ``(F) a FRAME account described in section 
                224(d),''.
    (e) Failure To Provide Reports on FRAME Accounts.--Section 
6693(a)(2) of such Code (relating to reports) is amended by 
redesignating subparagraphs (D) and (E) as subparagraphs (E) and (F), 
respectively, and by inserting after subparagraph (C) the following new 
subparagraph:
                    ``(D) section 224(g) (relating to FRAME 
                accounts),''.
    (f) Clerical Amendment.--The table of sections for part VII of 
subchapter B of chapter 1 of such Code is amended by striking the last 
item and inserting the following:

``Sec. 224. FRAME accounts.
``Sec. 225. Cross reference.''.
    (g) Effective Date.--The amendments made by this section shall 
apply to taxable years beginning after the date of the enactment of 
this Act.

SEC. 3. FRAME CONTRIBUTION CREDIT.

    (a) In General.--Subpart D of part IV of subchapter A of chapter 1 
of the Internal Revenue Code of 1986 is amended by adding at the end 
the following new section:

``SEC. 45S. FRAME CONTRIBUTION CREDIT.

    ``(a) General Rule.--For purposes of section 38, in the case of a 
qualified farmer (as defined in section 224(c)), the FRAME contribution 
credit determined under this section for any taxable year is an amount 
equal to the applicable percentage of the taxpayer's contributions to 
any FRAME account of the taxpayer.
    ``(b) Applicable Percentage.--For purposes of subsection (a), the 
applicable percentage is--
            ``(1) in the case of the taxable year during which the 
        first FRAME account of the taxpayer is established, and the 2nd 
        and 3rd taxable years thereafter, 10 percent,
            ``(2) in the case of the 4th through 5th taxable years 
        thereafter, 5 percent, and
            ``(3) in the case of the 7th through 9th taxable years 
        thereafter, 3.5 percent.
    ``(c) Limitation.--Only contributions for which a deduction is 
allowed under section 224 shall be taken into account under this 
section.''.
    (b) Credit Made Part of General Business Credit.--Subsection (b) of 
section 38 of such Code is amended by striking ``plus'' at the end of 
paragraph (35), by striking the period at the end of paragraph (36) and 
inserting ``, plus'', and by adding at the end the following new 
paragraph:
            ``(37) the FRAME contribution credit determined under 
        section 45S(a).''.
    (c) Clerical Amendment.--The table of sections for subpart D of 
part IV of subchapter A of chapter 1 of such Code is amended by adding 
at the end the following new item:

``Sec. 45S. FRAME contribution credit.''.
    (d) Effective Date.--The amendments made by this section shall 
apply to taxable years beginning after the date of the enactment of 
this Act.
Farm Risk Abatement and Mitigation Election Act of 2012 or the FRAME Act of 2012 - Amends the Internal Revenue Code to: (1) establish tax-exempt farm risk management accounts (FRAME Accounts) and allow taxpayers actively engaged in the business of farming or ranching to use distributions from such accounts to protect the solvency of the farm to which the FRAME Account relates and to procure revenue or crop insurance; (2) allow a deduction from gross income for cash contributions to such accounts; (3) specify minimum levels of contributions to, and maximum levels of distributions from, such accounts; (4) set forth tax rules relating to account distributions, excess contributions, and prohibited transactions; and (5) allow a variable business-related tax credit for contributions made to a FRAME Account in the first nine years after such Account is established.
To amend the Internal Revenue Code of 1986 to authorize agricultural producers to establish and contribute to tax-exempt farm risk management accounts.