Mayor-elect Bill de Blasio will struggle to get his tax-the-rich plan approved by the New York State Legislature because New York City’s population, even at 8.4 million, is still not large enough to have a majority in the legislature, analysts said Wednesday.

“Not everybody in the state legislature is interested in the taxation in New York City, and no politician is interested really in raising taxes,” said Carol O’Cleireacain, former New York City commissioner and budget director.

New York State’s population is 19.5 million, of which the city accounts for 43 percent, according to the United States Census Bureau.

Tax policy for New York City is a struggle, said O’Cleireacain, who ran into difficulties getting the city’s tax policies approved by the state.

“I ended up sleeping on the floor several nights in Albany trying to get the permission to raise taxes on ourselves to do Safe Street, Safe City,” she said, referring to the city’s scheme to bring down crime rates.

City authorities can set only property tax on its own, while all other taxes must be approved by the state government, she said.

During the mayoral election campaign, Bill de Blasio proposed to raise taxes on the city’s highest-income residents to raise money for pre-kindergarten and after-school programs.

On his website, billdeblasio.com, he pledged to tax those with an annual income of more than $500,000 at 4.41 percent, an increase from the current 3.86 percent, he said.

New York City’s education system has around 1.2 million schoolchildren, with a budget of more than $20 billion a year — nearly a third of the city’s overall budget, according to the Department of Education.

The city budget will receive another $530 million from a five-year surcharge to finance its programs for pre-kindergarten and middle-school pupils, de Blasio’s website said.

Even if the new mayor manages to get his plan approved by the state, it will turn out to be not a good idea to raise money for the city budget, said Carol Kellermann, president of the Citizens Budget Commission, a nonpartisan organization supporting changes in the city’s finance and services.

“We need more thoughtful analysis of tax and pre-K programs,” she said.

“When an emergency comes up, you can’t use money for that… Oh, we have a referendum, all this goes to childcare and they don’t allow you to use the money. So after all, there is budget left and everything is earmarked for something else.”

De Blasio will take over the city government in a much better budget situation than his predecessors, said analysts at the conference.

The city is expected to have a balanced budget in the fiscal year 2014, which ends next July, the mayor’s office has said.