Dolan, J.
This is a petition for instructions by the trustee under a written declaration of trust, dated March 3, 1928, of certain real estate that had been conveyed to the trustees therein named by the respondent Charles C. Walker for the benefit of himself and the respondent Helene Walker. The case comes before us on her appeal from the decree entered in the Probate Court.
The case was heard upon the pleadings by the judge who made a report of material facts in which he found that the allegations of the petition (except as to a certain date agreed by the parties to be erroneous) and certain allegations of the answer of each of the respondents were true. Material facts are these: In March, 1928, the respondents, Mr. and Mrs. Walker, husband and wife, were living apart and contemplating divorce. Negotiations looking toward that end and toward a property settlement resulted in an agreement being entered into between the parties, through trustees, whereunder Mr. Walker undertook to pay Mrs. *327Walker $20,000 annually in quarterly instalments of $5,000 each and Mrs. Walker agreed to make no claim for alimony in any suit for divorce. The agreement further provided that payments made to Mrs. Walker by the trustees under the declaration of trust executed at the same time should diminish pro tanto the amount payable to her by Mr. Walker under the agreement. Mrs. Walker obtained a divorce from Mr. Walker on June 11, 192$. The property originally held by the trustees under the declaration of trust consisted of (1) a parcel of real estate located at 6 and 7 Arlington Street in Boston of the book value of $200,000; (2) a parcel of real estate numbered 172 North Michigan Avenue, Chicago, Illinois, of the book value of $400,000; and (3) real estate numbered 218 and 220 West Lake Street, Chicago, Illinois, of the book value of $120,000. Payments of $5,000 quarterly were made to Mrs. Walker by Mr. Walker or the trustees under the declaration of trust from the time of its execution in 1928 to and including the fourth quarter of 1931. The income then began to fall off, and in 1932, 1933, and 1934 was insufficient to pay the sum of $20,000, but the deficit was made up by Mr. Walker. His financial circumstances then became so straitened that he could make only comparatively small payments, and a considerable arrearage accumulated. As of October 3, 1940, the parties entered into a supplementary agreement abrogating (in consideration of a payment by Mr. Walker of $10,614.37) that part of the agreement concerning payments by Mr. Walker, and substituting an agreement in substance that, if any quarterly payment to Mrs. Walker by the trustees should amount to less than $1,500, Mr. Walker would make up the difference, not to exceed, however $750. The Arlington Street property was sold by the then trustees in May, 1929, for $185,000, which was turned over to Mr. Walker, the trustees receiving therefor from Mr. Walker certain notes secured by collateral which were later surrendered to him with Mrs. Walker’s consent. The property at 218-220 West Lake Street, Chicago, is still held under the declaration of trust. On April 5, 1943, the petitioner, which had become the sole trustee under *328the declaration of trust, sold the real estate at 172 North Michigan Avenue, Chicago, for a gross price of $50,000. The purchasers deducted $7,555 for taxes' for the year 1942 and part of the year 1943. After payment of other expenses of the sale, the petitioner received $39,844.18, deducted $7,555 (the taxes deducted by the purchasers) from income on hand, and entered $47,326 on its books as principal and net proceeds of the sale. ■ In each of the years 1941, 1942, and 1943 (up to April 5) the expenses of carrying the property exceeded the income, and the deficiencies were made up out of accumulated income that the trustee had on hand. Mrs. Walker did not receive any money from the trustee from January 1, 1941, to April 5, 1943, although the other trust property showed income of $8,155 for that period. During this period she did, however, receive $750 quarterly from Mr. Walker. At the inception of the trust the North Michigan Avenue property was productive. The question presented by the petitioner is whether any portion of the proceeds of the sale of that property is allocable to Mrs. Walker. The judge entered a decree instructing the petitioner that no part of the proceeds of the sale in question is to be treated or credited as income of the trust, and that no part of the principal of the trust estate held by the petitioner under the declaration of trust should be transferred to income because of losses sustained in connection with the real estate involved in the years 1941 and 1942, and in the period from January 1, 1943, to April 5, 1943.
The question presented for our consideration is governed by the same principles as those applicable to trusts created by will. The rights and duties of trustees as to the subject matter are the same whether the title be derived from a will or other written instrument. As was said in Harvard Trust Co. v. Duke, 304 Mass. 414, 416, “Whether expenses of a trust should be charged against principal or income is, of course, a matter to be determined by ascertaining the intent of the testator or settlor as expressed or implied in the will or settlement.” Thus it was tacitly recognized that the issue was the same without regard to whether the trust is testamentary in character or otherwise. The principles *329governing the apportionment in proper case of the proceeds of the sale of real estate held in trust are set forth most lately in such cases as Harvard Trust Co. v. Duke, 304 Mass. 414, Springfield Safe Deposit & Trust Co. v. Wade, 305 Mass. 36, McKechnie v. Springfield, 311 Mass. 406, Union Trust Co. v. Dexter, 311 Mass. 737, and Amerige v. Goddard, 316 Mass. 566. To repeat them here in detail would serve no useful purpose. It is sufficient in the present case to say that under those principles apportionment may not be made where a contrary intent on the part of a testator or settlor is shown by the terms of the instrument creating the trust.
In the present case, therefore, we must look to the terms of the instrument of trust to ascertain whether the settlor has indicated an intent that taxes and carrying charges in excess of the income from the real estate involved should be paid other than from the income of the trust estate. In the declaration of trust the trustees declared, so far as here material, that they held the premises conveyed in trust “on the terms and conditions hereinafter set forth: (a) To have, except as otherwise provided herein, the care, custody, management and possession of the said property; to collect the rents, profits and income thereof if there be any such; and, after deducting all charges, taxes, and expenses, including a reasonable compensation for their own services, to pay quarterly each year ... so much of the net income from the trust properties as shall have accrued on said date of payment up to five thousand dollars ($5,000), the total of such payments in any period of four quarters not to exceed twenty thousand dollars ($20,000) to Helene Walker, now the wife of Charles C. Walker, and to pay any net income remaining after said payments to Helene Walker have been so made, annually to the said Charles C. Walker”; and (c) “The trustees in relation to the trust property shall have power, in addition to any and all other powers and discretions herein and by the rules of law given, in their discretion to sell the trust property and retain the proceeds from such sale or reinvest said proceeds in such securities or property as they shall in their *330discretion deem best even though such securities and property are not of a character which is ordinarily considered as being a trust investment; to make and change investments from time to time in such securities and property as they shall in their discretion deem best even though such securities and property are not of a character which is ordinarily considered as being a trust investment; to retain or invest in shares of stock or securities at a price exceeding their par value and in their discretion to treat as income the whole or any part of the dividends or interest derived therefrom; and to determine what of the receipts of the trust is principal and what is income and what expenses of the trust should be charged to principal and what to income; to pay any assessments upon any of the securities comprised in the trust fund; to pay out as income as they see fit the whole or any part of the dividends of any wasting securities; and no trustee shall be liable for any loss arising from the holding of wasting or hazardous securities or other investments not usual for trust funds in the absence of fraud on his part . ”
The provisions of the declaration of trust demonstrate that the settlor intended that the net income that was to be payable to Mrs. Walker up to $20,000 annually was to be ascertained only "after deducting all charges, taxes and expenses,” including the reasonable compensation of the trustees. That was specifically provided in the trust instrument in clear and unambiguous terms. The provision is consistent with the other provisions of the declaration of trust concerning the powers of the trustees. It is in accord with the agreement between the parties through trustees, to secure the performance of which the deeds of conveyance and the declaration of trust were executed. The agreement was made a part of the declaration of trust. Reading these instruments as a whole, we think that it becomes obvious that the settlor anticipated that the net income (as defined in the declaration of trust) from the trust res might not be sufficient to produce the amount specified to be paid, and that it was for this reason that it was provided that the amount actually received as net income and paid to Mrs. *331Walker should diminish pro tanto the amount that Mr. Walker had obligated himself to pay under the agreement of the parties which was later modified as hereinbefore set forth. The broad power of retention of the trust property under the declaration of trust, while not necessarily conclusive in all cases (see Amerige v. Goddard, 316 Mass. 566, 572), nevertheless, read in the instant case with the precise definition of net income in the declaration of trust and the other broad powers of the trustees thereunder, is not without significance.
Since it was the expressed intent of the settlor that the payments provided to be made to Mrs. Walker under the declaration of trust were to be out of actual net income to be ascertained after deducting all charges, taxes and expenses, the decree entered in the Probate Court was right. See Green v. Crapo, 181 Mass. 55, 61. It would appear that the same result would be reached in Illinois where the parcel of real estate here involved was located. See Love v. Engelke, 368 Ill. 342.
Costs and expenses of this appeal may be allowed to the respondents or their counsel out of the principal of the trust estate in the discretion of the Probate- Court.
Decree affirmed.