
192 Cal.App.3d 1436 (1987)
238 Cal. Rptr. 154
CALIFORNIA ACADEMY OF SCIENCES, Plaintiff and Respondent,
v.
COUNTY OF FRESNO, Defendant and Appellant.
Docket No. F007291.
Court of Appeals of California, Fifth District.
June 26, 1987.
*1438 COUNSEL
Max E. Robinson, County Counsel, and Pamela A. Stone, Deputy County Counsel, for Defendant and Appellant.
Morrison & Foerster, Albin C. Koch, Jerry M. Custis and Robin Shapiro for Plaintiff and Respondent.
OPINION
FRANSON, Acting P.J.

STATEMENT OF THE CASE
Robert L. Smith, Burnham Enersen and Bank of America NT & SA as executors of the will of William H. Noble (decedent) prosecuted this action on behalf of the respondent California Academy of Sciences (Academy), residuary legatee under the decedent's will and the real party in interest, for refund of real property taxes paid to appellant County of Fresno (County) during probate administration.
The Academy is a nonprofit corporation organized under California law for the advancement of science and the maintenance of a free museum in Golden Gate Park, San Francisco. Under article XIII, section 4, subdivision (c) of the California Constitution and section 203.5 of the Revenue and Taxation Code, all real and personal property "owned by" the Academy is exempt from ad valorem property taxation. (Prior to Nov. 5, 1974, this exemption was contained in art. IX, § 12 of the Cal. Const.)
The executors moved for a summary judgment on their complaint contending that the sole question of whether the Academy was entitled to a refund of real property taxes paid during the estate administration was one of law. Specifically, the executors claimed that the Academy became the owner of a one-third interest in the real property immediately upon the decedent's death, thereby making the Academy's residuary interest exempt *1439 from taxation during probate administration. The County responded by contending that the Academy could not have owned the real property for tax exemption purposes until the administration of the estate was concluded. Since the nonliquid assets of the estate, including the land, were sold during the estate's administration, the Academy never owned an interest in the land, and it could not claim a tax exemption.
The trial court granted the motion for summary judgment finding the Academy owned the real property at the time the taxes were assessed and ordered appellant to refund the taxes to the Academy in the amount of $285,929.55 plus interest of $192,391.87 for a total of $478,321.42. Judgment was entered accordingly. We affirm.

STATEMENT OF FACTS
The decedent, William H. Noble, a prominent agricultural businessman and Fresno County landowner, died in San Francisco, California, in 1973 at the age of 81. He left a will which was admitted to probate in the San Francisco Superior Court. Smith, Enersen, and Bank of America NT & SA were appointed executors of the will. The executors filed inventories and appraisements in the probate court valuing the total assets of the estate at $49,941,510. The assets other than cash were sold during administration at a net gain of $1,274,937.62 over the appraised value. The sales proceeds were commingled with other income and distributed to the beneficiaries.
The decedent's will contained numerous specific and pecuniary bequests. It then gave the residuary estate "in equal shares to those of the following institutions which shall qualify as charitable transferees to which bequests are deductible under the federal estate tax and state inheritance tax laws applicable to my estate: 1. CALIFORNIA ACADEMY OF SCIENCES ...; 2. THE FINE ARTS MUSEUMS OF SAN FRANCISCO ...; AND 3. THE HOOVER INSTITUTION ON WAR, REVOLUTION AND PEACE...."
In a decree of preliminary distribution, the probate court found the Academy qualified as a residuary legatee under "Article Nine" of the decedent's will. During the estate's administration, the executors paid all taxes on Fresno County real property owned by the decedent at his death. The executors paid $267,049.70 for the 1974-1975 tax year, $198,190.15 for the 1975-1976 tax year, $265,632.35 for the 1976-1977 tax year, and $153,876.15 for the 1977-1978 tax year.
The executors timely filed verified claims on behalf of the Academy for refund of one-third of the taxes based on the Academy's asserted ownership of an undivided interest in the real property. The board took no action on *1440 any of the claims, and after four years they were deemed denied by operation of law. (Rev. & Tax. Code, § 5141, subd. (b).)

DISCUSSION
(1a) The basic issue is whether the Academy owned a one-third interest in the decedent's real property at the time the taxes were assessed by the County.
Title to a decedent's property passes to the person or persons to whom it is devised or bequeathed subject to the possession of the executor and to the control of the superior court for the purpose of administration. (Prob. Code, § 300.) If the will does not specifically devise real property, title to the realty passes to the residuary legatee. (See former Prob. Code, § 126.)[1] If there are several residuary legatees under the will, each takes an interest as tenant in common unless the will specifies otherwise. (Former Prob. Code, § 29.) Finally, title presumptively passes at the time of death and not at the time of distribution. (Former Prob. Code, § 28.) Thus, under these statutory provisions, the Academy and the other residuary legatees became the owners of an undivided interest in the decedent's real property at the time of the decedent's death. (See Noble v. Beach (1942) 21 Cal.2d 91, 94 [130 P.2d 426]; Matter of Estate of Woodworth (1867) 31 Cal. 595, 604-605, 618; Fountain v. Bank of America (1952) 109 Cal. App.2d 90, 94-95 [240 P.2d 414].)
(2a) (See fn. 2.), (1b) Although no California case has specifically applied the above-stated principle in the context of a tax exemption claimed by a charity for real property subject to probate administration,[2] out-of-state cases have consistently recognized the exemption. For example, in People ex rel. Crook v. Wells (1904) 179 N.Y. 257 [71 N.E. 1126], the decedent made certain specific bequests and then gave the residue of his property to the Brooklyn Masonic Guild, a corporate charity. The issue was whether $85,000 in personal property left in the residue was exempt from taxation *1441 while in the administrator's hands. After finding that the residuary estate vested in the charity at the moment of the testator's death, the New York high court said: "It is [argued] that, since the property had not, at the time of the assessment, been paid over or delivered to the [charitable] corporation, but was still in the hands of the executor, it was properly taxed within the authority of this section ... but this argument overlooks one very important consideration, and that is that, in order to bring the case within the section [permitting assessment of an executor], the property held by the executor must be taxable property; and the property in question was not taxable at any time after the death of the testator, whether in the hands of the executor or in the hands of the corporation." (Id. at p. 1127, italics added; see also People ex rel. Andrews v. Cameron (1910) 140 App.Div. 76 [124 N.Y.S. 949, affd. (1911) 200 N.Y. 585 [94 N.E. 1097]; People ex rel. Untermyer v. McGregor (1946) 295 N.Y. 237 [66 N.E.2d 292; People ex rel. National Commercial Bank v. Lewis (1942) 179 Misc. 140 [39 N.Y.S.2d 64].)
Although the New York cases cited above involved personal property, other state courts have dealt with both real and personal property left to residuary charitable legatees and have reached a similar conclusion. (See Ellsworth College v. Emmet County (1912) 156 Iowa 52 [135 N.W. 594]; State v. Felts (1925) 151 Tenn. 390 [270 S.W. 77]; Norton's Ex'rs v. City of Louisville (1904) 118 Ky. 836 [82 S.W. 621].)
These cases demonstrate that where the residue of an estate is bequeathed to a tax exempt institution, the taxing authority is not permitted to tax the residuary legatee's interest in the property while the estate is being administered. The reason is clear  it would diminish the charity's property while in the executor's hands, thereby defeating the legislative intent to exempt these organizations from taxation.
The County's multitudinous arguments that: the Academy did not have full ownership of the real property when it was taxed because there were specific legacies, creditors' claims and administration expenses to be paid before the residue could be determined and distributed; the proceeds from the sale of the real property were never identified or traced into the residuary estate; and the Academy did not have control or possession of the real property or its sales proceeds until distribution of the residuary estate, all miss the mark. There simply is no requirement under California law that the Academy prove anything more than its ownership of the property at the time of the tax assessments. (2b) Unlike the typical charity, the Academy occupies a unique status: it need not use its property for charitable purposes to qualify for the tax exemption. (See Cal. Const., art. XIII, § 4, subd. (c); Rev. & Tax. Code, §§ 203.5, 214.)
*1442 (1c) The County's argument that the Academy did not own the real property because Revenue and Taxation Code sections 405, subdivision (a), and 982 allowed the County to assess and tax the property to the executors is answered by the clear language of the statutes.[3] Section 405, subdivision (a) only empowers the assessor to assess "taxable property" in the hands of the executor or administrator. Section 982 does not expand this concept; it merely authorizes the assessment to be made to "heirs, guardians, ... executors, or administrators" of undistributed or unpartitioned property. (3) Because an executor is not the owner of the estate's assets, any tax assessment on the property in the executor's name is only in his or her capacity as a representative of the estate. (County of Los Angeles v. Morrison (1940) 15 Cal.2d 368, 371-372 [101 P.2d 470, 129 A.L.R. 443]; Luckhardt v. Mooradian (1949) 92 Cal. App.2d 501, 516 [207 P.2d 579]; see also 33 Ops. Cal.Atty.Gen. 179 (1959).)
(4) We also reject appellant's waiver and estoppel arguments because the County failed to raise them as affirmative defenses in its answer. A party who fails to plead affirmative defenses waives them. (Sinai v. Mull (1947) 80 Cal. App.2d 277, 283 [181 P.2d 924]; City etc. of San Francisco v. City Investment Corp. (1971) 15 Cal. App.3d 1031, 1037 [93 Cal. Rptr. 690].)
The County's arguments that the executors failed to comply with certain procedures in filing the claims for refund are without merit. Our review of the record indicates that all procedural requirements of the California Constitution and the Revenue and Taxation Code were followed by the executors.
(5) Finally, we reject appellant's belated argument asserted for the first time at oral argument on appeal that the doctrine of equitable conversion prevented the Academy from having any interest in the real property at the time it was taxed. The doctrine is set forth in former Probate Code section 124: "When a will directs the conversion of real property into money, such property and all its proceeds must be deemed personal property from the time of the testator's death."
Equitable conversion is a doctrinal device employed by equity courts to produce a fair result. In the probate context it is invoked to accomplish a *1443 testator's intent and to benefit the beneficiaries. (Estate of Gracey (1927) 200 Cal. 482, 490 [253 P. 921].) The basis of the doctrine is that equity regards as done that which ought to be done. (Reiner v. Hermann (1947) 79 Cal. App.2d 543, 546 [180 P.2d 385].)
In the present case, article 11 of decedent's will contemplates that the executors would eventually sell the real property but it does not specifically direct the sale of such property. The decedent stated he was aware that it might take several years to convert the principal assets of his estate including the real property "into a form suitable for distribution to the charitable institutions...." He then provided, "If ... my executors are unable to sell or otherwise dispose of said property for a price and in a manner which they deem to be for the advantage of my estate and the persons and institutions interested therein within a reasonable time after my death, my executor[s] shall, ... in their absolute discretion deal with and dispose of my residuary estate in either of the following ways: (1) ... distribute my residuary estate to the trustees hereinafter named ...; or (2)... distribute my residuary estate in cash or in kind or both outright and free of any trust hereunder to the charitable institutions entitled thereto...." (Italics added.) The testator then concluded, "I have made this provision for alternate distribution at the discretion of my executors for the sole purpose of assuring that the charitable institutions ... shall receive the maximum value and benefit from the assets of my residuary estate." (Italics added.)
The discretionary authority granted to the executors to sell the real property does not permit the application of the equitable conversion doctrine. (Estate of Gracey, supra, 200 Cal. at p. 489.) To apply the doctrine to deprive the Academy of its tax exemption would defeat the decedent's expressed intent that the Academy receive the maximum value from the assets of the estate.
The judgment is affirmed.
Woolpert, J., and Ballantyne, J., concurred.
A petition for a rehearing was denied July 21, 1987, and appellant's petition for review by the Supreme court was denied September 16, 1987.
NOTES
[1]  Former Probate Code provisions governing wills, succession, simultaneous death, and administration of estates were repealed by Statutes 1983, chapter 842, operative January 1, 1985, and replaced by Probate Code section 6100 et seq. However, the new code sections apply only where the testator died on or after January 1, 1985. The law applicable prior to January 1, 1985, continues to apply where the testator died before January 1, 1985. (Prob. Code, § 6103.)
[2]  As respondent notes, there is a simple explanation for this dearth of authority. California affords most charities a much narrower tax exemption than the broad exemption granted to the Academy. A typical charity's interest in real property is considered tax exempt only if the property is being used for a charitable purpose. (Rev. & Tax. Code, § 214; see, e.g., Cedars of Lebanon Hosp. v. County of L.A. (1950) 35 Cal.2d 729, 742-743 [221 P.2d 31, 159 A.L.R.2d 1045].) Since property left to a charity is unlikely to be used for charitable purposes while under estate administration, the issue presented in this case rarely arises in California.
[3]  Revenue and Taxation Code section 405, subdivision (a) reads: "Annually, the assessor shall assess all the taxable property in his county, except state-assessed property, to the persons owning, claiming, possessing, or controlling it on the lien date." (Italics added.)

Revenue and Taxation Code section 982 now reads: "The undistributed or unpartitioned property of deceased persons may be assessed to the heirs, guardians, conservators, executors, or administrators. A payment of taxes by any one of them binds each of the other parties in interest for his proportionate share."
