Closing Rikers and ending “cash bail” is expensive. Can New York afford it? The city must add hundreds of millions of dollars to its future budgets to pay for both state and local changes to the police, prosecution and jail systems. If a recession comes, broader public services will lose out.

Over the next three years, spending on the city’s $94.4 billion budget will rise faster than revenues, notes comptroller Scott Stringer in a new report — with spending rising by 3 percent annually, and revenues 2 percent.

What’s driving spending? Lots of things, from the supposed need for more teachers (even though school enrollment is flat) to higher health-care and pension costs.

But there’s one big new thing: criminal-justice reform. We already know that the city’s plan to build four new jails to replace Rikers Island will cost $8.7 billion. That money will be borrowed, eventually costing about $250 million a year in debt-service costs.

But criminal-justice changes also require “significant” numbers of new employees. Closing Rikers Island will cost another $265 million a year. Some of the new money — $50 million — is for “supervised release” of people who won’t fit in the new jails. More will go to police, EMS and social-services teams at the smaller jails.

Then, there are the bribes: The city had to buy political support in neighborhoods that will house the new jails. These “neighborhood investments” — lots of new money for “service providers” who run programs to keep people out of jail in the first place — will cost $137 million every year.

Then, the state-law changes: The city says it needs to hire 1,023 people to comply with a new state law that requires prosecutors to turn over evidence to defendants within 15 days of arrest, rather than when a trial begins. That will cost $75 million a year, plus, likely, police overtime.

Criminal reform eventually will cost about $600 million a year. And there’s a risk that it will cost even more: The city doesn’t add to its 2,027 corrections workers, even though guarding prisoners in a less restrictive environment may require more manpower.

The city also claims it will save $90 million annually by closing Rikers, but if it takes longer than expected, less will be saved.

To be sure, City Hall can conceivably accomplish the perilous, untested business of jail reform without seeing crime rise, and it could cut back spending elsewhere. But all this means deficits, which start at $3 billion by next summer.

As long as the economy keeps powering along, the city can paper over these deficits with “surprise” tax revenues. Yet two pillars of New York’s private-sector economy — finance and real estate — have been shedding jobs. Wall Street, the highest-paid slice of finance, has seen its 2018 job gains “erased,” says state comptroller Tom DiNapoli, and is on track to lose 500 jobs this year.

It’s getting harder for the finance sector to squeeze much more in the way of creative profits — and jobs — from the decade-old economic boom. Blockbuster initial stock offerings such as Uber and Lyft fizzled out quickly this spring.

Note, too: High-finance jobs pay more than their share in tax revenue. Though Wall Street jobs account for just 5 percent of Gotham jobs, they comprise 20 percent of private-sector wages, and 6 percent of all city tax collections.

Just as alarming are job cuts in another area of finance: real estate. Real estate was a bulwark after the 2008 financial crisis; compared to the rest of finance, it lost only 2,700 of its 110,000 jobs between 2008 and 2010, and, at the end of 2018, boasted a record 122,000 jobs. Since then, though, it’s shed about 2,000 jobs.

With luxury-property sales and population gains stalled, the real-estate boom that has powered the economy may be over. (Indeed, building-construction jobs are down slightly, too, from a record 48,000 last year, to 47,000.)

As Stringer’s report notes, the pace of overall job growth has slowed, and most new jobs are in low-wage industries: Nearly 80 percent of the city’s nearly 81,000 new jobs in 2019 (so far) pay less than $63,000 a year. Those jobs are worthy — but they don’t spout out tax revenue like Wall Street does.

If New York were serious about criminal-justice reform, it would pare back something else to pay for it. Instead, come recession, it will have to choose between picking up the garbage and supervising people released from jail.

Nicole Gelinas is a contributing editor to the Manhattan Institute’s City Journal.