(Bloomberg) — It was a shocking, and seemingly improbable, figure.Eight months into the pandemic — and the brutal economic collapse it triggered — California’s budget watchdog said the state was poised to pocket a windfall of some $26 billion. Just as New York and Connecticut had revealed weeks earlier, tax revenue was coming in at a clip no one expected, thanks in part to the booming stock market.And so it has largely played out across the country this year, albeit to a smaller extent in many of the less well-to-do states. The fiscal apocalypse expected to blow massive holes in state budgets hasn’t come — at least not yet.This in turn is providing fuel to the argument made by some Republicans that additional federal aid for states and municipalities can wait until next year instead of being settled in the relief package that’s being heatedly debated in Washington now. Top leaders from both sides in Congress are near a deal for Covid relief of less than $900 billion, including direct stimulus payments but leaving out state and local aid, according to two people familiar with negotiations. That relief has been one of the key sticking points.“In some ways, U.S. taxpayers have saved some money by the stimulus package being delayed so that they could really get their arms around what revenues look like,” said Jennifer Johnston, director of research for Franklin Templeton Fixed Income’s municipal bond team.There are several important caveats to this somewhat rosy picture, to be clear.For one, many states and cities are still facing large deficits, just not as big as initially forecast. Also, the spike in Covid-19 cases could trigger more economic shutdowns, potentially reversing the nascent recovery that local governments have seen so far. Most of California is back under a stay-at-home order, and New York could be headed toward one. And because of the lag in collecting taxes, states historically struggle with big deficits well after recessions end.Financial forecasts have improved considerably in recent months, though. In the spring, congressional Democrats had sought $1 trillion in aid for states and municipalities. Back then, states were expected to report total budget shortfalls of $650 billion through fiscal 2022; now that number is forecast at about $400 billion, according to the Center on Budget and Policy Priorities. And Democrats more recently were pushing for just $160 billion as a first step.The muni bond market, buoyed by rock-bottom benchmark interest rates, also shows investors are unconcerned about a looming fiscal crisis. States including Pennsylvania, Michigan and California can all borrow for 10 years at rates well below 1%, a historically low threshold. Even a benchmark of near-junk Illinois debt yields just 2.76%, around the level reserved for only the highest-rated borrowers as little as two years ago.California is a prime example of the turnaround in fiscal accounts. In May, it girded for a two-year $54 billion gap. It now projects only a $5 billion deficit next year after it reaped a $26 billion windfall from raking in more tax revenue and spending less than expected. New York City, once the epicenter of the coronavirus crisis, collected $985 million more revenue than forecast for the first four months of its fiscal year thanks to a banner year on Wall Street.The surprise underscores the disproportionate impacts of the outbreak and business shutdown. Lower-income workers for such face-to-face industries as restaurants are losing their jobs, while wealthier individuals work from home, buy goods online and sell stock — all generating the income that states rely on to balance their books.Stock markets have thrived — both because of the Federal Reserve’s rate cuts and prospects for an economic rebound in 2021 — and initial public offerings have minted a new class of wealthy Americans, a boost to states such as New York and California that have progressive tax systems.In California, which gets almost half of its personal income tax collections from the top 1% of earners, three former Stanford University students became billionaires from the IPO of their San Francisco-based food-delivery company DoorDash Inc.“For those fortunate to maintain employment and income during this pandemic, their financial situation is better than before,” economists at UCLA Anderson said in a December report. “These households have been able to accumulate at least an additional $1.6 trillion in savings.”Internet SalesAnd many have continued to spend. Because states are permitted to tax internet sales from businesses outside their borders, municipal governments have benefited from people shopping at home. Texas, which garners its largest source of revenue from sales taxes, saw the biggest gains over the past 12 months from the $1.25 billion of collections from online retailers, Comptroller Glenn Hegar said last month. In California, home to some of the most sweeping Covid restrictions nationwide on businesses, sales tax revenue stands at about the same so far as it was in the previous year.Regions have gone through different experiences given the variance in public health restrictions, with some only now beginning to feel the pain, said Irma Esparza Diggs, director of federal advocacy for the National League of Cities. “This pandemic hasn’t hit our state and local governments the same way at every point in time, which has been the difficulty in conveying to Congress this is how much we’re losing,” she said.The group in December released a survey that found on average, cities have seen revenues decline by 21% since the beginning of the pandemic, while additional expenditures such as protective equipment have jumped 17% over the same time period. Chicago closed an $800 million gap in its 2020 budget that was caused by Covid-19 and an even bigger $1.2 billion hole in 2021, 65% of which was related to the pandemic.The virus has decimated the finances of transit agencies. New York’s Metropolitan Transportation Authority, the nation’s largest mass transit system, said it will have to slash subways and buses by 40% and chop commuter rail service by half if aid doesn’t come from Washington.And some states have needed to take unusual action to balance their books. New Jersey last month sold $3.7 billion of general-obligation bonds to cover its revenue shortfall. Illinois has tapped the Federal Reserve’s emergency lending program.“Even though the prospects of a vaccine are promising, it’s going to take at least a year or two before things go back to some kind of normalcy,” said Lucy Dadayan, a senior research associate with the Urban-Brookings Tax Policy Center.(Updates with status of Congressional negotiations in fourth paragraph)For more articles like this, please visit us at bloomberg.comSubscribe now to stay ahead with the most trusted business news source.©2020 Bloomberg L.P.