OPINION OF THE COURT
Simons, J.Petitioner, a resident and taxpayer of Nassau County, instituted this article 78 proceeding to invalidate the 1988 Nassau County budget and to. compel respondents to prepare and adopt a new one. At bottom the dispute concerns whether respondents, the County Executive and members of the County Board of Supervisors, illegally held estimated surplus moneys off budget in violation of the requirements of section 302 of the Nassau County Charter. Petitioner has been successful in the courts below and the matter is here by permission of this court.
I
On October 26, 1987 the Nassau County Executive, respondent Gulotta, issued an official county news release announcing that he anticipated a year-end cash surplus of $80.1 million in the county general fund. Stating that the entire surplus could be applied to reduce property tax rates for 1988 but that such "action would be short-sighted and could result in a dramatic increase in taxes next year”, he proposed to "stabilize property taxes” by using the accumulated surplus over a three-year period. Two weeks later, on November 9, 1987, Gulotta announced his proposed 1988 budget to the public and sent it to the Board of Supervisors for approval. The charter also required him to send the Board of Supervisors an accompanying budget message and in his message, Gulotta repeated his earlier estimate of a record surplus, this time placing it at $90 million. He stated once more that the entire amount was available to reduce 1988 taxes but repeated his plan to accumulate the surplus and spend it proportion*368ately over a three-year period thereby reducing taxes each year. Consistent with this officially announced plan, the proposed executive budget included only $17.7 million as an item of revenue which was variously labeled in the budget as "cash on hand”, "general fund balance applicable to the ensuing fiscal year” or "fund balance beginning of year”. The budget did not refer to the remaining funds in his estimated year-end cash balance and it did not contain an entry for a multiyear tax stabilization program or reserve fund.1 On December 21, 1987 the Board of Supervisors adopted the budget, consistent with the County Executive’s plan, after adding $2.5 million to the year-end general fund balance.
Petitioner instituted this article 78 proceeding contending that the budget proposed by the County Executive and passed by the Board of Supervisors did not comply with County Charter § 302 (5). That section requires the executive budget to contain a "statement of the estimated cash balance, after deducting commitments estimated to be outstanding at the close of the [then] current fiscal year”. Respondents denied the essential allegations of the petition, interposed several objections in point of law and asserted counterclaims for abuse of process and malicious prosecution. They subsequently moved to dismiss the petition. On the return of the motion Supreme Court held that mandamus was an appropriate proceeding to compel executive action but not to review the validity of the legislatively adopted budget. Accordingly, it severed the proceeding against the Board members and converted it to an action under section 51 of the General Municipal Law. It treated respondents’ motion to dismiss the petition as a motion for summary judgment, searched the record and granted judgment to petitioner. In a well-reasoned decision, Justice DiPaola held that the budget adopted was invalid and could not be made effective by legislative action because "the Board of Supervisors relied upon a false premise, namely, that the entire amount of the year-end surplus required to be included” was so included. Two separate judgments were entered. In the first (the article 78 proceeding), the County Executive is the named respondent and the judgment directs him to resubmit to the Board of Supervisors a revised 1988 Nassau County budget which contains a statement complying *369with County Charter § 302 (5). The second judgment (the General Municipal Law §51 action) names the members of the Board of Supervisors as respondents, declares the 1988 Nassau County budget, as adopted, unlawful and invalid, directs the Board of Supervisors to adopt a new 1988 budget within six weeks after it receives the revised 1988 budget from the County Executive and dismisses the counterclaims. The Second Department affirmed both judgments and leave to appeal was granted by this court.
We agree with the courts below that the County Executive failed to comply with the legal requirements of the County Charter directing him to account in the budget for all estimated revenues and that the Board of Supervisors’ action, in approving a document which did not state the County Executive’s true estimate of the anticipated unencumbered cash balance, was a nullity. Accordingly, we modify the order of the Appellate Division, with respect to the time of performance only, and otherwise affirm.
II
Several threshold contentions raised by respondents must be treated before addressing the merits.
Respondents’ principal claim is that this matter is nonjusticiable because it requires the courts to invade the budgetary process, the exclusive domain of the executive and legislative branches of government. They rely on Saxton v Carey (44 NY2d 545) and Judge Breitel’s dissenting opinion in Hidley v Rockefeller (28 NY2d 439, 440). These authorities stand for the principle established in People v Tremaine (281 NY 1) that the executive must itemize entries in the budget but that the degree of itemization is a matter of discretion which the court will not review. Manifestly, the courts cannot and will not intervene in the budget process if doing so requires them to substitute their judgment on matters of discretion. As we stated in Saxton, however, "[w]e do not suggest by our decision today that the budgetary process is per se always beyond the realm of judicial consideration * * * The courts will always be available to resolve disputes concerning the scope of that authority which is granted by the Constitution to the two other branches of the government” (44 NY2d 545, 551, supra; see also, Wein v Carey, 41 NY2d 498, rearg denied 42 NY2d 910; Matter of Block v Sprague, 285 NY 69; People v Tremaine, 281 NY 1, supra).
*370Nor does City of Beacon v County of Dutchess (285 App Div 1050), cited by respondents, support their position. In Beacon the plaintiff sought to recover real estate taxes that it paid to the defendant and alleged that the 1954 county budget contained excessive appropriations and underestimated revenues. The plaintiff claimed that its taxes could have been eliminated entirely had the surpluses in each fund been estimated correctly. The Appellate Division affirmed a judgment dismissing the complaint for failure to state a cause of action holding that “[i]n the absence of express statutory authority [citation omitted], courts do not have the power to review the exercise of discretionary powers by a municipal corporation as to estimates of the money required to carry on the affairs of the municipality” (id,., at 1050-1051). Respondents suggest that this decision states some general overriding principle of nonjusticiability with respect to intervention into the budgetary process. The differences between Saxton and Beacon and this case, however, could not be clearer. Petitioner does not question the County Executive’s discretionary power to estimate surplus funds, or even to spread them over three years, if some legal method of doing so can be found. He contends that it was unlawful for the County Executive to keep revenues off-budget in violation of the mandate of section 302 (5).
Next, respondent County Executive contends that the remedy of mandamus does not lie to review his estimate of the unencumbered cash balance because it is an inherently discretionary act. He contends that he complied with the requirement of section 302 (5) when he included in his proposed budget an item for estimated cash balance and that courts may not substitute their judgment as to the appropriateness of the particular figure chosen by him. Mandamus will lie to compel acts that public officials are duty bound to perform regardless of how they may exercise their discretion in doing so (see, Klostermann v Cuomo, 61 NY2d 525, 539-540). The remedy is appropriate here because the present dispute does not involve a difference of opinion on the size of the estimate contained in the budget but whether respondents may omit from the budget account of estimated year-end cash balance sums which the County Executive acknowledged the county would receive. That is a matter of statutory interpretation appropriately decided by the judiciary.
Respondents also contend that Supreme Court erred in holding that petitioner’s failure to appear and object at a *371public hearing did not preclude him from commencing this litigation to challenge the budget. They rely on a statement to that effect by the Appellate Division in City of Beacon (supra) but, as noted, that case is inapposite. There was no claim in Beacon that public officers had failed to use their own officially stated estimates; the plaintiff was asking the court to become involved in discretionary decisions made by the executive and legislative branches of government. Here, petitioner simply seeks the court’s aid in ensuring that the County Executive place his true estimate in the proposed budget, as required by the County Charter, so that the legislative process rests upon a legal foundation. Under the circumstances, we conclude that petitioner did not waive or forfeit his right to attack the budget and is not estopped from doing so because of his failure to appear and object at the budget hearing.
Finally, respondents maintain that the Supreme Court’s severance of a portion of petitioner’s article 78 proceeding and its conversion to a General Municipal Law §51 action was improper on the ground that a taxpayer’s action pursuant to section 51 does not lie to challenge the legality of the budget process. Extending this reasoning to its logical end, respondents would argue that even if the County Executive violated section 302 (5) of the County Charter and mandamus were available to compel respondent Gulotta to comply with the statutory mandate, the matter is now beyond judicial review because the Board of Supervisors has passed the budget.
We have recognized that an action pursuant to General Municipal Law § 51 may take the form of action for a declaratory judgment if it satisfies the statute’s requirements (Wein v City of New York, 36 NY2d 610, 621; Bloom v Mayor of City of N. Y., 35 AD2d 92, 95, affd 28 NY2d 92). Section 51, entitled "Prosecution of officers for illegal acts”, provides that: "All officers * * * and other persons acting, or who have acted, for and on behalf of any county * * * in this state, and each and every one of them, may be prosecuted, and an action may be maintained against them to prevent any illegal official act on the part of any such officers * * * or other persons, or to prevent waste or injury to, or to restore and make good, any property, funds or estate of such county” (emphasis added). Although the disjunctive phrasing of the statute would appear to authorize suits if there is either an "illegal official act” or "to prevent waste” we have held that a showing of mere illegality is not enough (see, Mesivta of Forest Hills Inst. v City of New York, 58 NY2d 1014; Kaskel v Impellitteri, 306 NY 73, *372cert denied 347 US 934; Western N. Y. Water Co. v City of Buffalo, 242 NY 202). Nevertheless, a plaintiff is not required to show waste in the strict sense (Aldrich v City of New York, 208 Misc 930, affd 2 AD2d 760). The governing rule is stated in Altschul v Ludwig (216 NY 459, 467): "[t]he mere illegality of the official act in and of itself does not justify injunctive relief [under section 51]. To be entitled to [injunctive] relief, when waste or injury is not involved, it must appear that in addition to being an illegal official act the threatened act is such as to imperil the public interests or calculated to work public injury or produce some public mischief’ (citations omitted).
In this case, respondent County Executive submitted an allegedly illegal budget to the Board of Supervisors. In acting upon it, the Board relied upon a false premise, i.e., that the full estimated cash balance had been included in the proposed budget when in fact the estimate did not comply with the legal requirements of the County Charter. The Board lacked the power to authorize a budget that was illegal and its action in adopting the budget was a nullity. It is irrelevant that the Board members knew of the deficiency when they acted or that they acted in good faith; the Board’s action could not legalize a budget which did not comply with statutory mandates. Petitioner has met his burden of demonstrating a public injury entitling him to maintain a section 51 action because county moneys, available to reduce property taxes, were not lawfully appropriated at the time of the passage of the 1988 budget, but were held off-budget. Their existence, unaccounted for, was illegal and threatened the public interest.
III
Respondents assert that even if these threshold considerations are resolved against them the order of the Appellate Division should be reversed because they have complied with the requirements of section 302 (5).
A budget is a statement of the financial position of the government, for a definite period of time, based upon an estimate of proposed expenditures and anticipated revenues (see, Matter of Collins v City of Schenectady, 256 App Div 389, 391). The method by which public budgets are prepared is governed by the State Constitution and the applicable State statutes. The requirements contained in those documents are not particularly burdensome and permit the executive and *373legislative officials considerable freedom of action in implementing governmental operations and programs and providing for the revenues to fund them. The legal requirements they contain, however, are grounded in the general principles of fiscal responsibility and the accountability that underpins the regulation of all public conduct and they must be followed.
The governing statute in this case is the Nassau County Charter enacted by the State Legislature in 1936 and which contains provisions essentially the same as those found in the laws governing other municipalities (see, County Law § 355 [1] [g]; Town Law § 107 [1] [b]; Village Law § 5-506 [1] [c]). It provides that no later than the 15th day of September each year Nassau County department heads shall furnish to the County Executive estimates of revenues and expenditures for their departments for the next fiscal year (§ 301). From this data the County Executive must prepare his proposed budget for the ensuing fiscal year and submit it to the legislature no later than the second Monday in November (§ 302). The proposal must contain a statement of all estimated revenues exclusive of revenues derived from the tax levy (§ 302 [1]), a statement of estimated revenues from the tax levy (subd [2]), a statement of estimated receipts from the sale of bonds and other borrowing (subd [3]), a statement of the amount of the sinking fund available to pay bonded indebtedness (subd [4]) and "a statement of the estimated cash balance, after deducting commitments estimated to be outstanding at the close of the current fiscal year, in each fund, applicable to expenditures of the ensuing fiscal year” (subd [5]).
The provisions of section 302 are mandatory. They direct that the proposed budget "shall” contain a statement of the estimated cash balance. The requirement is in accord with the strong policy of the law to require a full accounting of all public funds and to prevent municipal governments from acquiring tax proceeds faster than they are needed. A corollary of this generally recognized principle is that funds may not be accumulated for the remote future or for contingencies which may never occur. The accumulation is unjust because it deprives the people of the use of money taken from them by taxes for a considerable period and it is impolitic because it may tempt public officials having custody of the funds (see generally, 15 McQuillin, Municipal Corporations § 39.02a [3d rev ed]). The rule is intended to protect taxpayers from the misuse of surplus funds "to hide deficit spending or to reap political profit” (see, Town of Evans v Catalino, 103 Misc 2d *374261, 265 [Denman, J.], mod on other grounds 88 AD2d 780, lv dismissed 58 NY2d 687).
The New York State Comptroller considered this specific issue when he interpreted County Law § 355 (1) (g). In that instance a County Treasurer estimated that the county would enjoy a surplus of between $600,000 and $700,000 for fiscal 1969. The Board of Supervisors estimated $450,000 of this sum as revenue for 1970 and the remainder was set aside to operate the county in the first three months of 1970. The Comptroller observed that it was unlawful for the county to set aside $150,000 to $250,000 for the purpose of operating the county during the early part of the next fiscal year. "The practice employed by the county herein of estimating surplus for the purpose of carrying moneys into fiscal 1970 is completely unauthorized, contrary to statutory directive, and unnecessary to make moneys available for the operation of county government * * * The tentative budget must contain a statement of the aggregate amount of cash surplus in the general fund estimated to be on hand at the close of a fiscal year, after deducting encumbrances estimated to be outstanding at the close of that fiscal year (County Law, § 355 (1) (j)). In other words, the entirety of the estimated unencumbered surplus must be counted as a revenue of the forthcoming fiscal year and thereby be used to reduce real property taxes to be levied for such forthcoming fiscal year” (1970 Opns St Comp No. 70-393; see also, 1980 Opns St Comp No. 80-280, at 79 [interpreting Town Law § 107 (1)]; 1969 Opns St Comp No. 69-708 [also interpreting Town Law § 107 [1]; 2 Opns St Comp, 1946, No. 46-1467, at 399).
Respondents assert several reasons why they believe the County Executive complied with the mandate of the charter notwithstanding the discrepancy between his announced $80-90 million estimate and the $17.7 million estimate included in the budget. Their principal contention is that it was permissible not to include $24.5 million (an amount substantially less than the balance of $80-90 million remaining after the budget was adopted). They claim the sum was a "commitment” within the meaning of County Charter § 302 (5) because in February 1988 the Board of Supervisors set up a tax-stabilization reserve fund, purportedly authorized by General Municipal Law § 6-e, in the amount of $24.5 million. At the time the budget was proposed and adopted in 1987, however, this $24.5 million could not have been a "commitment” within the meaning of section 302 (5) because the fund had not yet been *375created and the County Executive’s expressed intention of establishing one in the future could not justify the omission of moneys from the estimated cash balance at the end of the current fiscal year (see, 1969 Opns St Comp No. 69-708 [unreported]; 24 Opns St Comip, 1968, No. 68-464, at 474). A tax-stabilization reserve fund is set up by the County Board of Supervisors, not the County Executive, and the requested establishment of the fund and appropriation may not pass the Board of Supervisors or the amount appropriated may be far different from what the County Executive projected. Until the fund is actually created, it cannot be a "commitment”.
When the County Executive and the Board of Supervisors prepared the budget for 1988 in 1987, they could have treated the proceeds as estimated or anticipated revenue for the reduction of taxes in the next fiscal year or attempted to create and fund a tax-stabilization reserve fund in lieu thereof to avoid the unauthorized carry over of surplus for three years. In either event, however, the charter required that the sums be included in the proposed budget’s statement of estimated cash balance, since the decision to create the fund would not occur until after the proposed budget was submitted by the County Executive and because at the time the budget was proposed the anticipated revenues were not encumbered (see, 2 Opns St Comp, 1946, No. 46-1467, at 399).
The parties also dispute the propriety of not including in the estimated cash balance amounts attributable to the so-called Tax Law § 1262 (d) (sales tax) revenues. In view of our holding that the budget was illegal because of the failure to include all estimated revenues, particularly those subsequently deposited in the tax-stabilization fund, we need not pass on the merits of this argument.
We concur with the courts below that there is nothing to indicate that respondents acted with anything less than complete good faith or with any intention of harming the public and that there is thus no basis for a prosecution under section 51 to hold them personally responsible. Nevertheless, the budget does not comply with the provisions of the County Charter and must be corrected.2
*376Accordingly, the order of the Appellate Division should be modified so as to require the County Executive to submit a new budget for fiscal year 1988 which complies with section 302 (5) of the County Charter within 20 days from the decision herein and, as so modified, affirmed.
. On February 22, 1988, while the motion to dismiss the petition was pending in Supreme Court, the Board of Supervisors created a tax-stabilization reserve fund pursuant to General Municipal Law § 6-e and appropriated $24.5 million of 1987 revenues into the fund.
. We note that General Municipal Law § 51 is equitable in nature, and nothing in this opinion should be read as preventing a court from assessing equitable factors under that section, especially before drastic relief, such as the invalidation of a municipality’s budget, is ordered. Appellants, however, do not raise this issue on appeal, and we do not consider it here.