The state and city budgets could get a high from legalizing marijuana, a new analysis argues.

City Comptroller Scott Stringer, who supports legalization, released a report Tuesday estimating the annual market for marijuana could be as large as $3.1 billion statewide and $1.1 billion citywide and that it could generate as much as $1.3 billion annually in tax revenue.

His office compiled the estimates by applying tax rates similar to those used by states where marijuana is legal to the number of New Yorkers believed to use marijuana, based on the usage rates reported on national surveys. Stringer found the sale surcharges could annually direct $436 million to the state, $336 million to the city and $536 million to other local governments within the state.

Beyond the budgetary boost, Stringer argued legalizing adult use of marijuana would be an equitable move because arrests for smoking marijuana are disproportionately higher among young black and Latino New Yorkers.

“ . . .... This is not just about dollars — it’s about justice,” Stringer said in a statement. “Legalizing marijuana and reclassifying past convictions are critical steps away from failed policies, and the time to take them is now. I support legalizing marijuana and doing what’s right — building up the very communities that criminalization tore down.”

The state legalized marijuana for medical use in 2014. In his budget proposal, Gov. Andrew Cuomo has proposed studying the economic impacts of legalizing marijuana versus keeping it illegal as other nearby state begin to permit its use.

When asked about legalizing marijuana last month, Mayor Bill de Blasio said he was “just not there” due to concerns about steps people may take to dodge related taxes and corporations seizing on the legalization to get younger people hooked on the drug.

In his report, Stringer noted that usage rates among teens have declined in states that legalized marijuana. In Washington and Colorado, marijuana use among 12 to 17-year-olds declined after it was legalized, though the impacts varied among adults, according to the comptroller’s report.