Mayor Bill de Blasio may want to “tax the hell out of the wealthy,” but a Citizens Budget Commission study out last week warned that the city and state are already too reliant on tax revenue from the rich.

Taxpayers with $1 million or more in taxable income accounted for 1 percent of personal-income-tax filers in fiscal 2016 but paid 37 percent of the state’s personal-income taxes, the study noted. In the city, those earning over $1 million paid 39 percent of the personal-income taxes.

Yet the incomes of these top earners are “highly volatile” and “sensitive to economic trends,” says the CBC, especially since much of their earnings come from capital gains, which can vary greatly year to year.

And when incomes swing, so does tax revenue. Budgets that rely on those revenues can face sudden, unexpected surpluses — or huge, painful shortfalls. In fiscal 2008, for instance, the state’s personal-income tax revenue jumped by $4.2 billion; the next year, it plunged by $5.7 billion.

Meanwhile, state and city spending plans bake in ever-higher outlays; once something gets a line in the budget, it’s almost impossible to cut its funding. Which is why budget shortfalls mean budget crises.

Here’s the really bad news: Both the city and state are already projecting multibillion-dollar gaps over the next few years. And everyone says the economy’s next downturn is just a matter of time.

Meanwhile, the state’s high taxes on millionaires only encourage them to flee the state. They won’t be around to help stem the red ink when it starts to flow.