Sec. 665 Definitions applicable to subpart D
(a) Undistributed net income. For purposes of this subpart, the term "undistributed net income" for any taxable year means the amount by which the distributable net income of the trust for such taxable year exceeds the sum of--
(1) the amounts for such taxable year specified in paragraphs (1) and (2) of section 661(a), and
(2) the amount of taxes imposed on the trust attributable to such distributable net income.
(b) Accumulation distribution. For purposes of this subpart, except as provided in subsection (c), the term "accumulation distribution" means, for any taxable year of the trust, the amount by which--
(1) the amounts specified in paragraph (2) of section 661(a) for such taxable year, exceed
(2) distributable net income for such year reduced (but not below zero) by the amounts specified in paragraph (1) of section 661(a).
For purposes of section 667 (other than subsection (c) thereof, relating to multiple trusts), the amounts specified in paragraph (2) of section 661(a) shall not include amounts properly paid, credited, or required to be distributed to a beneficiary from a trust (other than a foreign trust) as income accumulated before the birth of such beneficiary or before such beneficiary attains the age of 21. If the amounts properly paid, credited, or required to be distributed by the trust for the taxable year do not exceed the income of the trust for such year, there shall be no accumulation distribution for such year.
(c) Exception for accumulation distributions from certain domestic trusts. For purposes of this subpart--
(1) In general. In the case of a qualified trust, any distribution in any taxable year beginning after the date of the enactment of this subsection shall be computed without regard to any undistributed net income.
(2) Qualified trust. For purposes of this subsection, the term "qualified trust" means any trust other than--
(A) a foreign trust (or, except as provided in regulations, a domestic trust which at any time was a foreign trust), or
(B) a trust created before March 1, 1984, unless it is established that the trust would not be aggregated with other trusts under section 643(f) if such section applied to such trust.
(d) Taxes imposed on the trust. For purposes of this subpart--
(1) In general. The term "taxes imposed on the trust" means the amount of the taxes which are imposed for any taxable year of the trust under this chapter (without regard to this subpart or part IV of subchapter A) and which, under regulations prescribed by the Secretary, are properly allocable to the undistributed portions of distributable net income and gains in excess of losses from sales or exchanges of capital assets. The amount determined in the preceding sentence shall be reduced by any amount of such taxes deemed distributed under section 666(b) and (c) to any beneficiary.
(2) Foreign trusts. In the case of any foreign trust, the term "taxes imposed on the trust" includes the amount, reduced as provided in the last sentence of paragraph (1), of any income, war profits, and excess profits taxes imposed by any foreign country or possession of the United States on such foreign trust which, as determined under paragraph (1), are so properly allocable. Under rules or regulations prescribed by the Secretary, in the case of any foreign trust of which the settlor or another person would be treated as owner of any portion of the trust under subpart E but for section 672(f), the term "taxes imposed on the trust' includes the allocable amount of any income, war profits, and excess profits taxes imposed by any foreign country or possession of the United States on the settlor or such other person in respect of trust income.
(e) Preceding taxable year. For purposes of this subpart--
(1) In the case of a foreign trust created by a United States person, the term "preceding taxable year" does not include any taxable year of the trust to which this part does not apply.
(2) In the case of a preceding taxable year with respect to which a trust qualified, without regard to this subpart, under the provisions of subpart B, for purposes of the application of this subpart to such trust for such taxable year, such trust shall, in accordance with regulations prescribed by the Secretary, be treated as a trust to which subpart C applies.