The costs of last year’s battle over charter-school space are becoming clearer to the de Blasio administration.

The city’s tab for charter school rent is estimated to exceed $32 million by next summer, a spokeswoman for the city budget office confirmed Monday. The sum is the first clear indication of the price of state legislation passed in April 2014 that was meant as a rebuke of Mayor Bill de Blasio and his plans to end the city’s policy of giving charter schools free space in school buildings.

The city’s bills will grow as new charter schools open and existing schools expand. Just how costly they get depends on the outcome of a new set of political battles: One involving the state’s charter-school cap, and the other being the de Blasio administration’s ability to find public space for new charter schools, a move that cuts costs but alienates political allies.

“It’s starting out relatively small,” Raymond Domanico, director of education research at the Independent Budget Office, said of the city’s charter school rent bill. “But depending on what happens with the charter cap, this thing is only going to grow over time.”

State law allows for up to 25 more charter schools to open in the city, a restriction lawmakers are expected to address over the final six weeks of the state legislative session, which ends in June. Gov. Andrew Cuomo has proposed increasing the cap by 100 schools for the entire state, while the United Federation of Teachers, de Blasio, and Chancellor Carmen Fariña have said the cap should not be lifted.

More schools means bigger bills for the city, which must provide new and expanding charter schools with free public space, or cover their rent in private facilities. And even if lawmakers don’t raise the cap, rental costs are still expected to soar in future years, as 46 existing charter schools add seats and the remaining new schools open.

Next year’s estimated costs, $22.4 million, are more than double what the city is spending this year, according to the spokeswoman. The department will begin making those payments this month, but officials have stayed mum until the release of new budget documents last week about how much the new law would cost the city.

The budget department spokeswoman said Monday that the city will have spent $10.2 million on charter-school rent this year. Most of that — $5.4 million — will cover rent at former Catholic school buildings that are housing three Success Academy charter schools whose co-locations the de Blasio administration nixed last year, setting off a showdown with Success CEO Eva Moskowitz that culminated in the rent legislation. Success Academy and the city reached the pricey lease agreement last April separate from the new legal process.

The other $4.8 million the city is spending this year will go to schools that have appealed for rent help through a process set up in the law. A Chalkbeat analysis indicated those costs could have risen to nearly $10 million.

With spending projections set to hit $32 million by the end of the next fiscal year, the city is on pace to hit a $40 million spending thresh hold by the 2016-17 school year, after which state funds will be provided to help alleviate the growing costs.

The City Council will hold hearings on the budget before a final version is adopted in June. An education committee hearing is scheduled for May 28, and the new fiscal year starts July 1.

Correction: An earlier version misstated the number of charter schools allowed to open in New York City.