669.4. For the purposes of the first paragraph of section 669.3, the amount that may be designated by a trust under that section in respect of a taxation year shall not exceed the amount determined by the formula
(A − B) × C / D.
In the formula provided for in the first paragraph, (a) A is the aggregate of all amounts each of which is an amount that i. is not deductible in computing the trust’s income for the year, but that would be deductible were it not for section 144, or
ii. is required to be included in computing the trust’s income for the year under section 89 or 425 or because of an amount designated under section 669.3 by another trust;
(b) B is the aggregate of all amounts each of which is an amount that i. is deductible in computing the trust’s income for the year under section 145, otherwise than because of the membership of the trust in a partnership, or
ii. is not included in computing the trust’s income for the year, but that would be deductible were it not for section 486;
(c) C is the aggregate of all amounts each of which is a portion of the trust’s income for the year, determined without reference to the provisions of this Act, that is payable in the year to a beneficiary of the trust or that is required to be included in computing the income of such a beneficiary for the year under section 662; and
(d) D is the trust’s income for the year, determined without reference to the provisions of this Act.